1 // ----------------------------------------------------------------------------
3 // ----------------------------------------------------------------------------
4 // Public Domain C Library - http://pdclib.sourceforge.net
5 // This code is Public Domain. Use, modify, and redistribute at will.
6 // ----------------------------------------------------------------------------
7 // Floating-point environment
8 // ----------------------------------------------------------------------------
11 #define __FENV_H __FENV_H
13 // ----------------------------------------------------------------------------
17 #define FE_DIVBYZERO // TODO
18 #define FE_INEXACT // TODO
19 #define FE_INVALID // TODO
20 #define FE_OVERFLOW // TODO
21 #define FE_UNDERFLOW // TODO
22 #define FE_ALL_EXCEPT // TODO
24 #define FE_DOWNWARD // TODO
25 #define FE_TONEAREST // TODO
26 #define FE_TOWARDZERO // TODO
27 #define FE_UPWARD // TODO
29 #define FE_DFL_ENV // TODO
31 // ----------------------------------------------------------------------------
34 typedef fenv_t; // TODO
35 typedef fexcept_t; // TODO
37 // ----------------------------------------------------------------------------
40 int feclearexcept( int exceptions );
41 int fegetexceptflag( fexcept_t * flags, int exceptions );
42 int feraiseexcept( int exceptions );
43 int fesetexceptflag( const fexcept_t * flags, int exceptions );
44 int fetestexcept( int exceptions );
46 int fegetround( void );
47 int fesetround( int mode );
49 int fegetenv( fenv_t * environment );
50 int feholdexcept( fenv_t * environment );
51 int fesetenv( const fenv_t * environment );
52 int feupdateenv( const fenv_t * environment );