1 /* $NetBSD: fenv.h,v 1.1 2013/04/23 05:41:12 matt Exp $ */ 2 3 /* 4 * Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995 5 * Public domain. 6 */ 7 8 #ifndef _ARM_FENV_H_ 9 #define _ARM_FENV_H_ 10 11 typedef int fenv_t; 12 typedef int fexcept_t; 13 14 #define FE_INVALID 0x01 /* invalid operation exception */ 15 #define FE_DIVBYZERO 0x02 /* divide-by-zero exception */ 16 #define FE_OVERFLOW 0x04 /* overflow exception */ 17 #define FE_UNDERFLOW 0x08 /* underflow exception */ 18 #define FE_INEXACT 0x10 /* imprecise (loss of precision; "inexact") */ 19 20 #define FE_ALL_EXCEPT 0x1f 21 22 #define FE_TONEAREST 0 /* round to nearest representable number */ 23 #define FE_UPWARD 1 /* round toward positive infinity */ 24 #define FE_DOWNWARD 2 /* round toward negative infinity */ 25 #define FE_TOWARDZERO 3 /* round to zero (truncate) */ 26 27 __BEGIN_DECLS 28 29 /* Default floating-point environment */ 30 extern const fenv_t __fe_dfl_env; 31 #define FE_DFL_ENV (&__fe_dfl_env) 32 33 __END_DECLS 34 35 #endif /* _ARM_FENV_H_ */ 36