home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
ddkx86v1.zip
/
DDKX86
/
H386
/
MATH.H
< prev
next >
Wrap
C/C++ Source or Header
|
1995-04-14
|
4KB
|
128 lines
/*DDK*************************************************************************/
/* */
/* COPYRIGHT (C) Microsoft Corporation, 1989 */
/* COPYRIGHT Copyright (C) 1995 IBM Corporation */
/* */
/* The following IBM OS/2 WARP source code is provided to you solely for */
/* the purpose of assisting you in your development of OS/2 WARP device */
/* drivers. You may use this code in accordance with the IBM License */
/* Agreement provided in the IBM Device Driver Source Kit for OS/2. This */
/* Copyright statement may not be removed. */
/* */
/*****************************************************************************/
/*static char *SCCSID = "@(#)math.h 6.1 90/11/16";*/
/***
*math.h - definitions and declarations for math library
*
*
*Purpose:
* This file contains constant definitions and external subroutine
* declarations for the math subroutine library.
* [ANSI/System V]
*
****/
#ifndef CALLTYPE
#define CALLTYPE _cdecl
#endif /* CALLTYPE */
/* definition of exception struct - this struct is passed to the matherr
* routine when a floating point exception is detected
*/
#ifndef _EXCEPTION_DEFINED
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 */
} ;
#define _EXCEPTION_DEFINED
#endif
/* definition of a complex struct to be used by those who use cabs and
* want type checking on their argument
*/
#ifndef _COMPLEX_DEFINED
struct complex {
double x,y; /* real and imaginary parts */
} ;
#define _COMPLEX_DEFINED
#endif
/* Constant definitions for the exception type passed in the exception struct
*/
#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 EDOM 33
#define ERANGE 34
/* definitions of HUGE and HUGE_VAL - respectively the XENIX and ANSI names
* for a value returned in case of error by a number of the floating point
* math routines
*/
#ifndef _DLL
extern double CALLTYPE HUGE;
#define HUGE_VAL HUGE
#else /* _DLL */
#define HUGE 1.7976931348623158e+308 /* max value */
#define HUGE_VAL 1.7976931348623158e+308 /* max value */
#endif /* _DLL */
/* function prototypes */
int _stdcall abs(int);
double CALLTYPE acos(double);
double CALLTYPE asin(double);
double CALLTYPE atan(double);
double CALLTYPE atan2(double, double);
double CALLTYPE atof(const char *);
double CALLTYPE cabs(struct complex);
double CALLTYPE ceil(double);
double CALLTYPE cos(double);
double CALLTYPE cosh(double);
int CALLTYPE dieeetomsbin(double *, double *);
int CALLTYPE dmsbintoieee(double *, double *);
double CALLTYPE exp(double);
double CALLTYPE fabs(double);
int CALLTYPE fieeetomsbin(float *, float *);
double CALLTYPE floor(double);
double CALLTYPE fmod(double, double);
int CALLTYPE fmsbintoieee(float *, float *);
double CALLTYPE frexp(double, int *);
double CALLTYPE hypot(double, double);
double CALLTYPE j0(double);
double CALLTYPE j1(double);
double CALLTYPE jn(int, double);
long _stdcall labs(long);
double CALLTYPE ldexp(double, int);
double CALLTYPE log(double);
double CALLTYPE log10(double);
int CALLTYPE matherr(struct exception *);
double CALLTYPE modf(double, double *);
double CALLTYPE pow(double, double);
double CALLTYPE sin(double);
double CALLTYPE sinh(double);
double CALLTYPE sqrt(double);
double CALLTYPE tan(double);
double CALLTYPE tanh(double);
double CALLTYPE y0(double);
double CALLTYPE y1(double);
double CALLTYPE yn(int, double);