casacore
casacore::Dummy_Constants_class Class Reference

More...

#include <Constants.h>

Detailed Description

Mathematical and numerical constants.

Intended use:

Public interface

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Test programs:
tConstants

Synopsis

The constants and conversion factors are defined here as double precision values. Where single precision calculations are done in a situation where processing speed is of concern, for example within the inner loop of an expensive algorithm, a separate single precision variable should be defined for use within the loop.


Warning: The following list is generated by hand, and may be incomplete; After future revision of ccx2html the real data will be displayed

Floating point limits

flt_min the minimum single precision floating point number,
excluding denormalised numbers
minfloat the minimum single precision floating point number,
including denormalised numbers
dbl_min the minimum double precision floating point number,
excluding denormalised numbers
mindouble the minimum double precision floating point number,
including denormalised numbers
flt_max the maximum single precision floating point number
dbl_max the maximum double precision floating point number
flt_epsilon Minimum single precision floating point number X
such that 1+X does not equal X
dbl_epsilon Minimum double precision floating point number X
such that 1+X does not equal X

Irrationals

Pi and functions thereof

e and functions thereof

ln2 ln(2)
ln10 ln(10)
log2e log2(e)

gamma and functions thereof

Fundamental physical constants (SI units)


Warning: Preserved for legacy reasons only; See QC class for other physical constants;

c velocity of light (m/s)

Numerical conversion factors

yotta e+24 (Y)
zetta e+21 (Z)
exa e+18 (E)
peta e+15 (P)
tera e+12 (T)
giga e+09 (G)
mega e+06 (M)
kilo e+03 (k)
hecto e+02 (h)
deka e+01 (da)
deci e-01 (d)
centi e-02 (c)
milli e-03 (m)
micro e-06 (u)
nano e-09 (n)
pico e-12 (p)
femto e-15 (f)
atto e-18 (a)
zepto e-21 (z)
yocto e-24 (y)

Angular measure

Solid angular measure

Time interval

Machine constants

Implementation-defined limits usually defined in <limits.h>, <float.h>, and <values.h> as preprocessor defines. They are Inclusion of <casa/BasicSL/Constants.h is sufficient to ensure that they are defined for any particular implementation, and the correct functioning of the tConstants test program guarantees this.

In future use will be made of the (standard) numeric_limits template from the <limits> include file.

Refer to Section 3.2c, pp28-30 of
"The Annotated C++ Reference Manual",
Ellis, M.A., and Stroustrup, B.,
Addison-Wesley Publishing Company, 1990.
IBSN 0-201-51459-1.
and
Appendix B11, pp257-8 of
"The C Programming Language", 2nd ed.,
Kernighan, B.W., and Ritchie, D.M.,
Prentice Hall Software Series, 1988.
IBSN 0-13-110362-8.

Constants defined in limits.h

(these are part of the ANSI C and hence POSIX standards). Acceptable limits defined by the standard are quoted.

CHAR_BIT 8 Maximum bits in a byte.
CHAR_MIN 0 or Minimum value of 'char'.
SCHAR_MIN
CHAR_MAX UCHAR_MAX or Maximum value of 'char'.
SCHAR_MAX
SCHAR_MIN -127 Minimum value of 'signed char'.
SCHAR_MAX +127 Maximum value of 'signed char'.
UCHAR_MAX 255 Maximum value of 'unsigned char'.
MB_LEN_MAX Maximum bytes in multibyte character.
SHRT_MIN -32767 Minimum value of 'short'.
SHRT_MAX +32767 Maximum value of 'short'.
USHRT_MAX 65535 Maximum value of 'unsigned short'.
INT_MIN -32767 Minimum value of 'int'.
INT_MAX +32767 Maximum value of 'int'.
UINT_MAX 65535 Maximum value of 'unsigned int'.
LONG_MIN -2147483647 Minimum value of 'long'.
LONG_MAX +2147483647 Maximum value of 'long'.
ULONG_MAX 4294967295 Maximum value of 'unsigned long'.

Constants defined in float.h

(these are part of the ANSI C and hence POSIX standards). Acceptable limits defined by the standard are quoted.

FLT_RADIX 2 Radix of exponent representation.
FLT_ROUNDS Floating point rounding mode for addition
-1: indeterminate
0: towards zero
1: to nearest
2: toward +infinity
3: toward -infinity
FLT_MIN_EXP Minimum negative integer N such that FLT_RADIX
DBL_MIN_EXP raised to the Nth minus 1 is a normalized
LDBL_MIN_EXP floating point number.
FLT_MAX_EXP Maximum integer N such that FLT_RADIX raised to
DBL_MAX_EXP the Nth minus 1 is representable.
LDBL_MAX_EXP
FLT_MIN_10_EXP -37 Minimum negative integer N such that 10 raised
DBL_MIN_10_EXP -37 to the Nth is in the range of normalized
LDBL_MIN_10_EXP -37 floating point numbers.
FLT_MAX_10_EXP 37 Maximum integer N such that 10 raised to the
DBL_MAX_10_EXP 37 Nth minus 1 is representable.
LDBL_MAX_10_EXP 37
FLT_MANT_DIG Number of base FLT_RADIX digits in mantissa.
DBL_MANT_DIG
LDBL_MANT_DIG
FLT_DIG 6 Decimal digits of precision.
DBL_DIG 10
LDBL_DIG 10
FLT_EPSILON 1E-5 Minimum floating point number X such that
(use C::flt_epsilon in preference to this)
DBL_EPSILON 1E-9 1.0 + X does not equal 1.0.
(use C::dbl_epsilon in preference to this)
LDBL_EPSILON 1E-9
FLT_MIN 1E-37 Minimum normalized positive floating point
(use C::flt_min in preference to this)
DBL_MIN 1E-37 number
(use C::dbl_min in preference to this)
LDBL_MIN 1E-37
FLT_MAX 1E+37 Maximum representable floating point number.
(use C::flt_max in preference to this)
DBL_MAX 1E+37
(use C::dbl_max in preference to this)
LDBL_MAX 1E+37

Constants defined in values.h

(not part of the POSIX standard).
Warning: These constants will disappear in the near future; Do not use them in new code;

HIBITS Value of a short integer with only the high-order
bit set (in most implementations, 0x8000).
HIBITL Value of a long integer with only the high-order
bit set (in most implementations, 0x80000000).
MAXSHORT Maximum value of a signed short integer (in most
implementations, 0x7FFF = 32767).
MAXLONG Maximum value of a signed long integer (in most
implementations, 0x7FFFFFFF = 2147483647).
MAXINT Maximum value of a signed regular integer (usually
the same as MAXSHORT or MAXLONG).
MINFLOAT Minimum positive value of a single-precision
floating-point number (use C::minfloat in preference
to this)
MINDOUBLE Minimum positive value of a double-precision
floating-point number (use C::mindouble in preference
to this)
MAXFLOAT Maximum value of a single-precision floating-point number
MAXDOUBLE Maximum value of a double-precision floating-point number
FSIGNIF Number of significant bits in the mantissa of a
single-precision floating-point number.
DSIGNIF Number of significant bits in the mantissa of a
double-precision floating-point number.


Tip: Once cxx2html accepts the namespace type, the Dummy_Constants_Class can be removed;
Anyway, to use a constant (e;g; pi) use the C::pi construct now and later;

Definition at line 350 of file Constants.h.


The documentation for this class was generated from the following file:
casacore::C::peta
const Double peta
e+15 (P)
casacore::C::flt_max
const Double flt_max
the maximum single precision floating point number
casacore::C::log10e
const Double log10e
log10(e)
casacore::C::mindouble
const Double mindouble
the minimum double precision floating point number, including denormalised numbers
casacore::C::steradian
const Double steradian
Solid angular measure:
casacore::C::milli
const Double milli
e-03 (m)
casacore::C::arcsec
const Double arcsec
arcsecond
casacore::C::ln2
const Double ln2
ln(2)
casacore::C::zepto
const Double zepto
e-21 (z)
casacore::C::kilo
const Double kilo
e+03 (k)
casacore::C::yocto
const Double yocto
e-24 (y)
casacore::log10
LatticeExprNode log10(const LatticeExprNode &expr)
casacore::C::_1_sqrt2
const Double _1_sqrt2
1/sqrt(2)
casacore::C::flt_epsilon
const Double flt_epsilon
Minimum single precision floating point number X such that 1+X does not equal X.
casacore::C::hour
const Double hour
hour
casacore::C::degree
const Double degree
degree
casacore::C::sqrt2
const Double sqrt2
Mathematical constants.
casacore::C::dbl_min
const Double dbl_min
the minimum double precision floating point number, excluding denormalised numbers
casacore::C::giga
const Double giga
e+09 (G)
casacore::C::sphere
const Double sphere
sphere
casacore::C::deci
const Double deci
e-01 (d)
casacore::C::radian
const Double radian
Angular measure:
casacore::sqrt
LatticeExprNode sqrt(const LatticeExprNode &expr)
casacore::square
TableExprNode square(const TableExprNode &node)
Definition: ExprNode.h:1303
casacore::C::femto
const Double femto
e-15 (f)
casacore::C::gamma
const Double gamma
gamma and functions thereof:
casacore::C::pi_2
const Double pi_2
pi/2
casacore::C::pi
const Double pi
Pi and functions thereof:
casacore::C::square_arcmin
const Double square_arcmin
square arcminute
casacore::C::_1_pi
const Double _1_pi
1/pi
casacore::C::_1_sqrt3
const Double _1_sqrt3
1/sqrt(3)
casacore::C::deka
const Double deka
e+01 (da)
casacore::C::dbl_max
const Double dbl_max
the maximum double precision floating point number
casacore::C::minute
const Double minute
minute
casacore::value
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
casacore::C::_2pi
const Double _2pi
2*pi
casacore::C::lngamma
const Double lngamma
ln(gamma)
casacore::C::_2_pi
const Double _2_pi
2/pi
casacore::C::mega
const Double mega
e+06 (M)
casacore::C::_1_sqrtpi
const Double _1_sqrtpi
1/sqrt(pi)
casacore::C::zetta
const Double zetta
e+21 (Z)
casacore::C::exa
const Double exa
e+18 (E)
casacore::C::etogamma
const Double etogamma
e**gamma
casacore::C::tera
const Double tera
e+12 (T)
casacore::C::hecto
const Double hecto
e+02 (h)
casacore::C::sqrt3
const Double sqrt3
sqrt(3)
casacore::C::square_arcsec
const Double square_arcsec
square arcsecond
casacore::C::second
const Double second
Time interval [T]:
casacore::C::minfloat
const Double minfloat
the minimum single precision floating point number, including denormalised numbers
casacore::C::c
const Double c
Fundamental physical constants (SI units):
casacore::C::log2e
const Double log2e
log2(e)
casacore::C::yotta
const Double yotta
Numerical conversion factors.
casacore::C::centi
const Double centi
e-02 (c)
casacore::C::atto
const Double atto
e-18 (a)
casacore::C::e
const Double e
e and functions thereof:
casacore::C::pico
const Double pico
e-12 (p)
casacore::C::arcmin
const Double arcmin
arcminute
casacore::C::square_degree
const Double square_degree
square degree
casacore::C::ln10
const Double ln10
ln(10)
casacore::C::flt_min
const Double flt_min
Machine constants.
casacore::C::dbl_epsilon
const Double dbl_epsilon
Minimum double precision floating point number X such that 1+X does not equal X.
N
uInt N
Axis number.
Definition: ArrayAccessor.h:60
casacore::C::micro
const Double micro
e-06 (u)
casacore::C::_2_sqrtpi
const Double _2_sqrtpi
2/sqrt(pi)
casacore::C::pi_4
const Double pi_4
pi/4
casacore::C::circle
const Double circle
circle
casacore::day
TableExprNode day(const TableExprNode &node)
Definition: ExprNode.h:1480
casacore::integer
TableExprNode integer(const TableExprNode &node)
Convert double, bool, or string to int (using floor).
Definition: ExprNode.h:1385
casacore::C::nano
const Double nano
e-09 (n)