Home | History | Annotate | Line # | Download | only in include
ieeefp.h revision 1.5
      1  1.5  christos /* $NetBSD: ieeefp.h,v 1.5 2016/08/25 12:19:42 christos Exp $ */
      2  1.1    itojun 
      3  1.1    itojun /*
      4  1.1    itojun  * Written by J.T. Conklin, Apr 6, 1995
      5  1.1    itojun  * Public domain.
      6  1.1    itojun  */
      7  1.1    itojun 
      8  1.1    itojun #ifndef _SH3_IEEEFP_H_
      9  1.3       uch #define	_SH3_IEEEFP_H_
     10  1.1    itojun 
     11  1.4      matt #include <sys/featuretest.h>
     12  1.4      matt 
     13  1.4      matt #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)
     14  1.4      matt 
     15  1.5  christos #include <fenv.h>
     16  1.4      matt 
     17  1.4      matt #if defined(_NETBSD_SOURCE)
     18  1.4      matt 
     19  1.4      matt #define	FP_X_INV	FE_INVALID	/* invalid operation exception */
     20  1.4      matt #define	FP_X_DZ		FE_DIVBYZERO	/* divide-by-zero exception */
     21  1.4      matt #define	FP_X_OFL	FE_OVERFLOW	/* overflow exception */
     22  1.4      matt #define	FP_X_UFL	FE_UNDERFLOW	/* underflow exception */
     23  1.4      matt #define	FP_X_IMP	FE_INEXACT	/* imprecise (loss of precision) */
     24  1.1    itojun 
     25  1.1    itojun typedef enum {
     26  1.4      matt 	FP_RN=FE_TONEAREST,	/* round to nearest representable number */
     27  1.4      matt 	FP_RZ=FE_TOWARDZERO	/* round to zero (truncate) */
     28  1.1    itojun } fp_rnd;
     29  1.1    itojun 
     30  1.4      matt #endif /* !_ISOC99_SOURCE */
     31  1.4      matt 
     32  1.4      matt #endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */
     33  1.4      matt 
     34  1.2       uch #endif /* !_SH3_IEEEFP_H_ */
     35