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