ReactOS 0.4.16-dev-92-g0c2cdca
_cmath.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1999
3 * Boris Fomitchev
4 *
5 * This material is provided "as is", with absolutely no warranty expressed
6 * or implied. Any use is at your own risk.
7 *
8 * Permission to use or copy this software for any purpose is hereby granted
9 * without fee, provided the above notices are retained on all copies.
10 * Permission to modify the code and to distribute modified code is granted,
11 * provided the above notices are retained, and a notice that the code was
12 * modified is included with the above copyright notice.
13 *
14 */
15
16#ifndef _STLP_INTERNAL_CMATH
17#define _STLP_INTERNAL_CMATH
18
19/* gcc do not like when a using directive appear after a function
20 * declaration. cmath have abs overloads and cstdlib a using directive
21 * so cstdlib has to be included first.
22 */
23#if defined (__GNUC__) && defined (_STLP_USE_NEW_C_HEADERS)
24# if defined (_STLP_HAS_INCLUDE_NEXT)
25# include_next <cstdlib>
26# else
27# include _STLP_NATIVE_CPP_C_HEADER(cstdlib)
28# endif
29#endif
30
31#if defined (_STLP_USE_NEW_C_HEADERS)
32# if defined (_STLP_HAS_NO_NAMESPACES) && !defined (exception)
33# define exception __math_exception
34# endif
35# if defined (_STLP_HAS_INCLUDE_NEXT)
36# include_next <cmath>
37# else
38# include _STLP_NATIVE_CPP_C_HEADER(cmath)
39# endif
40# if defined (_STLP_HAS_NO_NAMESPACES)
41# undef exception
42# endif
43#else
44# include <math.h>
45#endif
46
47#if (defined (__SUNPRO_CC) && (__SUNPRO_CC > 0x500)) || \
48 !(defined (__IBMCPP__) && (__IBMCPP__ >= 500) || !(defined(__HP_aCC) && (__HP_aCC >= 30000) ))
49# if !defined(_STLP_HAS_NO_NAMESPACES) && !defined(__SUNPRO_CC)
50// All the other hypot stuff is going to be at file scope, so follow along here.
51namespace std {
52# endif
53extern "C" double hypot(double x, double y);
54# if !defined(_STLP_HAS_NO_NAMESPACES) && !defined(__SUNPRO_CC)
55}
56# endif
57
58#endif
59
60#if defined (__sun) && defined (__GNUC__)
61extern "C" {
62 float __cosf(float v);
63 float __sinf(float v);
64 float __atan2f(float, float);
65 float __coshf(float v);
66 float __sinhf(float v);
67 float __sqrtf(float v);
68 float __expf(float v);
69 float __logf(float v);
70 float __log10f(float v);
71
72 long double __cosl(long double v);
73 long double __sinl(long double v);
74 long double __atan2l(long double, long double);
75 long double __coshl(long double v);
76 long double __sinhl(long double v);
77 long double __sqrtl(long double v);
78 long double __expl(long double v);
79 long double __logl(long double v);
80 long double __log10l(long double v);
81}
82
83extern "C" {
84 inline float cosf(float v) { return __cosf(v); }
85 inline float sinf(float v) { return __sinf(v); }
86 inline float atan2f(float v1, float v2) { return __atan2f(v1,v2); }
87 inline float coshf(float v) { return __coshf(v); }
88 inline float sinhf(float v) { return __sinhf(v); }
89 inline float sqrtf(float v) { return __sqrtf(v); }
90 inline float expf(float v) { return __expf(v); }
91 inline float logf(float v) { return __logf(v); }
92 inline float log10f(float v) { return __log10f(v); }
93
94 inline long double cosl(long double v) { return __cosl(v); }
95 inline long double sinl(long double v) { return __sinl(v); }
96 inline long double atan2l(long double v1, long double v2) { return __atan2l(v1,v2); }
97 inline long double coshl(long double v) { return __coshl(v); }
98 inline long double sinhl(long double v) { return __sinhl(v); }
99 inline long double sqrtl(long double v) { return __sqrtl(v); }
100 inline long double expl(long double v) { return __expl(v); }
101 inline long double logl(long double v) { return __logl(v); }
102 inline long double log10l(long double v) { return __log10l(v); }
103}
104#endif // __sun && __GNUC__
105
106#if defined (__sun)
107extern "C" {
108extern float __acosf(float);
109extern float __asinf(float);
110extern float __atanf(float);
111extern float __atan2f(float, float);
112extern float __ceilf(float);
113extern float __cosf(float);
114extern float __coshf(float);
115extern float __expf(float);
116extern float __fabsf(float);
117extern float __floorf(float);
118extern float __fmodf(float, float);
119extern float __frexpf(float, int *);
120extern float __ldexpf(float, int);
121extern float __logf(float);
122extern float __log10f(float);
123extern float __modff(float, float *);
124extern float __powf(float, float);
125extern float __sinf(float);
126extern float __sinhf(float);
127extern float __sqrtf(float);
128extern float __tanf(float);
129extern float __tanhf(float);
130
131extern long double __acosl(long double);
132extern long double __asinl(long double);
133extern long double __atanl(long double);
134extern long double __atan2l(long double, long double);
135extern long double __ceill(long double);
136extern long double __cosl(long double);
137extern long double __coshl(long double);
138extern long double __expl(long double);
139extern long double __fabsl(long double);
140extern long double __floorl(long double);
141extern long double __fmodl(long double, long double);
142extern long double __frexpl(long double, int *);
143extern long double __ldexpl(long double, int);
144extern long double __logl(long double);
145extern long double __log10l(long double);
146extern long double __modfl(long double, long double *);
147extern long double __powl(long double, long double);
148extern long double __sinl(long double);
149extern long double __sinhl(long double);
150extern long double __sqrtl(long double);
151extern long double __tanl(long double);
152extern long double __tanhl(long double);
153}
154#endif
155
156#if defined (__BORLANDC__)
157# define _STLP_CMATH_FUNC_NAMESPACE _STLP_VENDOR_CSTD
158#else
159# define _STLP_CMATH_FUNC_NAMESPACE
160#endif
161
162#if !defined (__sun) || defined (__GNUC__)
163# define _STLP_MATH_INLINE(float_type, func, cfunc) \
164 inline float_type func (float_type x) { return _STLP_CMATH_FUNC_NAMESPACE::cfunc(x); }
165# define _STLP_MATH_INLINE2(float_type, type, func, cfunc) \
166 inline float_type func (float_type x, type y) { return _STLP_CMATH_FUNC_NAMESPACE::cfunc(x, y); }
167# define _STLP_MATH_INLINE_D(float_type, func, cfunc)
168# define _STLP_MATH_INLINE2_D(float_type, type, func, cfunc)
169#else
170# ifdef __SUNPRO_CC
171# define _STLP_MATH_INLINE(float_type, func, cfunc) \
172 inline float_type func (float_type x) { return _STLP_VENDOR_CSTD::__##cfunc(x); }
173# define _STLP_MATH_INLINE_D(float_type, func, cfunc) \
174 inline float_type func (float_type x) { return _STLP_VENDOR_CSTD::cfunc(x); }
175# define _STLP_MATH_INLINE2(float_type, type, func, cfunc) \
176 inline float_type func (float_type x, type y) { return _STLP_VENDOR_CSTD::__##cfunc(x,y); }
177# define _STLP_MATH_INLINE2_D(float_type, type, func, cfunc) \
178 inline float_type func (float_type x, type y) { return _STLP_VENDOR_CSTD::cfunc(x,y); }
179# else
180# error Unknown compiler for the Sun platform
181# endif
182#endif
183
188#define _STLP_MATH_INLINEX(__type,func,cfunc) \
189 inline __type func (__type x) \
190 { return __STATIC_CAST(__type, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x)); }
191#define _STLP_MATH_INLINE2X(__type1,__type2,func,cfunc) \
192 inline __type1 func (__type1 x, __type2 y) \
193 { return __STATIC_CAST(__type1, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x, y)); }
194#define _STLP_MATH_INLINE2PX(__type,func,cfunc) \
195 inline __type func (__type x, __type *y) { \
196 double tmp1, tmp2; \
197 tmp1 = _STLP_CMATH_FUNC_NAMESPACE::cfunc(__STATIC_CAST(double, x), &tmp2); \
198 *y = __STATIC_CAST(__type, tmp2); \
199 return __STATIC_CAST(__type, tmp1); \
200 }
201#define _STLP_MATH_INLINE2XX(__type,func,cfunc) \
202 inline __type func (__type x, __type y) \
203 { return __STATIC_CAST(__type, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x, (double)y)); }
204
205
228#if !defined (_STLP_NO_LONG_DOUBLE) && !defined (_STLP_NO_VENDOR_MATH_L) && !defined (_STLP_NO_VENDOR_MATH_F)
229 // long double support and both e.g. sinl(long double) and sinf(float)
230 // This is the default for a correct and complete native library.
231# define _STLP_DEF_MATH_INLINE(func,cf) \
232 _STLP_MATH_INLINE(float,func,cf##f) \
233 _STLP_MATH_INLINE_D(double,func,cf) \
234 _STLP_MATH_INLINE(long double,func,cf##l)
235# define _STLP_DEF_MATH_INLINE2(func,cf) \
236 _STLP_MATH_INLINE2(float,float,func,cf##f) \
237 _STLP_MATH_INLINE2_D(double,double,func,cf) \
238 _STLP_MATH_INLINE2(long double,long double,func,cf##l)
239# define _STLP_DEF_MATH_INLINE2P(func,cf) \
240 _STLP_MATH_INLINE2(float,float *,func,cf##f) \
241 _STLP_MATH_INLINE2_D(double,double *,func,cf) \
242 _STLP_MATH_INLINE2(long double,long double *,func,cf##l)
243# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
244 _STLP_MATH_INLINE2(float,int *,func,cf##f) \
245 _STLP_MATH_INLINE2_D(double,int *,func,cf) \
246 _STLP_MATH_INLINE2(long double,int *,func,cf##l)
247# define _STLP_DEF_MATH_INLINE2I(func,cf) \
248 _STLP_MATH_INLINE2(float,int,func,cf##f) \
249 _STLP_MATH_INLINE2_D(double,int,func,cf) \
250 _STLP_MATH_INLINE2(long double,int,func,cf##l)
251#else
252# if !defined (_STLP_NO_LONG_DOUBLE)
253# if !defined (_STLP_NO_VENDOR_MATH_F)
254 // long double support and e.g. sinf(float) but not e.g. sinl(long double)
255# define _STLP_DEF_MATH_INLINE(func,cf) \
256 _STLP_MATH_INLINE(float,func,cf##f) \
257 _STLP_MATH_INLINEX(long double,func,cf)
258# define _STLP_DEF_MATH_INLINE2(func,cf) \
259 _STLP_MATH_INLINE2(float,float,func,cf##f) \
260 _STLP_MATH_INLINE2XX(long double,func,cf)
261# define _STLP_DEF_MATH_INLINE2P(func,cf) \
262 _STLP_MATH_INLINE2(float,float *,func,cf##f) \
263 _STLP_MATH_INLINE2PX(long double,func,cf)
264# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
265 _STLP_MATH_INLINE2(float,int *,func,cf##f) \
266 _STLP_MATH_INLINE2X(long double,int *,func,cf)
267# define _STLP_DEF_MATH_INLINE2I(func,cf) \
268 _STLP_MATH_INLINE2(float,int,func,cf##f) \
269 _STLP_MATH_INLINE2X(long double,int,func,cf)
270# elif !defined (_STLP_NO_VENDOR_MATH_L)
271 // long double support and e.g. sinl(long double) but not e.g. sinf(float)
272# define _STLP_DEF_MATH_INLINE(func,cf) \
273 _STLP_MATH_INLINEX(float,func,cf) \
274 _STLP_MATH_INLINE(long double,func,cf##l)
275# define _STLP_DEF_MATH_INLINE2(func,cf) \
276 _STLP_MATH_INLINE2XX(float,func,cf) \
277 _STLP_MATH_INLINE2(long double,long double,func,cf##l)
278# define _STLP_DEF_MATH_INLINE2P(func,cf) \
279 _STLP_MATH_INLINE2PX(float,func,cf) \
280 _STLP_MATH_INLINE2(long double,long double *,func,cf##l)
281# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
282 _STLP_MATH_INLINE2X(float,int *,func,cf) \
283 _STLP_MATH_INLINE2(long double,int *,func,cf##l)
284# define _STLP_DEF_MATH_INLINE2I(func,cf) \
285 _STLP_MATH_INLINE2X(float,int,func,cf) \
286 _STLP_MATH_INLINE2(long double,int,func,cf##l)
287# else
288# define _STLP_DEF_MATH_INLINE(func,cf) \
289 _STLP_MATH_INLINEX(float,func,cf) \
290 _STLP_MATH_INLINEX(long double,func,cf)
291# define _STLP_DEF_MATH_INLINE2(func,cf) \
292 _STLP_MATH_INLINE2XX(float,func,cf) \
293 _STLP_MATH_INLINE2XX(long double,func,cf)
294# define _STLP_DEF_MATH_INLINE2P(func,cf) \
295 _STLP_MATH_INLINE2PX(float,func,cf) \
296 _STLP_MATH_INLINE2PX(long double,func,cf)
297# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
298 _STLP_MATH_INLINE2X(float,int *,func,cf) \
299 _STLP_MATH_INLINE2X(long double,int *,func,cf)
300# define _STLP_DEF_MATH_INLINE2I(func,cf) \
301 _STLP_MATH_INLINE2X(float,int,func,cf) \
302 _STLP_MATH_INLINE2X(long double,int,func,cf)
303# endif
304# else
305# if !defined (_STLP_NO_VENDOR_MATH_F)
306# define _STLP_DEF_MATH_INLINE(func,cf) \
307 _STLP_MATH_INLINE(float,func,cf##f)
308# define _STLP_DEF_MATH_INLINE2(func,cf) \
309 _STLP_MATH_INLINE2(float,float,func,cf##f)
310# define _STLP_DEF_MATH_INLINE2P(func,cf) \
311 _STLP_MATH_INLINE2(float,float *,func,cf##f)
312# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
313 _STLP_MATH_INLINE2(float,int *,func,cf##f)
314# define _STLP_DEF_MATH_INLINE2I(func,cf) \
315 _STLP_MATH_INLINE2(float,int,func,cf##f)
316# else // _STLP_NO_VENDOR_MATH_F
317 // neither long double support nor e.g. sinf(float) functions
318# define _STLP_DEF_MATH_INLINE(func,cf) \
319 _STLP_MATH_INLINEX(float,func,cf)
320# define _STLP_DEF_MATH_INLINE2(func,cf) \
321 _STLP_MATH_INLINE2XX(float,func,cf)
322# define _STLP_DEF_MATH_INLINE2P(func,cf) \
323 _STLP_MATH_INLINE2PX(float,func,cf)
324# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
325 _STLP_MATH_INLINE2X(float,int *,func,cf)
326# define _STLP_DEF_MATH_INLINE2I(func,cf) \
327 _STLP_MATH_INLINE2X(float,int,func,cf)
328# endif // _STLP_NO_VENDOR_MATH_F
329# endif
330#endif
331
332#if defined (_STLP_WCE) || \
333 (defined(_STLP_MSVC) && (_STLP_MSVC <= 1300) && defined (_MSC_EXTENSIONS) /* && !defined(_STLP_WCE_NET) */)
334/*
335 * dums: VC6 has all the required C++ functions but only define them if
336 * _MSC_EXTENSIONS is not defined (a bug?). STLport just do the same
337 * thing also when _MSC_EXTENSIONS is defined.
338 * TODO: above check (_STLP_MSVC <= 1300) also catches VC7.0, is that intended?
339 */
340//We have to tell the compilers that abs, acos ... math functions are not intrinsic
341//otherwise we have Internal Compiler Error in release mode...
342# pragma warning(push)
343# pragma warning(disable: 4162) // no function with C linkage found
344# pragma warning(disable: 4163) // not available as an intrinsic function
345# pragma function (abs, acos, asin, atan, atan2, cos, cosh, exp, fabs, fmod, log, log10, sin, sinh, sqrt, tan, tanh)
346# if defined (_STLP_WCE)
347# pragma function (ceil, floor)
348# endif
349# define _STLP_RESTORE_FUNCTION_INTRINSIC
350#endif // _STLP_MSVC && _STLP_MSVC <= 1300 && !_STLP_WCE && _MSC_EXTENSIONS
351
352#if (defined (__BORLANDC__) || defined (__WATCOMC__)) && defined (_STLP_USE_NEW_C_HEADERS)
353/* In this config Borland native lib only define functions in std namespace.
354 * In order to have all overloads in STLport namespace we need to add the
355 * double overload in global namespace. We do not use a using statement to avoid
356 * import of invalid overload.
357 */
358# define _STLP_DMATH_INLINE(func) _STLP_MATH_INLINE(double, func, func)
359# define _STLP_DMATH_INLINE2(func) _STLP_MATH_INLINE2(double, double, func, func)
360
361_STLP_DMATH_INLINE(acos)
362_STLP_DMATH_INLINE(asin)
363_STLP_DMATH_INLINE(atan)
364_STLP_DMATH_INLINE2(atan2)
365_STLP_DMATH_INLINE(ceil)
366_STLP_DMATH_INLINE(cos)
367_STLP_DMATH_INLINE(cosh)
368_STLP_DMATH_INLINE(exp)
369_STLP_DMATH_INLINE(fabs)
370_STLP_DMATH_INLINE(floor)
371_STLP_DMATH_INLINE2(fmod)
372_STLP_MATH_INLINE2X(double, int*, frexp, frexp)
373_STLP_MATH_INLINE2X(double, int, ldexp, ldexp)
374_STLP_DMATH_INLINE(log)
375_STLP_DMATH_INLINE(log10)
377_STLP_DMATH_INLINE(sin)
378_STLP_DMATH_INLINE(sinh)
379_STLP_DMATH_INLINE(sqrt)
380_STLP_DMATH_INLINE(tan)
381_STLP_DMATH_INLINE(tanh)
382_STLP_DMATH_INLINE2(pow)
383_STLP_DMATH_INLINE2(hypot)
384
385# undef _STLP_DMATH_INLINE
386# undef _STLP_DMATH_INLINE2
387#endif
388
389#if defined (__DMC__)
390# if defined (fabs)
391inline double __stlp_fabs(double __x) { return fabs(__x); }
392# undef fabs
393inline double fabs(double __x) { return __stlp_fabs(__x); }
394# endif
395# if defined (cos)
396inline double __stlp_cos(double __x) { return cos(__x); }
397# undef cos
398inline double cos(double __x) { return __stlp_cos(__x); }
399# endif
400# if defined (sin)
401inline double __stlp_sin(double __x) { return sin(__x); }
402# undef sin
403inline double sin(double __x) { return __stlp_sin(__x); }
404# endif
405# if defined (sqrt)
406inline double __stlp_sqrt(double __x) { return sqrt(__x); }
407# undef sqrt
408inline double sqrt(double __x) { return __stlp_sqrt(__x); }
409# endif
410# if defined (ldexp)
411inline double __stlp_ldexp(double __x, int __y) { return ldexp(__x, __y); }
412# undef ldexp
413inline double ldexp(double __x, int __y) { return __stlp_ldexp(__x, __y); }
414# endif
415#endif
416
417/* MSVC native lib starting with .Net 2003 has already all math functions
418 * in global namespace.
419 * HP-UX native lib has math functions in the global namespace.
420 */
421#if (!defined (_STLP_MSVC_LIB) || (_STLP_MSVC_LIB < 1310) || defined(UNDER_CE)) && \
422 (!defined (__HP_aCC) || (__HP_aCC < 30000)) && \
423 !defined (__WATCOMC__)
424inline double abs(double __x)
425{ return ::fabs(__x); }
426# if !defined (__MVS__)
428# else // __MVS__ has native long double abs?
429inline float abs(float __x) { return ::fabsf(__x); }
430# endif
431
454
455# if !defined(_STLP_MSVC) /* || (_STLP_MSVC > 1300) */ || defined(_STLP_WCE) || !defined (_MSC_EXTENSIONS) /* && !defined(_STLP_WCE_NET) */
456# ifndef _STLP_NO_VENDOR_MATH_F
457# ifndef __sun
458inline float pow(float __x, int __y) { return _STLP_CMATH_FUNC_NAMESPACE::powf(__x, __STATIC_CAST(float,__y)); }
459# else
460inline float pow(float __x, int __y) { return ::__powf(__x, __STATIC_CAST(float,__y)); }
461# endif
462# else
463inline float pow(float __x, int __y) { return __STATIC_CAST(float, _STLP_CMATH_FUNC_NAMESPACE::pow(__x, __STATIC_CAST(float,__y))); }
464# endif
465inline double pow(double __x, int __y) { return _STLP_CMATH_FUNC_NAMESPACE::pow(__x, __STATIC_CAST(double,__y)); }
466# if !defined (_STLP_NO_LONG_DOUBLE)
467# if !defined(_STLP_NO_VENDOR_MATH_L)
468# ifndef __sun
469inline long double pow(long double __x, int __y) { return _STLP_CMATH_FUNC_NAMESPACE::powl(__x, __STATIC_CAST(long double,__y)); }
470# else
471# ifndef __SUNPRO_CC
472inline long double pow(long double __x, int __y) { return ::__powl(__x, __STATIC_CAST(long double,__y)); }
473# else
474inline long double pow(long double __x, int __y) { return _STLP_VENDOR_CSTD::__powl(__x, __STATIC_CAST(long double,__y)); }
475# endif
476# endif
477# else
478inline long double pow(long double __x, int __y) { return __STATIC_CAST(long double, _STLP_CMATH_FUNC_NAMESPACE::pow(__x, __STATIC_CAST(long double,__y))); }
479# endif
480# endif
481# else
482//The MS native pow version has a bugged overload so it is not imported
483//in the STLport namespace.
484//Here is the bugged version:
485//inline double pow(int __x, int __y) { return (_Pow_int(__x, __y)); }
486inline double pow(double __x, int __y) { return (_Pow_int(__x, __y)); }
487inline float pow(float __x, int __y) { return (_Pow_int(__x, __y)); }
488inline long double pow(long double __x, int __y) { return (_Pow_int(__x, __y)); }
489# endif
490#endif
491
492#if (defined (_STLP_MSVC) && !defined (_STLP_WCE)) || defined (__ICL) || defined (__sun)
493# if defined (_STLP_MSVC) && (_STLP_MSVC >= 1400)
494# pragma warning (push)
495# pragma warning (disable : 4996) // hypot is deprecated.
496# endif
498inline long double hypot(long double x, long double y) { return sqrt(x * x + y * y); }
499# if defined (_STLP_MSVC) && (_STLP_MSVC >= 1400)
500# pragma warning (pop)
501# endif
502#else
503# if defined (_STLP_USE_UCLIBC)
504inline double hypot(double x, double y) { return sqrt(x * x + y * y); }
506# elif defined (_STLP_WCE)
507 /* CE has a double _hypot(double,double) which we use */
508inline double hypot(double __x, double __y) { return _hypot(__x,__y); }
510# endif
511#endif
512
513#if defined (_STLP_RESTORE_FUNCTION_INTRINSIC)
514//restoration of the default intrinsic status of those functions:
515# pragma intrinsic (abs, acos, asin, atan, atan2, cos, cosh, exp, fabs, fmod, log, log10, sin, sinh, sqrt, tan, tanh)
516# if defined (_STLP_WCE)
517# pragma intrinsic (ceil, floor)
518# endif
519# pragma warning(pop)
520# undef _STLP_RESTORE_FUNCTION_INTRINSIC
521#endif // _STLP_MSVC && _STLP_MSVC <= 1300 && !_STLP_WCE && _MSC_EXTENSIONS
522
523/* C++ Standard is unclear about several call to 'using ::func' if new overloads
524 * of ::func appears between 2 successive 'using' calls. To avoid this potential
525 * problem we provide all abs overload before the 'using' call.
526 * Beware: This header inclusion has to be after all abs overload of this file.
527 * The first 'using ::abs' call is going to be in the other header.
528 */
529#ifndef _STLP_INTERNAL_CSTDLIB
530# include <stl/_cstdlib.h>
531#endif
532
533#if defined (_STLP_IMPORT_VENDOR_CSTD) && !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
535using ::abs;
536using ::acos;
537using ::asin;
538using ::atan;
539using ::atan2;
540using ::ceil;
541using ::cos;
542using ::cosh;
543using ::exp;
544using ::fabs;
545using ::floor;
546using ::fmod;
547using ::frexp;
548/*
549 Because of some weird interaction between STLport headers
550 and native HP-UX headers, when compiled with _STLP_DEBUG
551 macro defined with aC++, hypot() is not declared.
552 At some point we'll need to get to the bottom line of
553 this problem.
554*/
555#if !(defined(__HP_aCC) && defined(_STLP_DEBUG))
556using ::hypot;
557#endif
558using ::ldexp;
559using ::log;
560using ::log10;
561using ::modf;
562using ::pow;
563using ::sin;
564using ::sinh;
565using ::sqrt;
566using ::tan;
567using ::tanh;
569# if defined (__BORLANDC__) && (__BORLANDC__ >= 0x560) && !defined (__linux__)
570using _STLP_VENDOR_CSTD::_ecvt;
571using _STLP_VENDOR_CSTD::_fcvt;
572# endif
573#endif
574
575#endif /* _STLP_INTERNAL_CMATH */
576
577// Local Variables:
578// mode:C++
579// End:
#define _STLP_MATH_INLINE2X(__type1, __type2, func, cfunc)
Definition: _cmath.h:191
#define _STLP_DEF_MATH_INLINE2(func, cf)
Definition: _cmath.h:235
#define _STLP_MATH_INLINE2XX(__type, func, cfunc)
Definition: _cmath.h:201
#define _STLP_DEF_MATH_INLINE2P(func, cf)
Definition: _cmath.h:239
#define _STLP_MATH_INLINE2PX(__type, func, cfunc)
Definition: _cmath.h:194
#define _STLP_DEF_MATH_INLINE(func, cf)
Definition: _cmath.h:231
#define _STLP_DEF_MATH_INLINE2I(func, cf)
Definition: _cmath.h:247
float pow(float __x, int __y)
Definition: _cmath.h:458
#define _STLP_DEF_MATH_INLINE2PI(func, cf)
Definition: _cmath.h:243
_STLP_DECLSPEC complex< float > _STLP_CALL sinh(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL tan(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL cosh(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sqrt(const complex< float > &)
Definition: complex.cpp:188
_STLP_DECLSPEC complex< float > _STLP_CALL tanh(const complex< float > &)
valarray< _Tp > acos(const valarray< _Tp > &__x)
Definition: _valarray.h:901
valarray< _Tp > atan(const valarray< _Tp > &__x)
Definition: _valarray.h:919
valarray< _Tp > asin(const valarray< _Tp > &__x)
Definition: _valarray.h:910
valarray< _Tp > atan2(const valarray< _Tp > &__x, const valarray< _Tp > &__y)
Definition: _valarray.h:928
#define abs(i)
Definition: fconv.c:206
#define __STATIC_CAST(__x, __y)
Definition: features.h:585
#define _STLP_BEGIN_NAMESPACE
Definition: features.h:501
#define _STLP_END_NAMESPACE
Definition: features.h:503
double log10(double x)
Definition: freeldr.c:125
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
const GLdouble * v
Definition: gl.h:2040
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLfloat GLfloat v1
Definition: glext.h:6062
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
_Check_return_ __CRT_INLINE long double coshl(_In_ long double x)
Definition: math.h:251
_Check_return_ __CRT_INLINE long double sinhl(_In_ long double x)
Definition: math.h:262
_Check_return_ __CRT_INLINE long double atan2l(_In_ long double y, _In_ long double x)
Definition: math.h:248
_Check_return_ _CRTIMP double __cdecl frexp(_In_ double x, _Out_ int *y)
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
Definition: fabs.c:17
_Check_return_ float __cdecl logf(_In_ float x)
Definition: math.h:229
_Check_return_ _CRTIMP double __cdecl ldexp(_In_ double x, _In_ int y)
_Check_return_ float __cdecl expf(_In_ float x)
Definition: math.h:226
_Check_return_ _CRTIMP double __cdecl modf(_In_ double x, _Out_ double *y)
_Check_return_ __CRT_INLINE long double cosl(_In_ long double x)
Definition: math.h:250
_Check_return_ __CRT_INLINE long double log10l(_In_ long double x)
Definition: math.h:259
_Check_return_ float __cdecl cosf(_In_ float x)
Definition: math.h:224
_Check_return_ _CRTIMP double __cdecl _hypot(_In_ double x, _In_ double y)
_Check_return_ double __cdecl fmod(_In_ double x, _In_ double y)
_Check_return_ float __cdecl log10f(_In_ float x)
Definition: math.h:230
_Check_return_ __CRT_INLINE double hypot(_In_ double x, _In_ double y)
Definition: math.h:240
_Check_return_ __CRT_INLINE long double expl(_In_ long double x)
Definition: math.h:252
_Check_return_ __CRT_INLINE long double sqrtl(_In_ long double x)
Definition: math.h:263
_Check_return_ float __cdecl coshf(_In_ float x)
Definition: math.h:225
_Check_return_ __CRT_INLINE long double logl(_In_ long double x)
Definition: math.h:258
_Check_return_ float __cdecl sinhf(_In_ float x)
Definition: math.h:234
_Check_return_ __CRT_INLINE long double sinl(_In_ long double x)
Definition: math.h:261
_Check_return_ float __cdecl atan2f(_In_ float x, _In_ float y)
Definition: math.h:222
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
_Check_return_ _CRTIMP double __cdecl ceil(_In_ double x)
_Check_return_ float __cdecl sinf(_In_ float x)
Definition: math.h:233
DWORD exp
Definition: msg.c:16058
#define sqrtf(x)
Definition: mymath.h:59
Definition: features.h:417
#define log(outFile, fmt,...)
Definition: util.h:15