home *** CD-ROM | disk | FTP | other *** search
- /*_ math.h Thu Apr 16 1987 Modified by: Walter Bright */
- /* Copyright (C) 1985-1987 by Northwest Software */
- /* All Rights Reserved */
-
- #ifndef MATH_H
- #define MATH_H 1
-
- /* Header file to be used when using transcendental functions. */
-
- /***************************
- * Struct used with matherr() when a floating point exception occurs.
- * type DOMAIN,SING,...
- * name pointer to string defining the name of the function
- * that detected the error
- * arg1 first argument to function
- * arg2 second argument (if defined) to function
- * retval default return value
- */
-
- struct exception
- { int type;
- char *name;
- double arg1,arg2,retval;
- };
-
- /***********************
- * Values for exception.type:
- * DOMAIN arguments are out of range for the function
- * SING argument is a singularity
- * OVERFLOW
- * UNDERFLOW
- * TLOSS total loss of significant digits
- * PLOSS partial loss of significant digits
- */
-
- #define DOMAIN 1
- #define SING 2
- #define OVERFLOW 3
- #define UNDERFLOW 4
- #define TLOSS 5
- #define PLOSS 6
-
- /*************************
- * Largest double number.
- */
-
- #define HUGE_VAL 1.797693134862315e+308
- /*#define HUGE_VAL MAXDOUBLE */
-
- /* Constants that the 8087 supports directly */
- #define PI 3.14159265358979323846
- #define LOG2 0.30102999566398119521
- #define LN2 0.6931471805599453094172321
- #define LOG2T 3.32192809488736234787
- #define LOG2E 1.4426950408889634074 /* 1/LN2 */
-
- extern double atof(char *),sin(double),cos(double),
- tan(double),asin(double),acos(double),atan(double),
- atan2(double,double),
- sinh(double),cosh(double),tanh(double),
- frexp(double,int *),ldexp(double,int),
- exp(double),log(double),pow(double,double),
- sqrt(double),hypot(double,double),log10(double),
- modf(double,double *),fabs(double),ceil(double),floor(double),
- fmod(double,double),poly(double,int,double []);
-
- #endif /* MATH_H */
-