1 /* $NetBSD: fenv.h,v 1.3 2015/03/17 12:20:02 joerg Exp $ */
4 * Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995
11 #include <sys/cdefs.h>
13 #ifdef __ARM_PCS_AAPCS64
14 /* AArch64 split FPSCR into two registers FPCR and FPSR */
20 typedef int fenv_t
; /* FPSCR */
22 typedef int fexcept_t
;
24 #define FE_INVALID 0x01 /* invalid operation exception */
25 #define FE_DIVBYZERO 0x02 /* divide-by-zero exception */
26 #define FE_OVERFLOW 0x04 /* overflow exception */
27 #define FE_UNDERFLOW 0x08 /* underflow exception */
28 #define FE_INEXACT 0x10 /* imprecise (loss of precision; "inexact") */
30 #define FE_ALL_EXCEPT 0x1f
32 #define FE_TONEAREST 0 /* round to nearest representable number */
33 #define FE_UPWARD 1 /* round toward positive infinity */
34 #define FE_DOWNWARD 2 /* round toward negative infinity */
35 #define FE_TOWARDZERO 3 /* round to zero (truncate) */
39 /* Default floating-point environment */
40 extern const fenv_t __fe_dfl_env
;
41 #define FE_DFL_ENV (&__fe_dfl_env)
45 #endif /* _ARM_FENV_H_ */