24 #ifndef PPL_fpu_c99_inlines_hh
25 #define PPL_fpu_c99_inlines_hh 1
27 #ifdef PPL_HAVE_FENV_H
32 #define PPL_FPU_TONEAREST FE_TONEAREST
35 #define PPL_FPU_UPWARD FE_UPWARD
38 #define PPL_FPU_DOWNWARD FE_DOWNWARD
41 #define PPL_FPU_TOWARDZERO FE_TOWARDZERO
48 const int old = fegetround();
51 || fesetround(old) != 0) {
52 throw std::logic_error(
"PPL configuration error:"
53 " PPL_CAN_CONTROL_FPU evaluates to true,"
54 " but fesetround() returns nonzero.");
78 #if PPL_CXX_SUPPORTS_IEEE_INEXACT_FLAG
79 feclearexcept(FE_INEXACT);
90 #if PPL_CXX_SUPPORTS_IEEE_INEXACT_FLAG
91 return fetestexcept(FE_INEXACT) != 0 ? 1 : 0;
99 #endif // !defined(PPL_HAVE_FENV_H)
101 #endif // !defined(PPL_fpu_c99_inlines_hh)
fpu_rounding_direction_type
fpu_rounding_control_word_type fpu_save_rounding_direction(fpu_rounding_direction_type dir)
Sets the FPU rounding direction to dir and returns the rounding control word previously in use...
int fpu_check_inexact()
Queries the inexact computation status.
fpu_rounding_direction_type fpu_get_rounding_direction()
Returns the current FPU rounding direction.
void fpu_reset_inexact()
Clears the inexact computation status.
void fpu_restore_rounding_direction(fpu_rounding_control_word_type)
Restores the FPU rounding rounding control word to cw.
The entire library is confined to this namespace.
void fpu_initialize_control_functions()
Initializes the FPU control functions.
void fpu_set_rounding_direction(fpu_rounding_direction_type dir)
Sets the FPU rounding direction to dir.
fpu_rounding_control_word_type