fenv — floating-point environment macros and functions
declares two types and several macros and functions to provide access
to the floating-point environment.
refers collectively to the floating-point status flags and control
floating-point status flag
is a system variable whose value is set (but never cleared) when
a floating-point exception is raised, which occurs
as a side effect of exceptional floating-point
arithmetic to provide auxiliary information.
floating-point control mode
is a system variable whose value may be set by the user to affect the
subsequent behavior of floating-point arithmetic; on HP 9000 and
HP Integrity servers the
control modes include the rounding direction mode,
the gradual/flush-to-zero underflow mode,
and the trap enables.
The following types are defined:
Represents the entire floating-point environment.
Represents the floating-point exception flags collectively.
The following macros represent the floating-point status flags.
They are defined as integral constant expressions with values
such that bitwise ORs of all combinations of the macros result
in distinct values.
The inexact exception.
The division-by-zero exception.
The underflow exception.
The overflow exception.
The invalid operation exception.
The bitwise OR of all exception macros.
The following macros represent the rounding direction modes.
They are defined as integral constant expressions with
distinct nonnegative values.
The round-to-nearest rounding direction mode.
The round-toward-positive-infinity rounding direction mode.
The round-toward-negative-infinity rounding direction mode.
The round-toward-zero rounding direction mode.
The following macro is defined as a pointer to const-qualified
The default floating-point environment.
To the ISO/IEC C99 specified facilities, the HP implementation
adds four HP-specific
: ISO/IEC C99 (including Annex F, "IEC 60559 floating-point arithmetic")