ieeefp.h 739 B

1234567891011121314151617181920212223242526
  1. /* $OpenBSD: ieeefp.h,v 1.5 2011/03/23 16:54:37 pirofti Exp $ */
  2. /*
  3. * Written by J.T. Conklin, Apr 6, 1995
  4. * Public domain.
  5. */
  6. #ifndef _MACHINE_IEEEFP_H_
  7. #define _MACHINE_IEEEFP_H_
  8. typedef int fp_except;
  9. #define FP_X_IMP 0x01 /* imprecise (loss of precision) */
  10. #define FP_X_DZ 0x02 /* divide-by-zero exception */
  11. #define FP_X_UFL 0x04 /* underflow exception */
  12. #define FP_X_OFL 0x08 /* overflow exception */
  13. #define FP_X_INV 0x10 /* invalid operation exception */
  14. typedef enum {
  15. FP_RN=0, /* round to nearest representable number */
  16. FP_RZ=1, /* round to zero (truncate) */
  17. FP_RP=2, /* round toward positive infinity */
  18. FP_RM=3 /* round toward negative infinity */
  19. } fp_rnd;
  20. #endif /* _MACHINE_IEEEFP_H_ */