Norme de la stdlib (float.h) :Citation:
Envoyé par Jean-Marc.Bourguet
http://www.di-mgt.com.au/src/CStdLib.html
[EDIT]Citation:
<float.h>
FLT_RADIX
FLT_ROUNDS
FLT_DIG
FLT_EPSILON
smallest number x such that 1.0 + x != 1.0
FLT_MANT_DIG
FLT_MAX
maximum floating-point number
FLT_MAX_EXP
FLT_MIN
minimum normalised floating-point number
FLT_MIN_EXP
DBL_DIG
DBL_EPSILON
DBL_MANT_DIG
DBL_MAX
maximum double floating-point number
DBL_MAX_EXP
DBL_MIN
minimum normalised double floating-point number
DBL_MIN_EXP
et IEEE :
http://www.cs.utah.edu/dept/old/texi...ibrary_28.html
[/EDIT]Citation:
Here is an example showing how the floating type measurements come out for the most common floating point representation, specified by the IEEE Standard for Binary Floating Point Arithmetic (ANSI/IEEE Std 754-1985). Nearly all computers designed since the 1980s use this format.
The IEEE single-precision float representation uses a base of 2. There is a sign bit, a mantissa with 23 bits plus one hidden bit (so the total precision is 24 base-2 digits), and an 8-bit exponent that can represent values in the range -125 to 128, inclusive.
So, for an implementation that uses this representation for the float data type, appropriate values for the corresponding parameters are:
FLT_RADIX 2
FLT_MANT_DIG 24
FLT_DIG 6
FLT_MIN_EXP -125
FLT_MIN_10_EXP -37
FLT_MAX_EXP 128
FLT_MAX_10_EXP +38
FLT_MIN 1.17549435E-38F
FLT_MAX 3.40282347E+38F
FLT_EPSILON 1.19209290E-07F
Here are the values for the double data type:
DBL_MANT_DIG 53
DBL_DIG 15
DBL_MIN_EXP -1021
DBL_MIN_10_EXP -307
DBL_MAX_EXP 1024
DBL_MAX_10_EXP 308
DBL_MAX 1.7976931348623157E+308
DBL_MIN 2.2250738585072014E-308
DBL_EPSILON 2.2204460492503131E-016