diff options
Diffstat (limited to 'v4.0/src/TOOLS/BLD/INC/MATH.H')
| -rw-r--r-- | v4.0/src/TOOLS/BLD/INC/MATH.H | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/v4.0/src/TOOLS/BLD/INC/MATH.H b/v4.0/src/TOOLS/BLD/INC/MATH.H new file mode 100644 index 0000000..9c0e701 --- /dev/null +++ b/v4.0/src/TOOLS/BLD/INC/MATH.H | |||
| @@ -0,0 +1,112 @@ | |||
| 1 | /*** | ||
| 2 | *math.h - definitions and declarations for math library | ||
| 3 | * | ||
| 4 | * Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved. | ||
| 5 | * | ||
| 6 | *Purpose: | ||
| 7 | * This file contains constant definitions and external subroutine | ||
| 8 | * declarations for the math subroutine library. | ||
| 9 | * [ANSI/System V] | ||
| 10 | * | ||
| 11 | *******************************************************************************/ | ||
| 12 | |||
| 13 | |||
| 14 | #ifndef NO_EXT_KEYS /* extensions enabled */ | ||
| 15 | #define _CDECL cdecl | ||
| 16 | #else /* extensions not enabled */ | ||
| 17 | #define _CDECL | ||
| 18 | #endif /* NO_EXT_KEYS */ | ||
| 19 | |||
| 20 | |||
| 21 | /* definition of exception struct - this struct is passed to the matherr | ||
| 22 | * routine when a floating point exception is detected | ||
| 23 | */ | ||
| 24 | |||
| 25 | #ifndef _EXCEPTION_DEFINED | ||
| 26 | struct exception { | ||
| 27 | int type; /* exception type - see below */ | ||
| 28 | char *name; /* name of function where error occured */ | ||
| 29 | double arg1; /* first argument to function */ | ||
| 30 | double arg2; /* second argument (if any) to function */ | ||
| 31 | double retval; /* value to be returned by function */ | ||
| 32 | } ; | ||
| 33 | #define _EXCEPTION_DEFINED | ||
| 34 | #endif | ||
| 35 | |||
| 36 | |||
| 37 | /* definition of a complex struct to be used by those who use cabs and | ||
| 38 | * want type checking on their argument | ||
| 39 | */ | ||
| 40 | |||
| 41 | #ifndef _COMPLEX_DEFINED | ||
| 42 | struct complex { | ||
| 43 | double x,y; /* real and imaginary parts */ | ||
| 44 | } ; | ||
| 45 | #define _COMPLEX_DEFINED | ||
| 46 | #endif | ||
| 47 | |||
| 48 | |||
| 49 | /* Constant definitions for the exception type passed in the exception struct | ||
| 50 | */ | ||
| 51 | |||
| 52 | #define DOMAIN 1 /* argument domain error */ | ||
| 53 | #define SING 2 /* argument singularity */ | ||
| 54 | #define OVERFLOW 3 /* overflow range error */ | ||
| 55 | #define UNDERFLOW 4 /* underflow range error */ | ||
| 56 | #define TLOSS 5 /* total loss of precision */ | ||
| 57 | #define PLOSS 6 /* partial loss of precision */ | ||
| 58 | |||
| 59 | #define EDOM 33 | ||
| 60 | #define ERANGE 34 | ||
| 61 | |||
| 62 | |||
| 63 | /* definitions of HUGE and HUGE_VAL - respectively the XENIX and ANSI names | ||
| 64 | * for a value returned in case of error by a number of the floating point | ||
| 65 | * math routines | ||
| 66 | */ | ||
| 67 | |||
| 68 | extern double HUGE; | ||
| 69 | #define HUGE_VAL HUGE | ||
| 70 | |||
| 71 | |||
| 72 | |||
| 73 | /* function prototypes */ | ||
| 74 | |||
| 75 | int _CDECL abs(int); | ||
| 76 | double _CDECL acos(double); | ||
| 77 | double _CDECL asin(double); | ||
| 78 | double _CDECL atan(double); | ||
| 79 | double _CDECL atan2(double, double); | ||
| 80 | double _CDECL atof(const char *); | ||
| 81 | double _CDECL cabs(struct complex); | ||
| 82 | double _CDECL ceil(double); | ||
| 83 | double _CDECL cos(double); | ||
| 84 | double _CDECL cosh(double); | ||
| 85 | int _CDECL dieeetomsbin(double *, double *); | ||
| 86 | int _CDECL dmsbintoieee(double *, double *); | ||
| 87 | double _CDECL exp(double); | ||
| 88 | double _CDECL fabs(double); | ||
| 89 | int _CDECL fieeetomsbin(float *, float *); | ||
| 90 | double _CDECL floor(double); | ||
| 91 | double _CDECL fmod(double, double); | ||
| 92 | int _CDECL fmsbintoieee(float *, float *); | ||
| 93 | double _CDECL frexp(double, int *); | ||
| 94 | double _CDECL hypot(double, double); | ||
| 95 | double _CDECL j0(double); | ||
| 96 | double _CDECL j1(double); | ||
| 97 | double _CDECL jn(int, double); | ||
| 98 | long _CDECL labs(long); | ||
| 99 | double _CDECL ldexp(double, int); | ||
| 100 | double _CDECL log(double); | ||
| 101 | double _CDECL log10(double); | ||
| 102 | int _CDECL matherr(struct exception *); | ||
| 103 | double _CDECL modf(double, double *); | ||
| 104 | double _CDECL pow(double, double); | ||
| 105 | double _CDECL sin(double); | ||
| 106 | double _CDECL sinh(double); | ||
| 107 | double _CDECL sqrt(double); | ||
| 108 | double _CDECL tan(double); | ||
| 109 | double _CDECL tanh(double); | ||
| 110 | double _CDECL y0(double); | ||
| 111 | double _CDECL y1(double); | ||
| 112 | double _CDECL yn(int, double); | ||