No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / x86 / include / ieeefp.h
blobd27db298b9deb452cbd4a1786bb27f3ea8bff957
1 /* $NetBSD: ieeefp.h,v 1.1 2003/02/26 21:26:10 fvdl Exp $ */
3 /*
4 * Written by J.T. Conklin, Apr 6, 1995
5 * Public domain.
6 */
8 #ifndef _X86_IEEEFP_H_
9 #define _X86_IEEEFP_H_
11 #include <sys/featuretest.h>
13 #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)
15 typedef int fenv_t;
16 typedef int fexcept_t;
18 #define FE_INVALID 0x01 /* invalid operation exception */
19 #define FE_DENORMAL 0x02 /* denormalization exception */
20 #define FE_DIVBYZERO 0x04 /* divide-by-zero exception */
21 #define FE_OVERFLOW 0x08 /* underflow exception */
22 #define FE_UNDERFLOW 0x10 /* overflow exception */
23 #define FE_INEXACT 0x20 /* imprecise (loss of precision) */
25 #define FE_ALL_EXCEPT 0x3f
27 #define FE_TONEAREST 0 /* round to nearest representable number */
28 #define FE_DOWNWARD 1 /* round toward negative infinity */
29 #define FE_UPWARD 2 /* round toward positive infinity */
30 #define FE_TOWARDZERO 3 /* round to zero (truncate) */
32 #if !defined(_ISOC99_SOURCE)
34 typedef int fp_except;
35 #define FP_X_INV FE_INVALID /* invalid operation exception */
36 #define FP_X_DNML FE_DENORMAL /* denormalization exception */
37 #define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */
38 #define FP_X_OFL FE_OVERFLOW /* overflow exception */
39 #define FP_X_UFL FE_UNDERFLOW /* underflow exception */
40 #define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */
42 typedef enum {
43 FP_RN=FE_TONEAREST, /* round to nearest representable number */
44 FP_RM=FE_DOWNWARD, /* round toward negative infinity */
45 FP_RP=FE_UPWARD, /* round toward positive infinity */
46 FP_RZ=FE_TOWARDZERO /* round to zero (truncate) */
47 } fp_rnd;
49 #endif /* !_ISOC99_SOURCE */
51 #endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */
53 #endif /* _X86_IEEEFP_H_ */