home *** CD-ROM | disk | FTP | other *** search
- #ifndef __float_h
- #define __float_h
-
- #pragma info( none )
- #ifndef __CHKHDR__
- #pragma info( none )
- #endif
- #pragma info( restore )
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /********************************************************************/
- /* <float.h> header file */
- /* */
- /* Licensed Materials - Property of IBM */
- /* */
- /* IBM C Set/2 Beta Version */
- /* Copyright (C) International Business Machines Corp., 1991,1992 */
- /* All rights reserved */
- /* */
- /* US Government Users Restricted Rights - */
- /* Use, duplication, or disclosure restricted */
- /* by GSA ADP Schedule Contract with IBM Corp. */
- /* */
- /********************************************************************/
-
- #define FLT_ROUNDS 1 /* 0, 2 and 3 also available on 80387 */
-
- #define FLT_RADIX 2
-
- #define FLT_MANT_DIG 24
- #define DBL_MANT_DIG 53
- #define LDBL_MANT_DIG 64
-
- #define FLT_DIG 6
- #define DBL_DIG 15
- #define LDBL_DIG 18
-
- #define FLT_MIN_EXP (-125)
- #define DBL_MIN_EXP (-1021)
- #define LDBL_MIN_EXP (-16381)
-
- #define FLT_MIN_10_EXP (-37)
- #define DBL_MIN_10_EXP (-307)
- #define LDBL_MIN_10_EXP (-4931)
-
- #define FLT_MAX_EXP 128
- #define DBL_MAX_EXP 1024
- #define LDBL_MAX_EXP 16384
-
- #define FLT_MAX_10_EXP 38
- #define DBL_MAX_10_EXP 308
- #define LDBL_MAX_10_EXP 4932
-
- #define FLT_MAX 3.402823466e+38F
- #define DBL_MAX 1.7976931348623158e+308
- #define LDBL_MAX 1.18973149535723176502e+4932L
-
- #define FLT_EPSILON 1.192092896e-07F
- #define DBL_EPSILON 2.2204460492503131e-016
- #define LDBL_EPSILON 1.08420217248550443401e-19L
-
- #define FLT_MIN 1.175494351e-38F
- #define DBL_MIN 2.2250738585072014e-308
- #define LDBL_MIN 3.36210314311209350626e-4932L
-
-
- #if defined(__EXTENDED__)
-
- /* 80387 math control information */
-
- /* User Control Word Mask and bit definitions. */
- /* These definitions match the 80387 */
-
- #define MCW_EM 0x003f /* interrupt Exception Masks */
- #define EM_INVALID 0x0001 /* invalid */
- #define EM_DENORMAL 0x0002 /* denormal */
- #define EM_ZERODIVIDE 0x0004 /* zero divide */
- #define EM_OVERFLOW 0x0008 /* overflow */
- #define EM_UNDERFLOW 0x0010 /* underflow */
- #define EM_INEXACT 0x0020 /* inexact (precision) */
-
- #define MCW_IC 0x1000 /* Infinity Control */
- #define IC_AFFINE 0x1000 /* affine */
- #define IC_PROJECTIVE 0x0000 /* projective */
-
- #define MCW_RC 0x0c00 /* Rounding Control */
- #define RC_CHOP 0x0c00 /* chop */
- #define RC_UP 0x0800 /* up */
- #define RC_DOWN 0x0400 /* down */
- #define RC_NEAR 0x0000 /* near */
-
- #define MCW_PC 0x0300 /* Precision Control */
- #define PC_24 0x0000 /* 24 bits */
- #define PC_53 0x0200 /* 53 bits */
- #define PC_64 0x0300 /* 64 bits */
-
- /* initial Control Word value */
-
- #define CW_DEFAULT ( RC_NEAR + PC_64 + EM_DENORMAL + EM_INEXACT )
-
- /* user Status Word bit definitions */
-
- #define SW_INVALID 0x0001 /* invalid */
- #define SW_DENORMAL 0x0002 /* denormal */
- #define SW_ZERODIVIDE 0x0004 /* zero divide */
- #define SW_OVERFLOW 0x0008 /* overflow */
- #define SW_UNDERFLOW 0x0010 /* underflow */
- #define SW_INEXACT 0x0020 /* inexact (precision) */
- #define SW_STACKFAULT 0x0040 /* stack fault (SW_INVALID also set) */
-
- /* stack problems (SW_INVALID and SW_STACKFAULT both set) */
- #define SW_STACKOVERFLOW 0x0200 /* stack overflow */
- /* bit is off for stack underflow */
-
- /* Floating point error signals and return codes */
-
- #define FPE_INTDIV0 0x91 /* integer division by 0 */
- #define FPE_INT_OFLOW 0x92 /* integer overflow */
- #define FPE_BOUND 0x93 /* bounds failure */
- #define FPE_INVALID 0x81
- #define FPE_DENORMAL 0x82
- #define FPE_ZERODIVIDE 0x83
- #define FPE_OVERFLOW 0x84
- #define FPE_UNDERFLOW 0x85
- #define FPE_INEXACT 0x86
-
- #define FPE_STACKOVERFLOW 0x8a
- #define FPE_STACKUNDERFLOW 0x8b
-
- #define FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */
-
- /* function prototypes */
-
- unsigned int _Optlink _clear87( void );
- unsigned int _Optlink _control87( unsigned int, unsigned int );
- void _Optlink _fpreset( void );
- unsigned int _Optlink _status87( void );
-
- #if (!defined( __cplusplus ))
-
- unsigned int _Builtin __clear87 ( void );
- /*
- unsigned int _Builtin __control87( unsigned int, unsigned int );
- */
- unsigned int _Builtin __status87 ( void );
-
- #define _clear87( ) __clear87( )
- /*
- #define _control87( x, y ) __control87( (x), (y) )
- */
- #define _status87( ) __status87( )
-
- #endif
-
- extern const float _fposinfi;
- #define _INFF _fposinfi
- #define _INFINITYF _fposinfi
-
- extern const double _infinity;
- #define _INF _infinity
- #define _INFINITY _infinity
-
- extern const long double _ldposinfi;
- #define _INFL _ldposinfi
- #define _INFINITYL _ldposinfi
-
- extern const float _fposqnan;
- extern const double _dposqnan;
- extern const long double _ldposqnan;
-
- #define _NANF _fposqnan
- #define _NAN _dposqnan
- #define _NANL _ldposqnan
-
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #pragma info( none )
- #ifndef __CHKHDR__
- #pragma info( restore )
- #endif
- #pragma info( restore )
-
- #endif
-