home *** CD-ROM | disk | FTP | other *** search
- #ifndef __math_h
- #define __math_h
-
- #pragma info( none )
- #ifndef __CHKHDR__
- #pragma info( none )
- #endif
- #pragma info( restore )
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /********************************************************************/
- /* <math.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. */
- /* */
- /********************************************************************/
-
- extern const double _infinity;
- #define HUGE_VAL _infinity
-
- /* function prototypes */
-
- double _Builtin __fabs( double );
- double _Optlink acos( double );
- double _Optlink asin( double );
- double _Optlink atan( double );
- double _Optlink atan2( double, double );
- double _Optlink ceil( double );
- double _Optlink cos( double );
- double _Optlink cosh( double );
- double _Optlink exp( double );
- double _Optlink fabs( double );
- double _Optlink floor( double );
- double _Optlink fmod( double, double );
- double _Optlink frexp( double, int * );
- double _Optlink ldexp( double, int );
- double _Optlink log( double );
- double _Optlink log10( double );
- double _Optlink modf( double, double * );
- double _Optlink pow( double, double );
- double _Optlink sin( double );
- double _Optlink sinh( double );
- double _Optlink sqrt( double );
- double _Optlink tan( double );
- double _Optlink tanh( double );
-
-
- #if (defined( _FP_INLINE ))
-
- double _Builtin __fsin ( double );
- double _Builtin __fcos ( double );
- double _Builtin __fptan ( double );
- double _Builtin __fpatan ( double );
- double _Builtin __facos ( double );
- double _Builtin __fasin ( double );
-
-
- #define sin( x ) __fsin( (x) )
- #define cos( x ) __fcos( (x) )
- #define tan( x ) __fptan( (x) )
- #define atan( x ) __fpatan( (x) )
- #define acos( x ) __facos( (x) )
- #define asin( x ) __fasin( (x) )
-
- #endif
-
-
- #ifndef __cplusplus
- #pragma info( none )
- #define fabs( x ) __fabs( (x) )
- #pragma info( restore )
- #endif
-
- #ifndef __ANSI__
-
- #pragma map( erf, "_erf" )
- #pragma map( erfc, "_erfc" )
- #pragma map( gamma, "_gamma" )
- #pragma map( hypot, "_hypot" )
- #pragma map( j0, "_j0" )
- #pragma map( j1, "_j1" )
- #pragma map( jn, "_jn" )
- #pragma map( y0, "_y0" )
- #pragma map( y1, "_y1" )
- #pragma map( yn, "_yn" )
-
- double _Optlink _erf( double );
- double _Optlink _erfc( double );
- double _Optlink _gamma( double );
- double _Optlink _hypot( double, double );
- double _Optlink _j0( double );
- double _Optlink _j1( double );
- double _Optlink _jn( int, double );
- double _Optlink _y0( double );
- double _Optlink _y1( double );
- double _Optlink _yn( int, double );
- double _Optlink erf( double );
- double _Optlink erfc( double );
- double _Optlink gamma( double );
- double _Optlink hypot( double, double );
- double _Optlink j0( double );
- double _Optlink j1( double );
- double _Optlink jn( int, double );
- double _Optlink y0( double );
- double _Optlink y1( double );
- double _Optlink yn( int, double );
-
- #ifndef __SAA_L2__
- extern const long double _LHUGE_VAL;
- #define _LHUGE _LHUGE_VAL
- #endif
-
- #if defined(__EXTENDED__)
-
- #define HUGE HUGE_VAL
-
- #define DOMAIN 1 /* argument domain error */
- #define SING 2 /* argument singularity */
- #define OVERFLOW 3 /* overflow range error */
- #define UNDERFLOW 4 /* underflow range error */
- #define TLOSS 5 /* total loss of precision */
- #define PLOSS 6 /* partial loss of precision */
- #define UNKNOWN 7 /* unknown error probably caused by */
- /* changing the 80387 control word */
-
- struct exception
- {
- int type; /* exception type - see below */
- char *name; /* name of function where error occured */
- double arg1; /* first argument to function */
- double arg2; /* second argument (if any) to function */
- double retval; /* value to be returned by function */
- };
-
- #if (!defined(__cplusplus) || defined(__C_complex))
- struct complex
- {
- double x,y; /* real and imaginary parts */
- };
-
- double _Optlink cabs( struct complex );
- #endif
-
- /* _matherr is defined by the user */
-
- int _matherr( struct exception * );
- long double _Optlink _atold( const char * );
-
- #pragma info( none )
- #define _cabs( z ) _hypot( z.x, z.y )
- #define cabs( a ) _cab( (a) )
- #pragma info( restore )
-
- #define matherr _matherr
- #endif
-
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #pragma info( none )
- #ifndef __CHKHDR__
- #pragma info( restore )
- #endif
- #pragma info( restore )
-
- #endif
-