summaryrefslogtreecommitdiff
path: root/v4.0/src/TOOLS/BLD/INC/MATH.H
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/TOOLS/BLD/INC/MATH.H')
-rw-r--r--v4.0/src/TOOLS/BLD/INC/MATH.H112
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
26struct 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
42struct 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
68extern double HUGE;
69#define HUGE_VAL HUGE
70
71
72
73/* function prototypes */
74
75int _CDECL abs(int);
76double _CDECL acos(double);
77double _CDECL asin(double);
78double _CDECL atan(double);
79double _CDECL atan2(double, double);
80double _CDECL atof(const char *);
81double _CDECL cabs(struct complex);
82double _CDECL ceil(double);
83double _CDECL cos(double);
84double _CDECL cosh(double);
85int _CDECL dieeetomsbin(double *, double *);
86int _CDECL dmsbintoieee(double *, double *);
87double _CDECL exp(double);
88double _CDECL fabs(double);
89int _CDECL fieeetomsbin(float *, float *);
90double _CDECL floor(double);
91double _CDECL fmod(double, double);
92int _CDECL fmsbintoieee(float *, float *);
93double _CDECL frexp(double, int *);
94double _CDECL hypot(double, double);
95double _CDECL j0(double);
96double _CDECL j1(double);
97double _CDECL jn(int, double);
98long _CDECL labs(long);
99double _CDECL ldexp(double, int);
100double _CDECL log(double);
101double _CDECL log10(double);
102int _CDECL matherr(struct exception *);
103double _CDECL modf(double, double *);
104double _CDECL pow(double, double);
105double _CDECL sin(double);
106double _CDECL sinh(double);
107double _CDECL sqrt(double);
108double _CDECL tan(double);
109double _CDECL tanh(double);
110double _CDECL y0(double);
111double _CDECL y1(double);
112double _CDECL yn(int, double);