Create the AHCI branch for Aman's work
[reactos.git] / sdk / include / c++ / cmath
1 //Standard C++ math declarations
2
3 #pragma once
4 #define _CMATH_
5
6 #include <math.h>
7
8 // Get rid of those macros defined in <math.h> in lieu of real functions.
9 #undef abs
10 #undef div
11 #undef acos
12 #undef asin
13 #undef atan
14 #undef atan2
15 #undef ceil
16 #undef cos
17 #undef cosh
18 #undef exp
19 #undef fabs
20 #undef floor
21 #undef fmod
22 #undef frexp
23 #undef ldexp
24 #undef log
25 #undef log10
26 #undef modf
27 #undef pow
28 #undef sin
29 #undef sinh
30 #undef sqrt
31 #undef tan
32 #undef tanh
33
34 inline double
35 abs(double __x)
36 { return fabs(__x); }
37
38 inline float
39 abs(float __x)
40 { return fabsf(__x); }
41
42 inline long double
43 abs(long double __x)
44 { return fabsl(__x); }
45
46 inline float
47 acos(float __x)
48 { return acosf(__x); }
49
50 inline long double
51 acos(long double __x)
52 { return acosl(__x); }
53
54 inline float
55 asin(float __x)
56 { return asinf(__x); }
57
58 inline long double
59 asin(long double __x)
60 { return asinl(__x); }
61
62 inline float
63 atan(float __x)
64 { return atanf(__x); }
65
66 inline long double
67 atan(long double __x)
68 { return atanl(__x); }
69
70 inline float
71 atan2(float __y, float __x)
72 { return atan2f(__y, __x); }
73
74 inline long double
75 atan2(long double __y, long double __x)
76 { return atan2l(__y, __x); }
77
78 inline float
79 ceil(float __x)
80 { return ceilf(__x); }
81
82 inline long double
83 ceil(long double __x)
84 { return ceill(__x); }
85
86 inline float
87 cos(float __x)
88 { return cosf(__x); }
89
90 inline long double
91 cos(long double __x)
92 { return cosl(__x); }
93
94 inline float
95 cosh(float __x)
96 { return coshf(__x); }
97
98 inline long double
99 cosh(long double __x)
100 { return coshl(__x); }
101
102 inline float
103 exp(float __x)
104 { return expf(__x); }
105
106 inline long double
107 exp(long double __x)
108 { return expl(__x); }
109
110 inline float
111 fabs(float __x)
112 { return fabsf(__x); }
113
114 inline long double
115 fabs(long double __x)
116 { return fabsl(__x); }
117
118 inline float
119 floor(float __x)
120 { return floorf(__x); }
121
122 inline long double
123 floor(long double __x)
124 { return floorl(__x); }
125
126 inline float
127 fmod(float __x, float __y)
128 { return fmodf(__x, __y); }
129
130 inline long double
131 fmod(long double __x, long double __y)
132 { return fmodl(__x, __y); }
133
134 inline float
135 frexp(float __x, int* __exp)
136 { return frexpf(__x, __exp); }
137
138 inline long double
139 frexp(long double __x, int* __exp)
140 { return frexpl(__x, __exp); }
141
142 inline float
143 ldexp(float __x, int __exp)
144 { return ldexpf(__x, __exp); }
145
146 inline long double
147 ldexp(long double __x, int __exp)
148 { return ldexpl(__x, __exp); }
149
150 inline float
151 log(float __x)
152 { return logf(__x); }
153
154 inline long double
155 log(long double __x)
156 { return logl(__x); }
157
158 inline float
159 log10(float __x)
160 { return log10f(__x); }
161
162 inline long double
163 log10(long double __x)
164 { return log10l(__x); }
165
166 inline float
167 modf(float __x, float* __iptr)
168 { return modff(__x, __iptr); }
169
170 inline long double
171 modf(long double __x, long double* __iptr)
172 { return modfl(__x, __iptr); }
173
174 inline float
175 pow(float __x, float __y)
176 { return powf(__x, __y); }
177
178 inline long double
179 pow(long double __x, long double __y)
180 { return powl(__x, __y); }
181
182 inline double
183 pow(double __x, int __i)
184 { return pow(__x, static_cast<double>(__i)); }
185
186 inline float
187 pow(float __x, int __n)
188 { return powf(__x, static_cast<float>(__n)); }
189
190 inline long double
191 pow(long double __x, int __n)
192 { return powl(__x, static_cast<long double>(__n)); }
193
194 inline float
195 sin(float __x)
196 { return sinf(__x); }
197
198 inline long double
199 sin(long double __x)
200 { return sinl(__x); }
201
202 inline float
203 sinh(float __x)
204 { return sinhf(__x); }
205
206 inline long double
207 sinh(long double __x)
208 { return sinhl(__x); }
209
210 inline float
211 sqrt(float __x)
212 { return sqrtf(__x); }
213
214 inline long double
215 sqrt(long double __x)
216 { return sqrtl(__x); }
217
218 inline float
219 tan(float __x)
220 { return tanf(__x); }
221
222 inline long double
223 tan(long double __x)
224 { return tanl(__x); }
225
226 inline float
227 tanh(float __x)
228 { return tanhf(__x); }
229
230 inline long double
231 tanh(long double __x)
232 { return tanhl(__x); }
233
234 namespace std
235 {
236 using ::abs;
237 using ::acos;
238 using ::asin;
239 using ::atan;
240 using ::atan2;
241 using ::ceil;
242 using ::cos;
243 using ::cosh;
244 using ::exp;
245 using ::fabs;
246 using ::floor;
247 using ::fmod;
248 using ::frexp;
249 using ::ldexp;
250 using ::log;
251 using ::log10;
252 using ::modf;
253 using ::pow;
254 using ::sin;
255 using ::sinh;
256 using ::sqrt;
257 using ::tan;
258 using ::tanh;
259 }