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