No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / mips / include / ieeefp.h
blob078d1acf4dbbc124e1b85652a0f9d3ddf8cab81a
1 /* $NetBSD: ieeefp.h,v 1.4 1999/04/24 08:10:35 simonb Exp $ */
3 /*
4 * Written by J.T. Conklin, Apr 11, 1995
5 * Public domain.
6 */
8 #ifndef _MIPS_IEEEFP_H_
9 #define _MIPS_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_INEXACT 0x01 /* imprecise (loss of precision) */
19 #define FE_UNDERFLOW 0x02 /* divide-by-zero exception */
20 #define FE_OVERFLOW 0x04 /* overflow exception */
21 #define FE_DIVBYZERO 0x08 /* underflow exception */
22 #define FE_INVALID 0x10 /* invalid operation exception */
24 #define FE_ALL_EXCEPT 0x1f
26 #define FE_TONEAREST 0 /* round to nearest representable number */
27 #define FE_TOWARDZERO 1 /* round to zero (truncate) */
28 #define FE_UPWARD 2 /* round toward positive infinity */
29 #define FE_DOWNWARD 3 /* round toward negative infinity */
31 #if !defined(_ISOC99_SOURCE)
33 typedef int fp_except;
34 #define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */
35 #define FP_X_UFL FE_UNDERFLOW /* underflow exception */
36 #define FP_X_OFL FE_OVERFLOW /* overflow exception */
37 #define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */
38 #define FP_X_INV FE_INVALID /* invalid operation exception */
40 typedef enum {
41 FP_RN=FE_TONEAREST, /* round to nearest representable number */
42 FP_RZ=FE_TOWARDZERO, /* round to zero (truncate) */
43 FP_RP=FE_UPWARD, /* round toward positive infinity */
44 FP_RM=FE_DOWNWARD /* round toward negative infinity */
45 } fp_rnd;
47 #endif /* !_ISOC99_SOURCE */
49 #endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */
51 #endif /* _MIPS_IEEEFP_H_ */