Home | History | Annotate | Line # | Download | only in include
ieeefp.h revision 1.8.2.1
      1  1.8.2.1  jdolecek /*	$NetBSD: ieeefp.h,v 1.8.2.1 2017/12/03 11:36:43 jdolecek 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.2.1  jdolecek #include <machine/fenv.h>
     13      1.5      matt 
     14  1.8.2.1  jdolecek #if defined(_NETBSD_SOURCE) && !defined(_ISOC99_SOURCE)
     15      1.5      matt 
     16      1.8  christos typedef unsigned int fp_except;
     17  1.8.2.1  jdolecek #define FP_X_IMP	0x01		/* imprecise (loss of precision) */
     18  1.8.2.1  jdolecek #define FP_X_DZ		0x02		/* divide-by-zero exception */
     19  1.8.2.1  jdolecek #define FP_X_UFL	0x04		/* underflow exception */
     20  1.8.2.1  jdolecek #define FP_X_OFL	0x08		/* overflow exception */
     21  1.8.2.1  jdolecek #define FP_X_INV	0x10		/* invalid operation exception */
     22      1.1       jtc 
     23      1.1       jtc typedef enum {
     24  1.8.2.1  jdolecek     FP_RN=0,			/* round to nearest representable number */
     25  1.8.2.1  jdolecek     FP_RZ=1,			/* round to zero (truncate) */
     26  1.8.2.1  jdolecek     FP_RP=2,			/* round toward positive infinity */
     27  1.8.2.1  jdolecek     FP_RM=3			/* round toward negative infinity */
     28      1.1       jtc } fp_rnd;
     29      1.1       jtc 
     30  1.8.2.1  jdolecek #endif /* _NETBSD_SOURCE || !_ISOC99_SOURCE */
     31      1.5      matt 
     32      1.1       jtc #endif /* _SPARC_IEEEFP_H_ */
     33