1 //Standard C++ math declarations
7 // Get rid of those macros defined in <math.h> in lieu of real functions.
35 // Forward declaration of a helper function. This really should be
36 // an `exported' forward declaration.
37 template<typename _Tp>
38 _Tp __cmath_power(_Tp, unsigned int);
40 template<typename _Tp>
42 __pow_helper(_Tp __x, int __n)
45 ? _Tp(1)/__cmath_power(__x, -__n)
46 : __cmath_power(__x, __n);
55 { return fabsf(__x); }
59 { return fabsl(__x); }
65 { return acosf(__x); }
69 { return acosl(__x); }
75 { return asinf(__x); }
79 { return asinl(__x); }
85 { return atanf(__x); }
89 { return atanl(__x); }
94 atan2(float __y, float __x)
95 { return atan2f(__y, __x); }
98 atan2(long double __y, long double __x)
99 { return atan2l(__y, __x); }
105 { return ceilf(__x); }
108 ceil(long double __x)
109 { return ceill(__x); }
115 { return cosf(__x); }
119 { return cosl(__x); }
125 { return coshf(__x); }
128 cosh(long double __x)
129 { return coshl(__x); }
135 { return expf(__x); }
139 { return expl(__x); }
145 { return fabsf(__x); }
148 fabs(long double __x)
149 { return fabsl(__x); }
155 { return floorf(__x); }
158 floor(long double __x)
159 { return floorl(__x); }
164 fmod(float __x, float __y)
165 { return fmodf(__x, __y); }
168 fmod(long double __x, long double __y)
169 { return fmodl(__x, __y); }
174 frexp(float __x, int* __exp)
175 { return frexpf(__x, __exp); }
178 frexp(long double __x, int* __exp)
179 { return frexpl(__x, __exp); }
184 ldexp(float __x, int __exp)
185 { return ldexpf(__x, __exp); }
188 ldexp(long double __x, int __exp)
189 { return ldexpl(__x, __exp); }
195 { return logf(__x); }
199 { return logl(__x); }
205 { return log10f(__x); }
208 log10(long double __x)
209 { return log10l(__x); }
214 modf(float __x, float* __iptr)
215 { return modff(__x, __iptr); }
218 modf(long double __x, long double* __iptr)
219 { return modfl(__x, __iptr); }
224 pow(float __x, float __y)
225 { return powf(__x, __y); }
228 pow(long double __x, long double __y)
229 { return powl(__x, __y); }
232 pow(double __x, int __i)
233 { return pow(__x, static_cast<double>(__i)); }
236 pow(float __x, int __n)
237 { return powf(__x, static_cast<float>(__n)); }
240 pow(long double __x, int __n)
241 { return powl(__x, static_cast<long double>(__n)); }
247 { return sinf(__x); }
251 { return sinl(__x); }
257 { return sinhf(__x); }
260 sinh(long double __x)
261 { return sinhl(__x); }
267 { return sqrtf(__x); }
270 sqrt(long double __x)
271 { return sqrtl(__x); }
277 { return tanf(__x); }
281 { return tanl(__x); }
287 { return tanhf(__x); }
290 tanh(long double __x)
291 { return tanhl(__x); }