1 /* $NetBSD: ieeefp.h,v 1.1 2001/01/10 19:02:06 bjh21 Exp $ */
4 * Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995
8 #ifndef _MACHINE_IEEEFP_H_
9 #define _MACHINE_IEEEFP_H_
11 /* FP exception codes */
12 #define FP_EXCEPT_INV 0
13 #define FP_EXCEPT_DZ 1
14 #define FP_EXCEPT_OFL 2
15 #define FP_EXCEPT_UFL 3
16 #define FP_EXCEPT_IMP 4
18 /* Exception type (used by fpsetmask() et al.) */
20 typedef int fp_except;
22 /* Bit defines for fp_except */
24 #define FP_X_INV (1 << FP_EXCEPT_INV) /* invalid operation exception */
25 #define FP_X_DZ (1 << FP_EXCEPT_DZ) /* divide-by-zero exception */
26 #define FP_X_OFL (1 << FP_EXCEPT_OFL) /* overflow exception */
27 #define FP_X_UFL (1 << FP_EXCEPT_UFL) /* underflow exception */
28 #define FP_X_IMP (1 << FP_EXCEPT_IMP) /* imprecise (loss of precision; "inexact") */
33 FP_RN=0, /* round to nearest representable number */
34 FP_RP=1, /* round toward positive infinity */
35 FP_RM=2, /* round toward negative infinity */
36 FP_RZ=3 /* round to zero (truncate) */
43 FP_PS=0, /* 24 bit (single-precision) */
44 FP_PRS, /* reserved */
45 FP_PD, /* 53 bit (double-precision) */
46 FP_PE /* 64 bit (extended-precision) */
49 #define fp_except_t int
51 #endif /* _MACHINE_IEEEFP_H_ */