#include <num_math.h>
Collaboration diagram for NUM::FPConst< T >:
Static Public Member Functions | |
const T pi | SCFMinit (3.1415926535897932384626433832795029) |
pi | |
const T div_pi_2 | SCFMinit (1.5707963267948966192313216916397514) |
pi/2 | |
const T div_pi_3 | SCFMinit (1.047197551196597746154214461093168) |
pi/3 | |
const T div_pi_4 | SCFMinit (0.7853981633974483096156608458198757) |
pi/4 | |
const T mul_pi_2 | SCFMinit (6.283185307179586476925286766559006) |
2*pi | |
const T mul_pi_3 | SCFMinit (9.424777960769379715387930149838509) |
3*pi | |
const T mul_pi_4 | SCFMinit (12.56637061435917295385057353311801) |
4*pi | |
const T mul_pi_2_3 | SCFMinit (2.094395102393195492308428922186335) |
2*pi/3 | |
const T div_1_pi | SCFMinit (0.3183098861837906715377675267450287) |
1/pi | |
const T div_2_pi | SCFMinit (0.6366197723675813430755350534900574) |
2/pi | |
const T div_2_sqrt_pi | SCFMinit (1.1283791670955125738961589031215452) |
2/sqrt(pi) | |
const T sqrt_2 | SCFMinit (1.4142135623730950488016887242096981) |
sqrt(2) | |
const T div_1_sqrt_2 | SCFMinit (0.7071067811865475244008443621048490) |
1/sqrt(2) | |
const T e | SCFMinit (2.7182818284590452353602874713526625) |
e | |
const T log2_e | SCFMinit (1.4426950408889634073599246810018921) |
log2(e) | |
const T log10_e | SCFMinit (0.4342944819032518276511289189166051) |
log10(e) | |
const T ln_2 | SCFMinit (0.6931471805599453094172321214581766) |
ln(2) | |
const T ln_10 | SCFMinit (2.3025850929940456840179914546843642) |
ln(e) | |
const T div_1_pow_2_31 | SCFMinit (1.0/2147483648.0) |
1 / 2^31 | |
const T div_1_pow_2_31m1 | SCFMinit (1.0/2147483647.0) |
1 / (2^31-1) | |
const T div_1_pow_2_32 | SCFMinit (1.0/4294967296.0) |
1 / 2^32 | |
const T div_1_pow_2_32m1 | SCFMinit (1.0/4294967295.0) |
1 / (2^32-1) | |
const T div_1_pow_2_53 | SCFMinit (1.0/9007199254740992.0) |
1 / 2^53 | |
const T div_1_pow_2_53m1 | SCFMinit (1.0/9007199254740991.0) |
1 / (2^53-1) | |
Public Attributes | |
T | macheps1 |
Machine epsilon: smallest value with 1.0+macheps1>1.0. | |
T | sqrt_macheps1 |
Square root of the above constant (macheps1). | |
T | macheps1_prec |
Static Public Attributes | |
const T | huge_val = HUGE_VAL |
Positive infinity (if supported) or largest representable value. | |
const T | max_val = DBL_MAX |
Largest (absolute) representable value. Use -max_val for smallest. | |
const T | min_val = DBL_MIN |
Smallest (absolute) representable value which is still larger than zero. |
This template provides all the necessary floating point constants to be used instead of the defines like M_PI.
Definition at line 98 of file num_math.h.
|
1 / (2^53-1)
|
|
1 / 2^53
|
|
1 / (2^32-1)
|
|
1 / 2^32
|
|
1 / (2^31-1)
|
|
1 / 2^31
|
|
ln(e)
|
|
ln(2)
|
|
log10(e)
|
|
log2(e)
|
|
e
|
|
1/sqrt(2)
|
|
sqrt(2)
|
|
2/sqrt(pi)
|
|
2/pi
|
|
1/pi
|
|
2*pi/3
|
|
4*pi
|
|
3*pi
|
|
2*pi
|
|
pi/4
|
|
pi/3
|
|
pi/2
|
|
pi
|
|
Positive infinity (if supported) or largest representable value. Use "-huge_val" for negative analogon. Definition at line 26 of file fpconst.cc. |
|
Machine epsilon: smallest value with 1.0+macheps1>1.0.
Definition at line 101 of file num_math.h. |
|
Precision macheps1: smallest value with 1.0+macheps1_prec>1.0 when vars are in registers. Definition at line 107 of file num_math.h. |
|
Largest (absolute) representable value. Use -max_val for smallest.
Definition at line 29 of file fpconst.cc. |
|
Smallest (absolute) representable value which is still larger than zero.
Definition at line 32 of file fpconst.cc. |
|
Square root of the above constant (macheps1).
Definition at line 103 of file num_math.h. |