Reference

header

<cfenv> (fenv.h)

Floating-point environment
This header declares a set of functions and macros to access the floating-point environment, along with specific types.

The floating-point environment maintains a series of status flags and specific control modes. Specific about the contents of the floating-point environment depend on the implementation, but the status flags generally include the floating-point exceptions and their associated information, and the control modes include at least the rounding direction.

Functions


Floating-point exceptions

feclearexcept
Clear floating-point exceptions (function)
feraiseexcept
Raise floating-point exception (function)
fegetexceptflag
Get floating-point exception flags (function)
fesetexceptflag
Set floating-point exception flags (function)

Rounding direction

fegetround
Get rounding direction mode (function)
fesetround
Set rounding direction mode (function)

Entire environment

fegetenv
Get floating-point environment (function)
fesetenv
Set floating-point environment (function)
feholdexcept
Hold floating-point exceptions (function)
feupdateenv
Update floating-point environment (function)

Other

fetestexcept
Test for floating-point exceptions (function)

Types

fenv_t
Floating-point environment type (type)
fexcept_t
Floating-point exceptions type (type)

Macro constants


Floating-point exceptions

FE_DIVBYZERO
Pole error exception (macro)
FE_INEXACT
Inexact result exception (macro)
FE_INVALID
Invalid argument exception (macro)
FE_OVERFLOW
Overflow range error exception (macro)
FE_UNDERFLOW
Underflow range error exception (macro)
FE_ALL_EXCEPT
All exceptions (macro)

Rounding directions

FE_DOWNWARD
Downward rounding direction mode (macro)
FE_TONEAREST
To-nearest rounding direction mode (macro)
FE_TOWARDZERO
Toward-zero rounding direction mode (macro)
FE_UPWARD
Upward rounding direction mode (macro)

Entire evnironment

FE_DFL_ENV
Default environment (macro)

Pragmas

FENV_ACCESS
Access to Floating-point environment (pragma)

AltStyle によって変換されたページ (->オリジナル) /