xref: /netbsd-src/sys/arch/hppa/include/ieeefp.h (revision 4cc5b607682ceca71f6228ea9e6d734ead006129)
1 /*	$NetBSD: ieeefp.h,v 1.8 2019/04/16 12:25:17 skrll Exp $	*/
2 
3 /*
4  * Written by J.T. Conklin, Apr 6, 1995
5  * Public domain.
6  */
7 
8 #ifndef _HPPA_IEEEFP_H_
9 #define _HPPA_IEEEFP_H_
10 
11 #include <sys/featuretest.h>
12 
13 #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)
14 
15 #if !defined(_ISOC99_SOURCE)
16 
17 typedef int fp_except;
18 #define FP_X_INV	0x10		/* invalid operation exception */
19 #define FP_X_DZ		0x08		/* divide-by-zero exception */
20 #define FP_X_OFL	0x04		/* overflow exception */
21 #define FP_X_UFL	0x02		/* underflow exception */
22 #define FP_X_IMP	0x01		/* imprecise (loss of precision) */
23 
24 typedef enum {
25     FP_RN=0,			/* round to nearest representable number */
26     FP_RZ=1,			/* round to zero (truncate) */
27     FP_RP=2,			/* round toward positive infinity */
28     FP_RM=3			/* round toward negative infinity */
29 } fp_rnd;
30 
31 #endif /* !_ISOC99_SOURCE */
32 
33 #endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */
34 
35 #endif /* _HPPA_IEEEFP_H_ */
36