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