FLOAT - characteristics of floating point values.

Usage:

#include <float.h>

Description:

<float.h> defines manifests which describe how a particular machine does floating point arithmetic. The model of a floating point number X uses the following values:

SIGN
is +1 or -1.
BASE
is the base of the exponential representation of X. This is an integer greater than 1.
EXP
is the exponent of X.
EMAX
is the maximum value of an exponent.
EMIN
is the minimum value of an exponent.
PREC
is the precision of X: the number of BASE digits in the mantissa.
DIG1,DIG2,...
are the digits of the mantissa. All of these digits are base BASE.

The value X is equal to the SIGN, times the BASE to the EXP, times the mantissa.

Below we list the manifests defined in <float.h>.

DBL_DIG
the number of decimal digits of precision in a "double" value.
DBL_EPSILON
the smallest positive "double" value that can be added to 1.0 to get a value different from 1.0.
DBL_MANT_DIG
the number of base BASE digits in the mantissa of a "double" value (i.e., the PREC).
DBL_MAX
the largest "double" value.
DBL_MAX_10_EXP
the largest integer such that 10 raised to that power is representable as a "double" value.
DBL_MAX_EXP
the largest integer such that BASE raised to that power minus 1 is representable as a "double" value.
DBL_MIN
the smallest normalized positive "double" value.
DBL_MIN_10_EXP
the smallest negative integer such that 10 raised to the power is still in the range of normalized "double" values.
DBL_MIN_EXP
the smallest negative exponent for a "double" value (i.e., EMIN).
FLT_DIG
the number of decimal digits of precision in a "float" value.
FLT_EPSILON
the smallest positive "float" value that can be added to 1.0F to get a number different from 1.0F.
FLT_MANT_DIG
the number of base BASE digits in the mantissa of a "float" value (i.e., the PREC).
FLT_MAX
the largest "float" value.
FLT_MAX_10_EXP
the largest integer such that 10 raised to that power is representable as a "float" value.
FLT_MAX_EXP
the largest integer such that BASE raised to that power minus 1 is representable as a "float" value.
FLT_MIN
the smallest normalized positive "float" value.
FLT_MIN_10_EXP
the smallest negative integer such that 10 raised to the power is still in the range of normalized "float" values.
FLT_MIN_EXP
the smallest negative exponent for a "float" value (i.e., EMIN).
FLT_RADIX
the BASE of a "float" number.
FLT_ROUNDS
indicates whether addition rounds or truncates. A positive number indicates it rounds; 0 indicates it truncates; -1 indicates the case is indeterminable.
LDBL_DIG
the number of decimal digits of precision in a "long double" value.
LDBL_EPSILON
the smallest positive "long double" value that can be added to 1.0L to get a value different from 1.0L.
LDBL_MANT_DIG
the number of base BASE digits in the mantissa of a "long double" value (i.e., the PREC).
LDBL_MAX
the largest "long double" value.
LDBL_MAX_10_EXP
the largest integer such that 10 raised to that power is representable as a "long double" value.
LDBL_MAX_EXP
the largest integer such that BASE raised to that power minus 1 is representable as a "long double" value.
LDBL_MIN
the smallest normalized positive "long double" value.
LDBL_MIN_10_EXP
the smallest negative integer such that 10 raised to the power is still in the range of normalized "long double" values.
LDBL_MIN_EXP
the smallest negative exponent for a "long double" value (i.e., EMIN).

Copyright © 1996, Thinkage Ltd.