1 /* $NetBSD: ieeefp.h,v 1.4 2011/03/26 19:52:20 christos Exp $ */
4 * Written by J.T. Conklin, Apr 6, 1995
11 #include <sys/featuretest.h>
12 #include <machine/fenv.h>
14 typedef int fp_except
;
15 #define FP_X_INV FE_INVALID /* invalid operation exception */
16 #define FP_X_DNML FE_DENORMAL /* denormalization exception */
17 #define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */
18 #define FP_X_OFL FE_OVERFLOW /* overflow exception */
19 #define FP_X_UFL FE_UNDERFLOW /* underflow exception */
20 #define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */
23 FP_RN
=FE_TONEAREST
, /* round to nearest representable num */
24 FP_RM
=FE_DOWNWARD
, /* round toward negative infinity */
25 FP_RP
=FE_UPWARD
, /* round toward positive infinity */
26 FP_RZ
=FE_TOWARDZERO
/* round to zero (truncate) */
30 FP_PS
= 0, /* 24 bit (single-precision) */
31 FP_PRS
, /* reserved */
32 FP_PD
, /* 53 bit (double-precision) */
33 FP_PE
/* 64 bit (extended-precision) */
37 #endif /* _X86_IEEEFP_H_ */