Floating point numbers are real numbers that, unlike integers, may contain fractional parts of numbers, like 1.446, -112.972, 3.267e+27.
There are three standard floating point types: float, double and long double.
Just like integers, their sizes are not specified by the standard, it just sets the minimum allowed ranges of the magnitudes and precision for these types.
This table shows the minimum and maximum magnitudes and digits of precision these types must have (in base 10):
There are three standard floating point types: float, double and long double.
Just like integers, their sizes are not specified by the standard, it just sets the minimum allowed ranges of the magnitudes and precision for these types.
This table shows the minimum and maximum magnitudes and digits of precision these types must have (in base 10):
Type
|
Minimum Magnitude
|
Maximum Magnitude
|
Precision
|
float
|
1.0e-37
|
1.0e+37
|
6
|
double
|
1.0e-37
|
1.0e+37
|
10
|
long double
|
1.0e-37
|
1.0e+37
|
10
|
No comments:
Post a Comment