Home | History | Annotate | Line # | Download | only in include
ieeefp.h revision 1.2.16.2
      1  1.2.16.1  rmind /*	$NetBSD: ieeefp.h,v 1.2.16.2 2011/04/21 01:41:32 rmind Exp $	*/
      2       1.1   fvdl 
      3       1.1   fvdl /*
      4       1.1   fvdl  * Written by J.T. Conklin, Apr 6, 1995
      5       1.1   fvdl  * Public domain.
      6       1.1   fvdl  */
      7       1.1   fvdl 
      8       1.1   fvdl #ifndef _X86_IEEEFP_H_
      9       1.1   fvdl #define _X86_IEEEFP_H_
     10       1.1   fvdl 
     11       1.2   matt #include <sys/featuretest.h>
     12  1.2.16.1  rmind #include <machine/fenv.h>
     13       1.2   matt 
     14       1.1   fvdl typedef int fp_except;
     15       1.2   matt #define FP_X_INV	FE_INVALID	/* invalid operation exception */
     16       1.2   matt #define FP_X_DNML	FE_DENORMAL	/* denormalization exception */
     17       1.2   matt #define FP_X_DZ		FE_DIVBYZERO	/* divide-by-zero exception */
     18       1.2   matt #define FP_X_OFL	FE_OVERFLOW	/* overflow exception */
     19       1.2   matt #define FP_X_UFL	FE_UNDERFLOW	/* underflow exception */
     20       1.2   matt #define FP_X_IMP	FE_INEXACT	/* imprecise (loss of precision) */
     21       1.1   fvdl 
     22       1.1   fvdl typedef enum {
     23  1.2.16.2  rmind 	FP_RN=FE_TONEAREST,		/* round to nearest representable num */
     24  1.2.16.2  rmind 	FP_RM=FE_DOWNWARD,		/* round toward negative infinity */
     25  1.2.16.2  rmind 	FP_RP=FE_UPWARD,		/* round toward positive infinity */
     26  1.2.16.2  rmind 	FP_RZ=FE_TOWARDZERO		/* round to zero (truncate) */
     27       1.1   fvdl } fp_rnd;
     28       1.1   fvdl 
     29  1.2.16.2  rmind typedef enum {
     30  1.2.16.2  rmind 	FP_PS = 0,			/* 24 bit (single-precision) */
     31  1.2.16.2  rmind 	FP_PRS,				/* reserved */
     32  1.2.16.2  rmind 	FP_PD,				/* 53 bit (double-precision) */
     33  1.2.16.2  rmind 	FP_PE				/* 64 bit (extended-precision) */
     34  1.2.16.2  rmind } fp_prec;
     35  1.2.16.2  rmind 
     36  1.2.16.2  rmind 
     37       1.1   fvdl #endif /* _X86_IEEEFP_H_ */
     38