1 1.7.16.1 skrll /* $NetBSD: ieeefp.h,v 1.7.16.1 2015/12/27 12:09:38 skrll Exp $ */ 2 1.3 perry 3 1.4 simonb /* 4 1.1 jtc * Written by J.T. Conklin, Apr 11, 1995 5 1.1 jtc * Public domain. 6 1.1 jtc */ 7 1.1 jtc 8 1.2 jonathan #ifndef _MIPS_IEEEFP_H_ 9 1.2 jonathan #define _MIPS_IEEEFP_H_ 10 1.1 jtc 11 1.5 matt #include <sys/featuretest.h> 12 1.5 matt 13 1.5 matt #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE) 14 1.5 matt 15 1.7.16.1 skrll #include <mips/fenv.h> 16 1.5 matt 17 1.5 matt #if !defined(_ISOC99_SOURCE) 18 1.5 matt 19 1.7 matt typedef unsigned int fp_except; 20 1.5 matt #define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */ 21 1.5 matt #define FP_X_UFL FE_UNDERFLOW /* underflow exception */ 22 1.5 matt #define FP_X_OFL FE_OVERFLOW /* overflow exception */ 23 1.5 matt #define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */ 24 1.5 matt #define FP_X_INV FE_INVALID /* invalid operation exception */ 25 1.1 jtc 26 1.1 jtc typedef enum { 27 1.5 matt FP_RN=FE_TONEAREST, /* round to nearest representable number */ 28 1.5 matt FP_RZ=FE_TOWARDZERO, /* round to zero (truncate) */ 29 1.5 matt FP_RP=FE_UPWARD, /* round toward positive infinity */ 30 1.5 matt FP_RM=FE_DOWNWARD /* round toward negative infinity */ 31 1.1 jtc } fp_rnd; 32 1.1 jtc 33 1.5 matt #endif /* !_ISOC99_SOURCE */ 34 1.5 matt 35 1.5 matt #endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */ 36 1.5 matt 37 1.2 jonathan #endif /* _MIPS_IEEEFP_H_ */ 38