glucat 0.12.0
glucat::numeric_traits< Scalar_T >::promoted Struct Reference

Extra traits which extend numeric limits. More...

#include <promotion.h>

Public Types

using type = double
 
using type = long double
 
using type = double
 

Public Member Functions

auto pi () -> long double
 Pi for long double.
 
auto ln_2 () -> long double
 log(2) for long double
 
auto to_scalar_t (const Other_Scalar_T &val) -> float
 Extra traits which extend numeric limits.
 
auto to_scalar_t (const Other_Scalar_T &val) -> double
 Cast to double.
 
auto to_scalar_t (const dd_real &val) -> long double
 Cast to long double.
 
auto to_scalar_t (const qd_real &val) -> long double
 Cast to long double.
 
auto to_scalar_t (const long double &val) -> dd_real
 Cast to dd_real.
 
auto to_scalar_t (const qd_real &val) -> dd_real
 Cast to dd_real.
 
auto to_scalar_t (const long double &val) -> qd_real
 Cast to qd_real.
 
auto to_scalar_t (const dd_real &val) -> qd_real
 Cast to qd_real.
 
auto to_scalar_t (const Other_Scalar_T &val) -> float
 Extra traits which extend numeric limits.
 
auto to_scalar_t (const Other_Scalar_T &val) -> double
 Cast to double.
 
auto to_scalar_t (const dd_real &val) -> long double
 Cast to long double.
 
auto to_scalar_t (const qd_real &val) -> long double
 Cast to long double.
 
auto to_scalar_t (const long double &val) -> dd_real
 Cast to dd_real.
 
auto to_scalar_t (const qd_real &val) -> dd_real
 Cast to dd_real.
 
auto to_scalar_t (const long double &val) -> qd_real
 Cast to qd_real.
 
auto to_scalar_t (const dd_real &val) -> qd_real
 Cast to qd_real.
 
auto pi () -> long double
 Pi for long double.
 
auto ln_2 () -> long double
 log(2) for long double
 

Static Public Member Functions

static auto isInf (const double &val) -> bool
 Smart isinf.
 
static auto isNaN (const double &val) -> bool
 Smart isnan.
 
static auto isNaN_or_isInf (const double &val) -> bool
 Smart isnan or isinf.
 
static auto NaN () -> double
 Smart NaN.
 
static auto to_int (const double &val) -> int
 Cast to int.
 
static auto to_double (const double &val) -> double
 Cast to double.
 
static auto to_scalar_t (const Other_Scalar_T &val) -> double
 Cast to Scalar_T.
 
static auto fmod (const double &lhs, const double &rhs) -> double
 Modulo function for scalar.
 
static auto conj (const double &val) -> double
 Complex conjugate of scalar.
 
static auto real (const double &val) -> double
 Real part of scalar.
 
static auto imag (const double &val) -> double
 Imaginary part of scalar.
 
static auto abs (const double &val) -> double
 Absolute value of scalar.
 
static auto pi () -> double
 Pi.
 
static auto ln_2 () -> double
 log(2)
 
static auto pow (const double &val, int n) -> double
 Integer power.
 
static auto sqrt (const double &val) -> double
 Square root of scalar.
 
static auto exp (const double &val) -> double
 Exponential.
 
static auto log (const double &val) -> double
 Logarithm of scalar.
 
static auto log2 (const double &val) -> double
 Log base 2.
 
static auto cos (const double &val) -> double
 Cosine of scalar.
 
static auto acos (const double &val) -> double
 Inverse cosine of scalar.
 
static auto cosh (const double &val) -> double
 Hyperbolic cosine of scalar.
 
static auto sin (const double &val) -> double
 Sine of scalar.
 
static auto asin (const double &val) -> double
 Inverse sine of scalar.
 
static auto sinh (const double &val) -> double
 Hyperbolic sine of scalar.
 
static auto tan (const double &val) -> double
 Tangent of scalar.
 
static auto atan (const double &val) -> double
 Inverse tangent of scalar.
 
static auto tanh (const double &val) -> double
 Hyperbolic tangent of scalar.
 

Static Private Member Functions

static auto isInf (const double &val, bool_to_type< false >) -> bool
 Smart isinf specialised for Scalar_T without infinity.
 
static auto isInf (const double &val, bool_to_type< true >) -> bool
 Smart isinf specialised for Scalar_T with infinity.
 
static auto isNaN (const double &val, bool_to_type< false >) -> bool
 Smart isnan specialised for Scalar_T without quiet NaN.
 
static auto isNaN (const double &val, bool_to_type< true >) -> bool
 Smart isnan specialised for Scalar_T with quiet NaN.
 

Detailed Description

template<typename Scalar_T>
struct glucat::numeric_traits< Scalar_T >::promoted

Extra traits which extend numeric limits.

Promoted type.

Promoted type for long double.

Promoted type for double

Definition at line 70 of file promotion.h.

Member Typedef Documentation

◆ type [1/3]

template<typename Scalar_T>
using glucat::numeric_traits< Scalar_T >::promoted::type = double

Definition at line 72 of file promotion.h.

◆ type [2/3]

template<typename Scalar_T>
using glucat::numeric_traits< Scalar_T >::promoted::type = long double

Definition at line 86 of file promotion.h.

◆ type [3/3]

template<typename Scalar_T>
using glucat::numeric_traits< Scalar_T >::promoted::type = double

Definition at line 145 of file scalar.h.

Member Function Documentation

◆ abs()

static auto glucat::numeric_traits< double >::abs ( const double & val) -> double
inlinestatic

Absolute value of scalar.

Definition at line 182 of file scalar.h.

◆ acos()

static auto glucat::numeric_traits< double >::acos ( const double & val) -> double
inlinestatic

Inverse cosine of scalar.

Definition at line 245 of file scalar.h.

◆ asin()

static auto glucat::numeric_traits< double >::asin ( const double & val) -> double
inlinestatic

Inverse sine of scalar.

Definition at line 266 of file scalar.h.

◆ atan()

static auto glucat::numeric_traits< double >::atan ( const double & val) -> double
inlinestatic

Inverse tangent of scalar.

Definition at line 287 of file scalar.h.

◆ conj()

static auto glucat::numeric_traits< double >::conj ( const double & val) -> double
inlinestatic

Complex conjugate of scalar.

Definition at line 161 of file scalar.h.

◆ cos()

static auto glucat::numeric_traits< double >::cos ( const double & val) -> double
inlinestatic

Cosine of scalar.

Definition at line 238 of file scalar.h.

◆ cosh()

static auto glucat::numeric_traits< double >::cosh ( const double & val) -> double
inlinestatic

Hyperbolic cosine of scalar.

Definition at line 252 of file scalar.h.

◆ exp()

static auto glucat::numeric_traits< double >::exp ( const double & val) -> double
inlinestatic

Exponential.

Definition at line 217 of file scalar.h.

◆ fmod()

static auto glucat::numeric_traits< double >::fmod ( const double & lhs,
const double & rhs )-> double
inlinestatic

Modulo function for scalar.

Definition at line 154 of file scalar.h.

◆ imag()

static auto glucat::numeric_traits< double >::imag ( const double & val) -> double
inlinestatic

Imaginary part of scalar.

Definition at line 175 of file scalar.h.

◆ isInf() [1/3]

static auto glucat::numeric_traits< double >::isInf ( const double & val) -> bool
inlinestatic

Smart isinf.

Definition at line 83 of file scalar.h.

◆ isInf() [2/3]

static auto glucat::numeric_traits< double >::isInf ( const double & val,
bool_to_type< false >  )-> bool
inlinestaticprivate

Smart isinf specialised for Scalar_T without infinity.

Definition at line 54 of file scalar.h.

◆ isInf() [3/3]

static auto glucat::numeric_traits< double >::isInf ( const double & val,
bool_to_type< true >  )-> bool
inlinestaticprivate

Smart isinf specialised for Scalar_T with infinity.

Definition at line 61 of file scalar.h.

◆ isNaN() [1/3]

static auto glucat::numeric_traits< double >::isNaN ( const double & val) -> bool
inlinestatic

Smart isnan.

Definition at line 93 of file scalar.h.

◆ isNaN() [2/3]

static auto glucat::numeric_traits< double >::isNaN ( const double & val,
bool_to_type< false >  )-> bool
inlinestaticprivate

Smart isnan specialised for Scalar_T without quiet NaN.

Definition at line 68 of file scalar.h.

◆ isNaN() [3/3]

static auto glucat::numeric_traits< double >::isNaN ( const double & val,
bool_to_type< true >  )-> bool
inlinestaticprivate

Smart isnan specialised for Scalar_T with quiet NaN.

Definition at line 75 of file scalar.h.

◆ isNaN_or_isInf()

static auto glucat::numeric_traits< double >::isNaN_or_isInf ( const double & val) -> bool
inlinestatic

Smart isnan or isinf.

Definition at line 103 of file scalar.h.

◆ ln_2() [1/3]

static auto glucat::numeric_traits< double >::ln_2 ( ) -> Scalar_T
inlinestatic

log(2)

Definition at line 196 of file scalar.h.

◆ ln_2() [2/3]

auto glucat::numeric_traits< longdouble >::ln_2 ( ) -> long double
inline

log(2) for long double

Definition at line 59 of file long_double.h.

References glucat::l_ln2.

◆ ln_2() [3/3]

auto glucat::numeric_traits< longdouble >::ln_2 ( ) -> long double
inline

log(2) for long double

Definition at line 59 of file long_double.h.

◆ log()

static auto glucat::numeric_traits< double >::log ( const double & val) -> double
inlinestatic

Logarithm of scalar.

Definition at line 224 of file scalar.h.

◆ log2()

static auto glucat::numeric_traits< double >::log2 ( const double & val) -> double
inlinestatic

Log base 2.

Definition at line 231 of file scalar.h.

◆ NaN()

static auto glucat::numeric_traits< double >::NaN ( ) -> Scalar_T
inlinestatic

Smart NaN.

Definition at line 115 of file scalar.h.

◆ pi() [1/3]

static auto glucat::numeric_traits< double >::pi ( ) -> Scalar_T
inlinestatic

Pi.

Definition at line 189 of file scalar.h.

◆ pi() [2/3]

auto glucat::numeric_traits< longdouble >::pi ( ) -> long double
inline

Pi for long double.

Definition at line 51 of file long_double.h.

References glucat::l_pi.

◆ pi() [3/3]

auto glucat::numeric_traits< longdouble >::pi ( ) -> long double
inline

Pi for long double.

Definition at line 51 of file long_double.h.

◆ pow()

static auto glucat::numeric_traits< double >::pow ( const double & val,
int n )-> double
inlinestatic

Integer power.

Definition at line 203 of file scalar.h.

◆ real()

static auto glucat::numeric_traits< double >::real ( const double & val) -> double
inlinestatic

Real part of scalar.

Definition at line 168 of file scalar.h.

◆ sin()

static auto glucat::numeric_traits< double >::sin ( const double & val) -> double
inlinestatic

Sine of scalar.

Definition at line 259 of file scalar.h.

◆ sinh()

static auto glucat::numeric_traits< double >::sinh ( const double & val) -> double
inlinestatic

Hyperbolic sine of scalar.

Definition at line 273 of file scalar.h.

◆ sqrt()

static auto glucat::numeric_traits< double >::sqrt ( const double & val) -> double
inlinestatic

Square root of scalar.

Definition at line 210 of file scalar.h.

◆ tan()

static auto glucat::numeric_traits< double >::tan ( const double & val) -> double
inlinestatic

Tangent of scalar.

Definition at line 280 of file scalar.h.

◆ tanh()

static auto glucat::numeric_traits< double >::tanh ( const double & val) -> double
inlinestatic

Hyperbolic tangent of scalar.

Definition at line 294 of file scalar.h.

◆ to_double()

static auto glucat::numeric_traits< double >::to_double ( const double & val) -> double
inlinestatic

Cast to double.

Definition at line 133 of file scalar.h.

◆ to_int()

static auto glucat::numeric_traits< double >::to_int ( const double & val) -> int
inlinestatic

Cast to int.

Definition at line 126 of file scalar.h.

◆ to_scalar_t() [1/17]

auto glucat::numeric_traits< longdouble >::to_scalar_t ( const dd_real & val) -> long double
inline

Cast to long double.

Definition at line 71 of file scalar_imp.h.

◆ to_scalar_t() [2/17]

auto glucat::numeric_traits< longdouble >::to_scalar_t ( const dd_real & val) -> long double
inline

Cast to long double.

Definition at line 71 of file scalar_imp.h.

◆ to_scalar_t() [3/17]

auto glucat::numeric_traits< qd_real >::to_scalar_t ( const dd_real & val) -> qd_real
inline

Cast to qd_real.

Definition at line 116 of file scalar_imp.h.

◆ to_scalar_t() [4/17]

auto glucat::numeric_traits< qd_real >::to_scalar_t ( const dd_real & val) -> qd_real
inline

Cast to qd_real.

Definition at line 116 of file scalar_imp.h.

◆ to_scalar_t() [5/17]

auto glucat::numeric_traits< dd_real >::to_scalar_t ( const long double & val) -> dd_real
inline

Cast to dd_real.

Definition at line 89 of file scalar_imp.h.

◆ to_scalar_t() [6/17]

auto glucat::numeric_traits< dd_real >::to_scalar_t ( const long double & val) -> dd_real
inline

Cast to dd_real.

Definition at line 89 of file scalar_imp.h.

◆ to_scalar_t() [7/17]

auto glucat::numeric_traits< qd_real >::to_scalar_t ( const long double & val) -> qd_real
inline

Cast to qd_real.

Definition at line 107 of file scalar_imp.h.

◆ to_scalar_t() [8/17]

auto glucat::numeric_traits< qd_real >::to_scalar_t ( const long double & val) -> qd_real
inline

Cast to qd_real.

Definition at line 107 of file scalar_imp.h.

◆ to_scalar_t() [9/17]

static auto glucat::numeric_traits< double >::to_scalar_t ( const Other_Scalar_T & val) -> double
inlinestatic

Cast to Scalar_T.

Definition at line 141 of file scalar.h.

◆ to_scalar_t() [10/17]

auto glucat::numeric_traits< double >::to_scalar_t ( const Other_Scalar_T & val) -> double
inline

Cast to double.

Definition at line 61 of file scalar_imp.h.

References glucat::numeric_traits< Scalar_T >::to_double().

◆ to_scalar_t() [11/17]

auto glucat::numeric_traits< double >::to_scalar_t ( const Other_Scalar_T & val) -> double
inline

Cast to double.

Definition at line 61 of file scalar_imp.h.

◆ to_scalar_t() [12/17]

auto glucat::numeric_traits< float >::to_scalar_t ( const Other_Scalar_T & val) -> float
inline

Extra traits which extend numeric limits.

Cast to float

Definition at line 52 of file scalar_imp.h.

References glucat::numeric_traits< Scalar_T >::to_double().

◆ to_scalar_t() [13/17]

auto glucat::numeric_traits< float >::to_scalar_t ( const Other_Scalar_T & val) -> float
inline

Extra traits which extend numeric limits.

Cast to float

Definition at line 52 of file scalar_imp.h.

◆ to_scalar_t() [14/17]

auto glucat::numeric_traits< dd_real >::to_scalar_t ( const qd_real & val) -> dd_real
inline

Cast to dd_real.

Definition at line 98 of file scalar_imp.h.

◆ to_scalar_t() [15/17]

auto glucat::numeric_traits< dd_real >::to_scalar_t ( const qd_real & val) -> dd_real
inline

Cast to dd_real.

Definition at line 98 of file scalar_imp.h.

◆ to_scalar_t() [16/17]

auto glucat::numeric_traits< longdouble >::to_scalar_t ( const qd_real & val) -> long double
inline

Cast to long double.

Definition at line 80 of file scalar_imp.h.

◆ to_scalar_t() [17/17]

auto glucat::numeric_traits< longdouble >::to_scalar_t ( const qd_real & val) -> long double
inline

Cast to long double.

Definition at line 80 of file scalar_imp.h.


The documentation for this struct was generated from the following files: