#ifndef PBXB64_C17_FENV_H
#define PBXB64_C17_FENV_H

#define FE_ALL_EXCEPT   0
#define FE_DIVBYZERO    1
#define FE_INEXACT      2
#define FE_INVALID      4
#define FE_OVERFLOW     8
#define FE_UNDERFLOW    16

#define FE_DOWNWARD     0
#define FE_TONEAREST    0
#define FE_TOWARDZERO   0
#define FE_UPWARD       0

typedef unsigned int fenv_t;
typedef unsigned int fexcept_t;

int feclearexcept(int excepts);
int fegetexceptflag(fexcept_t *flagp, int excepts);
int feraiseexcept(int excepts);
int fesetexceptflag(const fexcept_t *flagp, int excepts);
int fetestexcept(int excepts);
int fegetround(void);
int fesetround(int round);
int fegetenv(fenv_t *envp);
int feholdexcept(fenv_t *envp);
int fesetenv(const fenv_t *envp);
int feupdateenv(const fenv_t *envp);

#endif
