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