...
| Wiki Markup |
|---|
The most portable way of determining a floating-point exceptional condition has occurred is to use the floating-point exception facultiesfacilities provided by C99 in {{fenv.h}} \[[ISO/IEC 9899:1999|AA. C References#ISO/IEC 9899-1999]\]. |
...
For information regarding floating-point number conversions, see FLP34-C. Ensure that floating point conversions are within range of the new type.
Although C99 does not require all implementations to support floating-point exceptions. Each exception macro in fenv.h is defined if and only if the corresponding exception is supported. Only implementations that use IEC 60559 (formerly IEEE-754) floating-point arithmetic are required to support all five exceptions defined by C99, they generally exist only on architectures using IEEE-754. Nevertheless, these functions are the most portable solution for handling floating-point exceptions.
...
Operating System | How to handle floating point errors | |||
|---|---|---|---|---|
Linux | Use the C99 floating-point exception functions. | |||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="fd7b10f5c87faf7d-b3838621-4cd6454b-92c99edd-ac95f261cf775ebcaa5c73ba"><ac:plain-text-body><![CDATA[ | Windows | Either use the C99 floating-point exception function or structured exception handling through | AA. C References#MSDN]] | ]]></ac:plain-text-body></ac:structured-macro> |
...