1*2fa72412Spirofti /* $OpenBSD: ieeefp.h,v 1.3 2011/03/23 16:54:37 pirofti Exp $ */ 257789dfaSart /* 357789dfaSart * Written by J.T. Conklin, Apr 6, 1995 457789dfaSart * Public domain. 557789dfaSart */ 657789dfaSart 7*2fa72412Spirofti #ifndef _MACHINE_IEEEFP_H_ 8*2fa72412Spirofti #define _MACHINE_IEEEFP_H_ 957789dfaSart 1057789dfaSart typedef int fp_except; 1157789dfaSart #define FP_X_IMP 0x01 /* imprecise (loss of precision) */ 1257789dfaSart #define FP_X_DZ 0x02 /* divide-by-zero exception */ 1357789dfaSart #define FP_X_UFL 0x04 /* underflow exception */ 1457789dfaSart #define FP_X_OFL 0x08 /* overflow exception */ 1557789dfaSart #define FP_X_INV 0x10 /* invalid operation exception */ 1657789dfaSart 1757789dfaSart typedef enum { 1857789dfaSart FP_RN=0, /* round to nearest representable number */ 1957789dfaSart FP_RZ=1, /* round to zero (truncate) */ 207eebc2d3Sjason FP_RP=2, /* round toward positive infinity */ 217eebc2d3Sjason FP_RM=3 /* round toward negative infinity */ 2257789dfaSart } fp_rnd; 2357789dfaSart 24*2fa72412Spirofti #endif /* _MACHINE_IEEEFP_H_ */ 25