37 #ifdef _USE_MATH_DEFINES
38 #define _MATH_DEFINES_DEFINED
44 constexpr
double CONST_E = 2.7182818284590452354;
47 constexpr
double CONST_LN2 = 0.69314718055994530942;
49 constexpr
double CONST_PI = 3.14159265358979323846;
71 constexpr
long double CONST_El = 2.7182818284590452353602874713526625L;
72 constexpr
long double CONST_LOG2El = 1.4426950408889634073599246810018921L;
73 constexpr
long double CONST_LOG10El = 0.4342944819032518276511289189166051L;
74 constexpr
long double CONST_LN2l = 0.6931471805599453094172321214581766L;
75 constexpr
long double CONST_LN10l = 2.3025850929940456840179914546843642L;
76 constexpr
long double CONST_PIl = 3.1415926535897932384626433832795029L;
77 constexpr
long double CONST_PI_2l =
CONST_PI / 2.0L;
78 constexpr
long double CONST_PI_4l =
CONST_PI / 4.0L;
79 constexpr
long double CONST_PI_8l =
CONST_PI / 8.0L;
80 constexpr
long double CONST_2_PIl = 2.0L /
CONST_PI;
81 constexpr
long double CONST_2_SQRTPIl = 1.1283791670955125738961589031215452L;
82 constexpr
long double CONST_2PIl = 2.0L *
CONST_PI;
83 constexpr
long double CONST_PI_180l =
CONST_PI / 180.0L;
84 constexpr
long double CONST_180_PIl = 180.0L /
CONST_PI;
88 constexpr
long double CONST_SQRT2l = 1.4142135623730950488016887242096981L;
89 constexpr
long double CONST_SQRT1_2l = 0.7071067811865475244008443621048490L;
90 constexpr
long double CONST_SQRT3l = 1.7320508075688772935274463415058724L;
91 constexpr
long double CONST_EULERl = 0.5772156649015328606065120900824024L;
98 return ((value > 0 || value < 0) ? 1 / value : 0);
101 template <
typename T>
104 return (value > 0) ? 1 : ((value < 0) ? -1 : 0);