Home | History | Annotate | Line # | Download | only in include
ieeefp.h revision 1.8.16.2
      1  1.8.16.2     skrll /*	$NetBSD: ieeefp.h,v 1.8.16.2 2017/02/05 13:40:21 skrll Exp $	*/
      2       1.3     perry 
      3       1.2        pk /*
      4       1.1       jtc  * Written by J.T. Conklin, Apr 6, 1995
      5       1.1       jtc  * Public domain.
      6       1.1       jtc  */
      7       1.1       jtc 
      8       1.1       jtc #ifndef _SPARC_IEEEFP_H_
      9       1.1       jtc #define _SPARC_IEEEFP_H_
     10       1.1       jtc 
     11       1.5      matt #include <sys/featuretest.h>
     12  1.8.16.2     skrll #include <machine/fenv.h>
     13       1.5      matt 
     14  1.8.16.2     skrll #if defined(_NETBSD_SOURCE) && !defined(_ISOC99_SOURCE)
     15       1.5      matt 
     16       1.8  christos typedef unsigned int fp_except;
     17  1.8.16.1     skrll #define FP_X_IMP	0x01		/* imprecise (loss of precision) */
     18  1.8.16.1     skrll #define FP_X_DZ		0x02		/* divide-by-zero exception */
     19  1.8.16.1     skrll #define FP_X_UFL	0x04		/* underflow exception */
     20  1.8.16.1     skrll #define FP_X_OFL	0x08		/* overflow exception */
     21  1.8.16.1     skrll #define FP_X_INV	0x10		/* invalid operation exception */
     22       1.1       jtc 
     23       1.1       jtc typedef enum {
     24  1.8.16.1     skrll     FP_RN=0,			/* round to nearest representable number */
     25  1.8.16.1     skrll     FP_RZ=1,			/* round to zero (truncate) */
     26  1.8.16.1     skrll     FP_RP=2,			/* round toward positive infinity */
     27  1.8.16.1     skrll     FP_RM=3			/* round toward negative infinity */
     28       1.1       jtc } fp_rnd;
     29       1.1       jtc 
     30  1.8.16.2     skrll #endif /* _NETBSD_SOURCE || !_ISOC99_SOURCE */
     31       1.5      matt 
     32       1.1       jtc #endif /* _SPARC_IEEEFP_H_ */
     33