HP C/iX Library Reference Manual (30026-90004)
36 Chapter4
HP C/iX Library Header Descriptions
Header File Contents
Limits <limits.h>
The header <limits.h> defines several macros that represent basic C data type limits.
The following macros are defined in this header file:
FLT_DIG, DBL_DIG,
LDBL_DIG
Number of decimal digits,
q
, such that any floating-point number with
q
decimal digits can be rounded into a floating-point number with
p
radix
b
digits and back again without change to the
q
decimal digits.
FLT_EPSILON,
DBL_EPSILON,
LDBL_EPSILON
The difference between 1.0 and the last value greater than 1.0 that is
representable in the given floating-point type.
FLT_MIN_EXP,
DBL_MIN_EXP,
LDBL_MIN_EXP
Minimum negative integer such that 2 raised to that power minus 1 is a
normalized floating-point number.
FLT_MIN, DBL_MIN,
LDBL_MIN
Minimum normalized positive floating-point number.
FLT_MIN_10_EXP,
DBL_MIN_10_EXP,
LDBL_MIN_10_EXP
Minimum negative integers such that 10 raised to that power is in the
range of normalized floating-point numbers.
FLT_MAX_EXP,
DBL_MAX_EXP,
LDBL_MAX_EXP
Maximum integers such that 2 raised to that power minus 1 is a
representable finite floating-point number.
FLT_MAX, DBL_MAX,
LDBL_MAX
Maximum representable finite floating-point number.
FLT_MAX_10_EXP,
DBL_MAX_10_EXP,
LDBL_MAX_10_EXP
Maximum integer such that 10 raised to that power is in the range of
representable floating-point numbers.
Table 4-3. Integral Type Limits <limits.h>
Name Description
CHAR_BIT The number of bits in a char.
CHAR_MAX The maximum value stored in a char.
CHAR_MIN The minimum value stored in a char.
INT_MAX The maximum value stored in an int.
INT_MIN The minimum value stored in an int.
LONG_MAX The maximum value stored in a long.
LONG_MIN The minimum value stored in a long.
MB_LEN_MAX The maximum length of a multibyte character.
Table 4-2. Floating Types <float.h>
Name Description