Home | History | Annotate | Line # | Download | only in include
ieeefp.h revision 1.3.2.1
      1  1.3.2.1  jruoho /*	$NetBSD: ieeefp.h,v 1.3.2.1 2011/06/06 09:07:06 jruoho 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.3   joerg #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.3.2.1  jruoho 	FP_RN=FE_TONEAREST,		/* round to nearest representable num */
     24  1.3.2.1  jruoho 	FP_RM=FE_DOWNWARD,		/* round toward negative infinity */
     25  1.3.2.1  jruoho 	FP_RP=FE_UPWARD,		/* round toward positive infinity */
     26  1.3.2.1  jruoho 	FP_RZ=FE_TOWARDZERO		/* round to zero (truncate) */
     27      1.1    fvdl } fp_rnd;
     28      1.1    fvdl 
     29  1.3.2.1  jruoho typedef enum {
     30  1.3.2.1  jruoho 	FP_PS = 0,			/* 24 bit (single-precision) */
     31  1.3.2.1  jruoho 	FP_PRS,				/* reserved */
     32  1.3.2.1  jruoho 	FP_PD,				/* 53 bit (double-precision) */
     33  1.3.2.1  jruoho 	FP_PE				/* 64 bit (extended-precision) */
     34  1.3.2.1  jruoho } fp_prec;
     35  1.3.2.1  jruoho 
     36  1.3.2.1  jruoho 
     37      1.1    fvdl #endif /* _X86_IEEEFP_H_ */
     38