home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
INCLUDE
/
MATH.H
< prev
next >
Wrap
Text File
|
1993-09-17
|
7KB
|
195 lines
#pragma info( none )
#ifndef __CHKHDR__
#pragma info( none )
#endif
#pragma info( restore )
#ifndef __math_h
#define __math_h
#ifdef __cplusplus
extern "C" {
#endif
/********************************************************************/
/* <math.h> header file */
/* */
/* Licensed Materials - Property of IBM */
/* */
/* IBM C/C++ Tools Version 2.01 */
/* Copyright (C) International Business Machines Corp., 1991,1993 */
/* 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 );
double _Builtin __fsqrt ( double );
#ifdef __cplusplus
inline double sin ( double x ) { return __fsin ( x ); }
inline double cos ( double x ) { return __fcos ( x ); }
inline double tan ( double x ) { return __fptan ( x ); }
inline double atan( double x ) { return __fpatan( x ); }
inline double acos( double x ) { return __facos ( x ); }
inline double asin( double x ) { return __fasin ( x ); }
inline double sqrt( double x ) { return __fsqrt ( x ); }
#else
#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) )
#define sqrt( x ) __fsqrt( (x) )
#endif
#endif
#ifdef __cplusplus
inline double fabs( double x ) { return __fabs( x ); }
#else
#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 */
#if (!defined(__cplusplus) || defined(__C_complex))
struct complex
{
double x,y; /* real and imaginary parts */
};
double _Optlink _cabs( struct complex );
#endif
#pragma info( none )
#define _cabs( z ) _hypot( (z).x, (z).y )
#define cabs( a ) _cabs( a )
#pragma info( restore )
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 */
};
/* _matherr is defined by the user */
int _matherr( struct exception * );
int matherr( struct exception * );
#pragma map( matherr, "_matherr" )
long double _Optlink _atold( const char * );
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif
#pragma info( none )
#ifndef __CHKHDR__
#pragma info( restore )
#endif
#pragma info( restore )