Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

NUM::FPConst< T > Struct Template Reference

Floating point constant template class. More...

#include <num_math.h>

Collaboration diagram for NUM::FPConst< T >:

Collaboration graph
[legend]
List of all members.

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

macheps1
 Machine epsilon: smallest value with 1.0+macheps1>1.0.

sqrt_macheps1
 Square root of the above constant (macheps1).

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.


Detailed Description

template<typename T>
struct NUM::FPConst< T >

Floating point constant template class.

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.


Member Function Documentation

template<typename T>
const T div_1_pow_2_53m1 NUM::FPConst< T >::SCFMinit 1.0/9007199254740991.  0  )  [static]
 

1 / (2^53-1)

template<typename T>
const T div_1_pow_2_53 NUM::FPConst< T >::SCFMinit 1.0/9007199254740992.  0  )  [static]
 

1 / 2^53

template<typename T>
const T div_1_pow_2_32m1 NUM::FPConst< T >::SCFMinit 1.0/4294967295.  0  )  [static]
 

1 / (2^32-1)

template<typename T>
const T div_1_pow_2_32 NUM::FPConst< T >::SCFMinit 1.0/4294967296.  0  )  [static]
 

1 / 2^32

template<typename T>
const T div_1_pow_2_31m1 NUM::FPConst< T >::SCFMinit 1.0/2147483647.  0  )  [static]
 

1 / (2^31-1)

template<typename T>
const T div_1_pow_2_31 NUM::FPConst< T >::SCFMinit 1.0/2147483648.  0  )  [static]
 

1 / 2^31

template<typename T>
const T ln_10 NUM::FPConst< T >::SCFMinit 2.  3025850929940456840179914546843642  )  [static]
 

ln(e)

template<typename T>
const T ln_2 NUM::FPConst< T >::SCFMinit 0.  6931471805599453094172321214581766  )  [static]
 

ln(2)

template<typename T>
const T log10_e NUM::FPConst< T >::SCFMinit 0.  4342944819032518276511289189166051  )  [static]
 

log10(e)

template<typename T>
const T log2_e NUM::FPConst< T >::SCFMinit 1.  4426950408889634073599246810018921  )  [static]
 

log2(e)

template<typename T>
const T e NUM::FPConst< T >::SCFMinit 2.  7182818284590452353602874713526625  )  [static]
 

e

template<typename T>
const T div_1_sqrt_2 NUM::FPConst< T >::SCFMinit 0.  7071067811865475244008443621048490  )  [static]
 

1/sqrt(2)

template<typename T>
const T sqrt_2 NUM::FPConst< T >::SCFMinit 1.  4142135623730950488016887242096981  )  [static]
 

sqrt(2)

template<typename T>
const T div_2_sqrt_pi NUM::FPConst< T >::SCFMinit 1.  1283791670955125738961589031215452  )  [static]
 

2/sqrt(pi)

template<typename T>
const T div_2_pi NUM::FPConst< T >::SCFMinit 0.  6366197723675813430755350534900574  )  [static]
 

2/pi

template<typename T>
const T div_1_pi NUM::FPConst< T >::SCFMinit 0.  3183098861837906715377675267450287  )  [static]
 

1/pi

template<typename T>
const T mul_pi_2_3 NUM::FPConst< T >::SCFMinit 2.  094395102393195492308428922186335  )  [static]
 

2*pi/3

template<typename T>
const T mul_pi_4 NUM::FPConst< T >::SCFMinit 12.  56637061435917295385057353311801  )  [static]
 

4*pi

template<typename T>
const T mul_pi_3 NUM::FPConst< T >::SCFMinit 9.  424777960769379715387930149838509  )  [static]
 

3*pi

template<typename T>
const T mul_pi_2 NUM::FPConst< T >::SCFMinit 6.  283185307179586476925286766559006  )  [static]
 

2*pi

template<typename T>
const T div_pi_4 NUM::FPConst< T >::SCFMinit 0.  7853981633974483096156608458198757  )  [static]
 

pi/4

template<typename T>
const T div_pi_3 NUM::FPConst< T >::SCFMinit 1.  047197551196597746154214461093168  )  [static]
 

pi/3

template<typename T>
const T div_pi_2 NUM::FPConst< T >::SCFMinit 1.  5707963267948966192313216916397514  )  [static]
 

pi/2

template<typename T>
const T pi NUM::FPConst< T >::SCFMinit 3.  1415926535897932384626433832795029  )  [static]
 

pi


Member Data Documentation

template<typename T>
const flt NUM::FPConst<>::huge_val = HUGE_VAL [static]
 

Positive infinity (if supported) or largest representable value.

Use "-huge_val" for negative analogon.

Definition at line 26 of file fpconst.cc.

template<typename T>
T NUM::FPConst< T >::macheps1
 

Machine epsilon: smallest value with 1.0+macheps1>1.0.

Definition at line 101 of file num_math.h.

template<typename T>
T NUM::FPConst< T >::macheps1_prec
 

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.

template<typename T>
const flt NUM::FPConst<>::max_val = DBL_MAX [static]
 

Largest (absolute) representable value. Use -max_val for smallest.

Definition at line 29 of file fpconst.cc.

template<typename T>
const flt NUM::FPConst<>::min_val = DBL_MIN [static]
 

Smallest (absolute) representable value which is still larger than zero.

Definition at line 32 of file fpconst.cc.

template<typename T>
T NUM::FPConst< T >::sqrt_macheps1
 

Square root of the above constant (macheps1).

Definition at line 103 of file num_math.h.


The documentation for this struct was generated from the following files:
Generated on Sat Feb 19 22:35:55 2005 for Ray by doxygen 1.3.5