Home | History | Annotate | Line # | Download | only in include
ieeefp.h revision 1.2.8.1
      1  1.2.8.1   jym /*	$NetBSD: ieeefp.h,v 1.2.8.1 2010/10/24 22:48:16 jym 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.8.1   jym #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  matt     FP_RN=FE_TONEAREST,		/* round to nearest representable number */
     24      1.2  matt     FP_RM=FE_DOWNWARD,		/* round toward negative infinity */
     25      1.2  matt     FP_RP=FE_UPWARD,		/* round toward positive infinity */
     26      1.2  matt     FP_RZ=FE_TOWARDZERO		/* round to zero (truncate) */
     27      1.1  fvdl } fp_rnd;
     28      1.1  fvdl 
     29      1.1  fvdl #endif /* _X86_IEEEFP_H_ */
     30