First of all, you can find the details about the ISO/IEC/IEEE 60559 (or IEEE 754) in Wikipedia:
Floating point standard types
As F. Goncalvez has told you, the macro __STDC_IEC_559__
brings you information about your compiler, if it conform IEEE 754 or not.
In what follows, we
However, you can obtain additional information with the macro FLT_EVAL_METHOD
.
The value of this macro means:
0 All operations and constants are evaluated in the range and precision of the type used.
1 The operations of types float
and double
are evaluated in the range and precision of double
, and long double
goes in your own way...
2 The evaluations of all types are done in the precision and range of long double
.
-1 Indeterminate
Other negative values: Implementation defined (it depends on your compiler).
For example, if FLT_EVAL_METHOD == 2
, and you hold the result of several calculations in a floating point variable x
, then all operations and constants are calculated or processed in the best precition, that is, long double
, but only the final result is rounded to the type that x
has.
This behaviour reduces the immpact of numerical errors.
In order to know details about the floating point types, you have to watch the constant macros provided by the standard header <float.h>
.
For example, see this link:
Çharacteristics of floating point types
In the sad case that your implementation does not conform to the IEEE 754 standard, you can try looking for details in the standard header <float.h>
, if it exists.
Also, you have to read the documentation of your compiler.
For example, the compiler GCC explains what does with floating point:
Stadus of C99 features in GCC