If a C compiler's FP is based on non-IEEE 754, then is such C compiler C standard compliant?
If a C compiler's FP is based on non-IEEE 754, then is such C compiler C standard compliant?
If the implementation says it conforms to IEEE 754/IEC 60559 (__STDC_IEC_559__ is defined), it must do so.
But the C standard does not require that. C11 footnote 356:
- Implementations that do not define
__STDC_IEC_559__are not required to conform to these specifications.
C does not not require for example binary floating point - the minimal requirements include for example that any floating point type must have range of at least 1e-37 to 1e37
As far as the C standard is concerned, the representation used for floating point numbers is unspecified.
Section 6.2.6 covers Representation of Types. In particular, 6.2.6.1p1 states:
The representations of all types are unspecified except as stated in this subclause.
And nowhere in section 6.2.6 are floating point types mentioned. So an implementation may use any representation it chooses, and it is not required to document that decision.