D.4. Limits for floating-point numbers

Table D.4 and Table D.5 give the characteristics, ranges, and limits for floating-point numbers in ARM and Thumb compilers.

Note

When a floating-point number is converted to a shorter floating-point number, it is rounded to the nearest representable number.

The properties of floating-point arithmetic accord with IEEE 754.

Table D.4. Floating-point limits

ConstantMeaningValue
FLT_MAXMaximum value of float3.40282347e+38F
FLT_MINMinimum value of float1.17549435e–38F
DBL_MAXMaximum value of double1.79769313486231571e+308
DBL_MINMinimum value of double2.22507385850720138e–308
LDBL_MAXMaximum value of long double1.79769313486231571e+308
LDBL_MINMinimum value of long double2.22507385850720138e–308
FLT_MAX_EXPMaximum value of base 2 exponent for type float128
FLT_MIN_EXPMinimum value of base 2 exponent for type float–125
DBL_MAX_EXPMaximum value of base 2 exponent for type double1024
DBL_MIN_EXPMinimum value of base 2 exponent for type double–1021
LDBL_MAX_EXPMaximum value of base 2 exponent for type long double1024
LDBL_MIN_EXPMinimum value of base 2 exponent for type long double–1021
FLT_MAX_10_EXPMaximum value of base 10 exponent for type float38
FLT_MIN_10_EXPMinimum value of base 10 exponent for type float–37
DBL_MAX_10_EXPMaximum value of base 10 exponent for type double308
DBL_MIN_10_EXPMinimum value of base 10 exponent for type double–307
LDBL_MAX_10_EXPMaximum value of base 10 exponent for type long double308
LDBL_MIN_10_EXPMinimum value of base 10 exponent for type long double–307

Table D.5. Other floating-point characteristics

ConstantMeaningValue
FLT_RADIXBase (radix) of the ARM floating-point number representation2
FLT_ROUNDSRounding mode for floating-point numbers(nearest) 1
FLT_DIGDecimal digits of precision for float6
DBL_DIGDecimal digits of precision for double15
LDBL_DIGDecimal digits of precision for long double15
FLT_MANT_DIGBinary digits of precision for type float24
DBL_MANT_DIGBinary digits of precision for type double53
LDBL_MANT_DIGBinary digits of precision for type long double53
FLT_EPSILONSmallest positive value of x that 1.0 + x != 1.0 for type float1.19209290e–7F
DBL_EPSILONSmallest positive value of x that 1.0 + x != 1.0 for type double2.2204460492503131e–16
LDBL_EPSILONSmallest positive value of x that 1.0 + x != 1.0 for type long double2.2204460492503131e–16L
Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0067D
Non-Confidential