11 #ifndef ROL_SCALARTRAITS_HPP
12 #define ROL_SCALARTRAITS_HPP
20 template<
typename Real>
25 template<
typename Real>
31 template<
typename Real>
36 static constexpr Real
zero() noexcept {
return static_cast<Real
>(0.0); }
37 static constexpr Real
half() noexcept {
return static_cast<Real
>(0.5); }
38 static constexpr Real
one() noexcept {
return static_cast<Real
>(1.0); }
39 static constexpr Real
two() noexcept {
return static_cast<Real
>(2.0); }
41 static constexpr Real
eps() noexcept {
42 return std::numeric_limits<Real>::epsilon();
45 static constexpr Real
rmin() noexcept {
46 return std::numeric_limits<Real>::min();
49 static constexpr Real
rmax() noexcept {
50 return std::numeric_limits<Real>::max();
53 static constexpr Real
two_pi() noexcept {
54 return static_cast<Real
>( 6.283185307179586476925286766559005768L );
57 static constexpr Real
pi() noexcept {
58 return static_cast<Real
>( 3.141592653589793238462643383279502884L );
61 static constexpr Real
half_pi() noexcept {
62 return static_cast<Real
>( 1.570796326794896619231321691639751442L );
66 return static_cast<Real
>( 7.85398163397448309615660845819875721e-1L );
70 return static_cast<Real
>( 2.506628274631000502415765284811045252L );
73 static constexpr Real
sqrt_pi() noexcept {
74 return static_cast<Real
>( 1.772453850905516027298167483341145182L );
78 return static_cast<Real
>( 1.253314137315500251207882642405522626L );
82 return static_cast<Real
>( 1.414213562373095048801688724209698078L );
90 #endif // ROL_SCALARTRAITS_HPP
static constexpr Real quarter_pi() noexcept
static constexpr Real sqrt_half_pi() noexcept
static constexpr Real half() noexcept
typename ScalarTraits_Magnitude< Real >::type magnitudeType
static constexpr Real eps() noexcept
static constexpr Real pi() noexcept
static constexpr Real sqrt_two_pi() noexcept
static constexpr Real rmin() noexcept
static constexpr Real rmax() noexcept
static constexpr Real half_pi() noexcept
static constexpr Real two_pi() noexcept
static constexpr Real sqrt_two() noexcept
static constexpr Real sqrt_pi() noexcept
static constexpr Real zero() noexcept
static constexpr Real two() noexcept
static constexpr Real one() noexcept