next up previous contents index
Next: Physical constants Up: Header LALConstants.h Previous: Synopsis   Contents   Index

Mathematical constants

[Constant]LAL_REAL4_MANT [Constant]LAL_REAL4_MAX [Constant]LAL_REAL4_MIN [Constant]LAL_REAL4_EPS [Constant]LAL_REAL8_MANT [Constant]LAL_REAL8_MAX [Constant]LAL_REAL8_MIN [Constant]LAL_REAL8_EPS [Constant]LAL_E [Constant]LAL_LOG2E [Constant]LAL_LOG10E [Constant]LAL_LN2 [Constant]LAL_LN10 [Constant]LAL_SQRT2 [Constant]LAL_SQRT1_2 [Constant]LAL_GAMMA [Constant]LAL_PI [Constant]LAL_TWOPI [Constant]LAL_PI_2 [Constant]LAL_PI_4 [Constant]LAL_1_PI [Constant]LAL_2_PI [Constant]LAL_2_SQRTPI [Constant]LAL_PI_180 [Constant]LAL_180_PI

The following constants define the precision and range of floating-point arithmetic in LAL. They are taken from the IEEE standard 754 for binary arithmetic. All numbers are dimensionless.

Name Value Description
LAL_REAL4_MANT 24 Bits in REAL4 mantissa
LAL_REAL4_MAX $3.40282347\times10^{38}$ Largest REAL4
LAL_REAL4_MIN $1.17549435\times10^{-38}$ Smallest positive REAL4
LAL_REAL4_EPS $1.19209290\times10^{-7}$ $2^{-(\mathtt{LAL\_REAL4\_MANT}-1)}$
LAL_REAL8_MANT 53 Bits in REAL8 mantissa
LAL_REAL8_MAX $1.7976931348623157\times10^{308}$ Largest REAL8
LAL_REAL8_MIN $2.2250738585072014\times10^{-308}$ Smallest positive REAL8
LAL_REAL8_EPS $2.2204460492503131\times10^{-16}$ $2^{-(\mathtt{LAL\_REAL8\_MANT}-1)}$

LAL_REAL4_EPS and LAL_REAL8_EPS can be thought of as the difference between 1 and the next representable REAL4 or REAL8 number.





The following are fundamental mathematical constants. They are mostly taken from the GNU C math.h header (with the exception of LAL_TWOPI, which was computed using Maple). All numbers are dimensionless.

Name Value Expression
LAL_E 2.7182818284590452353602874713526625 $e$
LAL_LOG2E 1.4426950408889634073599246810018922 $\log_2 e$
LAL_LOG10E 0.4342944819032518276511289189166051 $\log_{10} e$
LAL_LN2 0.6931471805599453094172321214581766 $\log_e 2$
LAL_LN10 2.3025850929940456840179914546843642 $\log_e 10$
LAL_SQRT2 1.4142135623730950488016887242096981 $\sqrt{2}$
LAL_SQRT1_2 0.7071067811865475244008443621048490 $1/\sqrt{2}$
LAL_GAMMA 0.5772156649015328606065120900824024 $\gamma$
LAL_PI 3.1415926535897932384626433832795029 $\pi$
LAL_TWOPI 6.2831853071795864769252867665590058 $2\pi$
LAL_PI_2 1.5707963267948966192313216916397514 $\pi/2$
LAL_PI_4 0.7853981633974483096156608458198757 $\pi/4$
LAL_1_PI 0.3183098861837906715377675267450287 $1/\pi$
LAL_2_PI 0.6366197723675813430755350534900574 $2/\pi$
LAL_2_SQRTPI 1.1283791670955125738961589031215452 $2/\sqrt{\pi}$
LAL_PI_180 1.7453292519943295769236907684886127$\times10^{-2}$ $\pi/180$
LAL_180_PI 57.295779513082320876798154814105170 $180/\pi$


next up previous contents index
Next: Physical constants Up: Header LALConstants.h Previous: Synopsis   Contents   Index
LAL test account 2003-10-23