Rev 8793 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8687 | turbocat | 1 | /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ |
2 | /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ |
||
3 | /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ |
||
4 | #ifndef _MATH_H_ |
||
5 | #define _MATH_H_ |
||
6 | |||
7 | #include |
||
8 | |||
9 | #ifdef __cplusplus |
||
10 | extern "C" { |
||
11 | #endif |
||
12 | |||
13 | extern double _FUNC(acos)(double _x); |
||
14 | extern double _FUNC(asin)(double _x); |
||
15 | extern double _FUNC(atan)(double _x); |
||
16 | extern double _FUNC(atan2)(double _y, double _x); |
||
17 | extern double _FUNC(ceil)(double _x); |
||
18 | extern double _FUNC(cos)(double _x); |
||
19 | extern double _FUNC(cosh)(double _x); |
||
20 | extern double _FUNC(exp)(double _x); |
||
21 | extern double _FUNC(fabs)(double _x); |
||
22 | extern double _FUNC(floor)(double _x); |
||
23 | extern double _FUNC(fmod)(double _x, double _y); |
||
24 | extern double _FUNC(frexp)(double _x, int *_pexp); |
||
25 | extern double _FUNC(ldexp)(double _x, int _exp); |
||
26 | extern double _FUNC(log)(double _y); |
||
27 | extern double _FUNC(log10)(double _x); |
||
28 | extern double _FUNC(modf)(double _x, double *_pint); |
||
29 | extern double _FUNC(pow)(double _x, double _y); |
||
30 | extern double _FUNC(sin)(double _x); |
||
31 | extern double _FUNC(sinh)(double _x); |
||
32 | extern double _FUNC(sqrt)(double _x); |
||
33 | extern double _FUNC(tan)(double _x); |
||
34 | extern double _FUNC(tanh)(double _x); |
||
35 | |||
36 | #define M_E 2.7182818284590452354 |
||
37 | #define M_LOG2E 1.4426950408889634074 |
||
38 | #define M_LOG10E 0.43429448190325182765 |
||
39 | #define M_LN2 0.69314718055994530942 |
||
40 | #define M_LN10 2.30258509299404568402 |
||
41 | #define M_PI 3.14159265358979323846 |
||
42 | #define M_PI_2 1.57079632679489661923 |
||
43 | #define M_PI_4 0.78539816339744830962 |
||
44 | #define M_1_PI 0.31830988618379067154 |
||
45 | #define M_2_PI 0.63661977236758134308 |
||
46 | #define M_2_SQRTPI 1.12837916709551257390 |
||
47 | #define M_SQRT2 1.41421356237309504880 |
||
48 | #define M_SQRT1_2 0.70710678118654752440 |
||
49 | #define PI M_PI |
||
50 | #define PI2 M_PI_2 |
||
51 | |||
52 | extern double _FUNC(acosh)(double); |
||
53 | extern double _FUNC(asinh)(double); |
||
54 | extern double _FUNC(atanh)(double); |
||
55 | extern double _FUNC(cbrt)(double); |
||
56 | extern double _FUNC(exp10)(double _x); |
||
57 | extern double _FUNC(exp2)(double _x); |
||
58 | extern double _FUNC(expm1)(double); |
||
59 | extern double _FUNC(hypot)(double, double); |
||
60 | extern double _FUNC(log1p)(double); |
||
61 | extern double _FUNC(log2)(double _x); |
||
62 | extern long double _FUNC(modfl)(long double _x, long double *_pint); |
||
63 | extern double _FUNC(pow10)(double _x); |
||
64 | extern double _FUNC(pow2)(double _x); |
||
65 | extern double _FUNC(powi)(double, int); |
||
66 | extern void _FUNC(sincos)(double, double *, double *); |
||
67 | |||
68 | /* These are in libm.a (Cygnus). You must link -lm to get these */ |
||
69 | /* See libm/math.h for comments */ |
||
70 | |||
71 | #ifndef __cplusplus |
||
72 | struct exception { |
||
73 | int type; |
||
74 | const char *name; |
||
75 | double arg1; |
||
76 | double arg2; |
||
77 | double retval; |
||
78 | int err; |
||
79 | }; |
||
80 | #endif |
||
81 | |||
82 | extern double _FUNC(erf)(double); |
||
83 | extern double _FUNC(erfc)(double); |
||
84 | extern double _FUNC(gamma)(double); |
||
85 | extern int _FUNC(isinf)(double); |
||
86 | extern int _FUNC(isnan)(double); |
||
87 | extern int _FUNC(finite)(double); |
||
88 | extern double _FUNC(j0)(double); |
||
89 | extern double _FUNC(j1)(double); |
||
90 | extern double _FUNC(jn)(int, double); |
||
91 | extern double _FUNC(lgamma)(double); |
||
92 | extern double _FUNC(nan)(const char*); |
||
93 | extern double _FUNC(y0)(double); |
||
94 | extern double _FUNC(y1)(double); |
||
95 | extern double _FUNC(yn)(int, double); |
||
96 | extern double _FUNC(logb)(double); |
||
97 | extern double _FUNC(nextafter)(double, double); |
||
98 | extern double _FUNC(remainder)(double, double); |
||
99 | extern double _FUNC(scalb)(double, double); |
||
100 | #ifndef __cplusplus |
||
101 | extern int _FUNC(matherr)(struct exception *); |
||
102 | #endif |
||
103 | extern double _FUNC(significand)(double); |
||
104 | extern double _FUNC(copysign)(double, double); |
||
105 | extern int _FUNC(ilogb)(double); |
||
106 | extern double _FUNC(rint)(double); |
||
107 | extern double _FUNC(scalbn)(double, int); |
||
108 | extern double _FUNC(drem)(double, double); |
||
109 | extern double _FUNC(gamma_r)(double, int *); |
||
110 | extern double _FUNC(lgamma_r)(double, int *); |
||
111 | extern float _FUNC(acosf)(float); |
||
112 | extern float _FUNC(asinf)(float); |
||
113 | extern float _FUNC(atanf)(float); |
||
114 | extern float _FUNC(atan2f)(float, float); |
||
115 | extern float _FUNC(cosf)(float); |
||
116 | extern float _FUNC(sinf)(float); |
||
117 | extern float _FUNC(tanf)(float); |
||
118 | extern float _FUNC(coshf)(float); |
||
119 | extern float _FUNC(sinhf)(float); |
||
120 | extern float _FUNC(tanhf)(float); |
||
121 | extern float _FUNC(expf)(float); |
||
122 | extern float _FUNC(frexpf)(float, int *); |
||
123 | extern float _FUNC(ldexpf)(float, int); |
||
124 | extern float _FUNC(logf)(float); |
||
125 | extern float _FUNC(log10f)(float); |
||
126 | extern float _FUNC(modff)(float, float *); |
||
127 | extern float _FUNC(powf)(float, float); |
||
128 | extern float _FUNC(sqrtf)(float); |
||
129 | extern float _FUNC(ceilf)(float); |
||
130 | extern float _FUNC(fabsf)(float); |
||
131 | extern float _FUNC(floorf)(float); |
||
132 | extern float _FUNC(fmodf)(float, float); |
||
133 | extern float _FUNC(erff)(float); |
||
134 | extern float _FUNC(erfcf)(float); |
||
135 | extern float _FUNC(gammaf)(float); |
||
136 | extern float _FUNC(hypotf)(float, float); |
||
137 | extern int _FUNC(isinff)(float); |
||
138 | extern int _FUNC(isnanf)(float); |
||
139 | extern int _FUNC(finitef)(float); |
||
140 | extern float _FUNC(j0f)(float); |
||
141 | extern float _FUNC(j1f)(float); |
||
142 | extern float _FUNC(jnf)(int, float); |
||
143 | extern float _FUNC(lgammaf)(float); |
||
144 | extern float _FUNC(nanf)(const char*); |
||
145 | extern float _FUNC(y0f)(float); |
||
146 | extern float _FUNC(y1f)(float); |
||
147 | extern float _FUNC(ynf)(int, float); |
||
148 | extern float _FUNC(acoshf)(float); |
||
149 | extern float _FUNC(asinhf)(float); |
||
150 | extern float _FUNC(atanhf)(float); |
||
151 | extern float _FUNC(cbrtf)(float); |
||
152 | extern float _FUNC(logbf)(float); |
||
153 | extern float _FUNC(nextafterf)(float, float); |
||
154 | extern float _FUNC(remainderf)(float, float); |
||
155 | extern float _FUNC(scalbf)(float, float); |
||
156 | extern float _FUNC(significandf)(float); |
||
157 | extern float _FUNC(copysignf)(float, float); |
||
158 | extern int _FUNC(ilogbf)(float); |
||
159 | extern float _FUNC(rintf)(float); |
||
160 | extern float _FUNC(scalbnf)(float, int); |
||
161 | extern float _FUNC(dremf)(float, float); |
||
162 | extern float _FUNC(expm1f)(float); |
||
163 | extern float _FUNC(log1pf)(float); |
||
164 | extern float _FUNC(gammaf_r)(float, int *); |
||
165 | extern float _FUNC(lgammaf_r)(float, int *); |
||
166 | |||
167 | #ifdef __cplusplus |
||
168 | } |
||
169 | #endif |
||
170 | |||
171 | #endif /* _MATH_H_ */ |