No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / arm / include / ieeefp.h
blobd0f1550b8a99e8304af990fa2d1850208a4deb22
1 /* $NetBSD: ieeefp.h,v 1.1 2001/01/10 19:02:06 bjh21 Exp $ */
3 /*
4 * Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995
5 * Public domain.
6 */
8 #ifndef _ARM32_IEEEFP_H_
9 #define _ARM32_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_DIVBYZERO 0x02 /* divide-by-zero exception */
20 #define FE_OVERFLOW 0x04 /* overflow exception */
21 #define FE_UNDERFLOW 0x08 /* underflow exception */
22 #define FE_INEXACT 0x10 /* imprecise (loss of precision; "inexact") */
24 #define FE_ALL_EXCEPT 0x1f
26 #define FE_TONEAREST 0 /* round to nearest representable number */
27 #define FE_UPWARD 1 /* round toward positive infinity */
28 #define FE_DOWNWARD 2 /* round toward negative infinity */
29 #define FE_TOWARDZERO 3 /* round to zero (truncate) */
31 #if !defined(_ISOC99_SOURCE)
33 /* Exception type (used by fpsetmask() et al.) */
35 typedef int fp_except;
37 /* Bit defines for fp_except */
39 #define FP_X_INV FE_INVALID /* invalid operation exception */
40 #define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */
41 #define FP_X_OFL FE_OVERFLOW /* overflow exception */
42 #define FP_X_UFL FE_UNDERFLOW /* underflow exception */
43 #define FP_X_IMP FE_INEXACT /* imprecise (prec. loss; "inexact") */
45 /* Rounding modes */
47 typedef enum {
48 FP_RN=FE_TONEAREST, /* round to nearest representable number */
49 FP_RP=FE_UPWARD, /* round toward positive infinity */
50 FP_RM=FE_DOWNWARD, /* round toward negative infinity */
51 FP_RZ=FE_TOWARDZERO /* round to zero (truncate) */
52 } fp_rnd;
54 #endif /* !_ISOC99_SOURCE */
56 #endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */
58 #endif /* _ARM32_IEEEFP_H_ */