limits(5)
NAME
limits − header files for implementation-specific constants
SYNTAX
#include < limits.h>
#include < float.h>
DESCRIPTION
The header file < limits.h> specifies the sizes of intergral types as required by the proposed ANSI C standard. The header file < float.h> specifies the characteristics of floating types as required by the proposed ANSI C standard. The constants that refer to long doubles that should appear in < float.h> are not specified because MIPS does not implement long doubles.
The file < limits.h> contains the following:
#define CHAR_BIT 8 /* # of bits in a ‘char’ */
#define SCHAR_MIN (-128) /* min integer value of a ‘signed char’ */
#define SCHAR_MAX (+127) /* max integer value of a ‘signed char’ */
#define UCHAR_MAX 255 /* max integer value of ‘unsigned char’ */
#define CHAR_MIN (-128) /* min integer value of a ‘char’ */
#define CHAR_MAX (+127) /* max integer value of a ‘char’ */
#define SHRT_MIN (-32768) /* min decimal value of a ‘short’ */
#define SHRT_MAX (+32767) /* max decimal value of a ‘short’ */
#define USHRT_MAX 65535 /* max decimal value of ‘unsigned short’ */
#define INT_MIN (-2147483648) /* min decimal value of an ‘int’ */
#define INT_MAX (+2147483647) /* max decimal value of a ‘int’ */
#define UINT_MAX 4294967295 /* max decimal value of ‘unsigned int’ */
#define LONG_MIN (-2147483648) /* min decimal value of a ‘long’ */
#define LONG_MAX (+2147483647) /* max decimal value of a ‘long’ */
#define ULONG_MAX 4294967295 /* max decimal value of ‘unsigned long’ */
#define USI_MAX 4294967295 /* max decimal value of ‘unsigned’ */
#define WORD_BIT 32 /* # of bits in a “word” or ‘int’ */
The file < float.h> contains the following:
#define FLT_RADIX 2 /* radix of exponent representation */
#define FLT_ROUNDS 1 /* addition rounds (>0 implementation-defined) */
/* number of base-FLT_RADIX digits in the floating point mantissa */
#define FLT_MANT_DIG 24
#define DBL_MANT_DIG 53
/* minimum positive floating-point number x such
that 1.0 + x ≠ 1.0 */
#define FLT_EPSILON 1.19209290e-07
#define DBL_EPSILON 2.2204460492503131e-16
/* number of decimal digits of precision */
#define FLT_DIG 6
#define DBL_DIG 15
/* minimum negitive integer such that FLT_RADIX raised to that
power minus 1 is a normalized floating point number */
#define FLT_MIN_EXP -125
#define DBL_MIN_EXP -1021
/* minimum normalized positive floating-point number */
#define FLT_MIN 1.17549435e-38
#define DBL_MIN 2.225073858507201e-308
/* minimum negative integer such that 10 raised to that
power is in the range of normalized floating-point numbers */
#define FLT_MIN_10_EXP -37
#define DBL_MIN_10_EXP -307
/* maximum integer such that FLT_RADIX raised to that power
minus 1 is a representable finite floating-point number */
#define FLT_MAX_EXP +128
#define DBL_MAX_EXP +1024
/* maximum representable finite floating-point number */
#define FLT_MAX 3.40282347e+38
#define DBL_MAX 1.797693134862316e+308
/* maximum integer such that 10 raised to that power is
in the range of representable finite floating-point numbers */
#define FLT_MAX_10_EXP 38
#define DBL_MAX_10_EXP 308
File Formats