ReactOS  0.4.15-dev-5109-g2469ce2
math.h
Go to the documentation of this file.
1 
4 #ifndef _INC_MATH
5 #define _INC_MATH
6 
7 #include "crtdefs.h"
8 
9 #pragma pack(push,_CRT_PACKING)
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 typedef float float_t;
16 typedef double double_t;
17 
18 #ifndef _EXCEPTION_DEFINED
19 #define _EXCEPTION_DEFINED
20  struct _exception {
21  int type;
22  char *name;
23  double arg1;
24  double arg2;
25  double retval;
26  };
27 #endif
28 
29 #ifndef _COMPLEX_DEFINED
30 #define _COMPLEX_DEFINED
31  struct _complex {
32  double x,y;
33  };
34 #if !__STDC__ && !defined(__cplusplus)
35 #define complex _complex
36 #endif /* __STDC__ */
37 #endif /* _COMPLEX_DEFINED */
38 
39 #define _DOMAIN 1
40 #define _SING 2
41 #define _OVERFLOW 3
42 #define _UNDERFLOW 4
43 #define _TLOSS 5
44 #define _PLOSS 6
45 
46 #define EDOM 33
47 #define ERANGE 34
48 
49  _CRTIMP extern double const _HUGE;
50 
51 #define HUGE_VAL _HUGE
52 
53 #ifndef _HUGE_ENUF
54 #define _HUGE_ENUF 1e+300
55 #endif
56 #define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF))
57 #define HUGE_VALD ((double)INFINITY)
58 #define HUGE_VALF ((float)INFINITY)
59 #define HUGE_VALL ((long double)INFINITY)
60 #define NAN ((float)(INFINITY * 0.0F))
61 
62 #define _DENORM (-2)
63 #define _FINITE (-1)
64 #define _INFCODE 1
65 #define _NANCODE 2
66 
67 #define FP_INFINITE _INFCODE
68 #define FP_NAN _NANCODE
69 #define FP_NORMAL _FINITE
70 #define FP_SUBNORMAL _DENORM
71 #define FP_ZERO 0
72 
73 #ifndef __cplusplus
74 #define _matherrl _matherr
75 #endif
76 
77 #ifndef _CRT_ABS_DEFINED
78 #define _CRT_ABS_DEFINED
80 _Check_return_ long __cdecl labs(_In_ long x);
81 _Check_return_ long long __cdecl llabs(_In_ long long x);
82 #endif
83 
84 _Check_return_ double __cdecl acos(_In_ double x);
85 _Check_return_ double __cdecl asin(_In_ double x);
86 _Check_return_ double __cdecl atan(_In_ double x);
87 _Check_return_ double __cdecl atan2(_In_ double y, _In_ double x);
88 _Check_return_ double __cdecl cos(_In_ double x);
89 _Check_return_ double __cdecl cosh(_In_ double x);
90 _Check_return_ double __cdecl exp(_In_ double x);
92 _Check_return_ double __cdecl fmod(_In_ double x, _In_ double y);
93 _Check_return_ double __cdecl log(_In_ double x);
94 _Check_return_ double __cdecl log10(_In_ double x);
95 _Check_return_ double __cdecl pow(_In_ double x, double y);
96 _Check_return_ double __cdecl sin(_In_ double x);
97 _Check_return_ double __cdecl sinh(_In_ double x);
99 _Check_return_ double __cdecl tan(_In_ double x);
100 _Check_return_ double __cdecl tanh(_In_ double x);
101 
102 #ifdef _MSC_VER
103 /* Prevent the compiler from generating calls to _CIatan2 */
104 #pragma function(atan2)
105 #ifdef _M_AMD64
106 /* Prevent the compiler from generating calls to __vdecl_xxx */
107 #pragma function(cos,pow,sin,tan)
108 #endif
109 #endif
110 
111 #ifndef _CRT_MATHERR_DEFINED
112 #define _CRT_MATHERR_DEFINED
114 #endif
115 
116 #ifndef _CRT_ATOF_DEFINED
117 #define _CRT_ATOF_DEFINED
118 _Check_return_ _CRTIMP double __cdecl atof(_In_z_ const char *str);
119 _Check_return_ _CRTIMP double __cdecl _atof_l(_In_z_ const char *str, _In_opt_ _locale_t locale); // vista+
120 #endif /* _CRT_ATOF_DEFINED */
121 
122 #ifndef _SIGN_DEFINED
123 #define _SIGN_DEFINED
124 _Check_return_ _CRTIMP double __cdecl _copysign(_In_ double x, _In_ double sgn);
126 #endif
127 
129 _Check_return_ _CRTIMP double __cdecl _hypot(_In_ double x, _In_ double y);
130 _Check_return_ _CRTIMP double __cdecl _j0(_In_ double x);
131 _Check_return_ _CRTIMP double __cdecl _j1(_In_ double x);
132 _Check_return_ _CRTIMP double __cdecl _jn(_In_ int x, _In_ double y);
133 _Check_return_ _CRTIMP double __cdecl _nextafter(_In_ double x, _In_ double y);
134 _Check_return_ _CRTIMP double __cdecl _y0(_In_ double x);
135 _Check_return_ _CRTIMP double __cdecl _y1(_In_ double x);
136 _Check_return_ _CRTIMP double __cdecl _yn(_In_ int x, _In_ double y);
137 _Check_return_ _CRTIMP double __cdecl ceil(_In_ double x);
138 _Check_return_ _CRTIMP double __cdecl floor(_In_ double x);
139 _Check_return_ _CRTIMP double __cdecl frexp(_In_ double x, _Out_ int *y);
140 _Check_return_ _CRTIMP double __cdecl ldexp(_In_ double x, _In_ int y);
141 _Check_return_ _CRTIMP double __cdecl modf(_In_ double x, _Out_ double *y);
142 
143 #if defined(__i386__) || defined(_M_IX86)
144 _Check_return_ _CRTIMP int __cdecl _set_SSE2_enable(_In_ int flag);
145 #endif
146 
147 #if defined(__x86_64) || defined(_M_AMD64)
148 _Check_return_ _CRTIMP float __cdecl _nextafterf(_In_ float x, _In_ float y);
149 _Check_return_ _CRTIMP int __cdecl _isnanf(_In_ float x);
150 _Check_return_ _CRTIMP int __cdecl _fpclassf(_In_ float x);
151 #ifdef _MSC_VER
152 /* Prevent the compiler from generating calls to __vdecl_floor2 */
153 #pragma function(floor)
154 #endif
155 #endif
156 
157 #if defined(__x86_64) || defined(_M_AMD64) || \
158  defined(__arm__) || defined(_M_ARM) || \
159  defined(__arm64__) || defined(_M_ARM64)
160 _Check_return_ _CRTIMP int __cdecl _finitef(_In_ float x);
161 _Check_return_ _CRTIMP float __cdecl _logbf(_In_ float x);
162 #endif /* _M_AMD64 || _M_ARM || _M_ARM64 */
163 
164 #if defined(__ia64__) || defined (_M_IA64)
165 _Check_return_ _CRTIMP float __cdecl ldexpf(_In_ float x, _In_ int y);
166 _Check_return_ _CRTIMP long double __cdecl tanl(_In_ long double x);
167 #else
168 _Check_return_ __CRT_INLINE float __CRTDECL ldexpf(_In_ float x, _In_ int y) { return (float)ldexp(x, y); }
169 _Check_return_ __CRT_INLINE long double __CRTDECL tanl(_In_ long double x) { return (tan((double)x)); }
170 #endif
171 
172 #if defined(_CRTBLD)
173 _Check_return_ float __cdecl fabsf(_In_ float x);
174 #elif defined(__ia64__) || defined(_M_IA64) || \
175  defined(__arm__) || defined(_M_ARM) || \
176  defined(__arm64__) || defined(_M_ARM64)
178 #else
179 _Check_return_ __CRT_INLINE float __CRTDECL fabsf(_In_ float x) { return ((float)fabs((double)x)); }
180 #endif /* _M_IA64 || _M_ARM || _M_ARM64 */
181 
182 _Check_return_ float __cdecl _chgsignf(_In_ float x);
183 _Check_return_ float __cdecl _copysignf(_In_ float x, _In_ float y);
184 _Check_return_ float __cdecl _hypotf(_In_ float x, _In_ float y);
185 _Check_return_ float __cdecl acosf(_In_ float x);
186 _Check_return_ float __cdecl asinf(_In_ float x);
187 _Check_return_ float __cdecl atanf(_In_ float x);
188 _Check_return_ float __cdecl atan2f(_In_ float x, _In_ float y);
189 _Check_return_ float __cdecl ceilf(_In_ float x);
190 _Check_return_ float __cdecl cosf(_In_ float x);
191 _Check_return_ float __cdecl coshf(_In_ float x);
192 _Check_return_ float __cdecl expf(_In_ float x);
193 _Check_return_ float __cdecl floorf(_In_ float x);
194 _Check_return_ float __cdecl fmodf(_In_ float x, _In_ float y);
195 _Check_return_ float __cdecl logf(_In_ float x);
196 _Check_return_ float __cdecl log10f(_In_ float x);
197 _Check_return_ float __cdecl modff(_In_ float x, _Out_ float *y);
198 _Check_return_ float __cdecl powf(_In_ float b, _In_ float e);
199 _Check_return_ float __cdecl sinf(_In_ float x);
200 _Check_return_ float __cdecl sinhf(_In_ float x);
201 _Check_return_ float __cdecl sqrtf(_In_ float x);
202 _Check_return_ float __cdecl tanf(_In_ float x);
203 _Check_return_ float __cdecl tanhf(_In_ float x);
204 
205 #if defined(_MSC_VER)
206 /* Make sure intrinsics don't get in our way */
207 #if defined(_M_AMD64) || defined(_M_ARM) || defined(_M_ARM64)
208 #pragma function(acosf,asinf,atanf,atan2f,ceilf,cosf,coshf,expf,floorf,fmodf,logf,log10f,powf,sinf,sinhf,sqrtf,tanf,tanhf)
209 #endif /* defined(_M_AMD64) || defined(_M_ARM) || defined(_M_ARM64) */
210 #if (_MSC_VER >= 1920)
211 #pragma function(_hypotf)
212 #endif
213 #endif /* _MSC_VER */
214 
215 #if !defined(_CRTBLD)
216 _Check_return_ __CRT_INLINE float _chgsignf(_In_ float x) { return (float)_chgsign((double)x); }
217 _Check_return_ __CRT_INLINE float _copysignf(_In_ float x, _In_ float y) { return (float)_copysign((double)x, (double)y); }
218 _Check_return_ __CRT_INLINE float _hypotf(_In_ float x, _In_ float y) { return (float)_hypot((double)x, (double)y); }
219 _Check_return_ __CRT_INLINE float acosf(_In_ float x) { return (float)acos((double)x); }
220 _Check_return_ __CRT_INLINE float asinf(_In_ float x) { return (float)asin((double)x); }
221 _Check_return_ __CRT_INLINE float atanf(_In_ float x) { return (float)atan((double)x); }
222 _Check_return_ __CRT_INLINE float atan2f(_In_ float x, _In_ float y) { return (float)atan2((double)x,(double)y); }
223 _Check_return_ __CRT_INLINE float ceilf(_In_ float x) { return (float)ceil((double)x); }
224 _Check_return_ __CRT_INLINE float cosf(_In_ float x) { return (float)cos((double)x); }
225 _Check_return_ __CRT_INLINE float coshf(_In_ float x) { return (float)cosh((double)x); }
226 _Check_return_ __CRT_INLINE float expf(_In_ float x) { return (float)exp((double)x); }
227 _Check_return_ __CRT_INLINE float floorf(_In_ float x) { return (float)floor((double)x); }
228 _Check_return_ __CRT_INLINE float fmodf(_In_ float x, _In_ float y) { return (float)fmod((double)x,(double)y); }
229 _Check_return_ __CRT_INLINE float logf(_In_ float x) { return (float)log((double)x); }
230 _Check_return_ __CRT_INLINE float log10f(_In_ float x) { return (float)log10((double)x); }
231 _Check_return_ __CRT_INLINE float modff(_In_ float x, _Out_ float *y) { double _Di,_Df = modf((double)x,&_Di); *y = (float)_Di; return (float)_Df; }
232 _Check_return_ __CRT_INLINE float powf(_In_ float x, _In_ float y) { return (float)pow((double)x,(double)y); }
233 _Check_return_ __CRT_INLINE float sinf(_In_ float x) { return (float)sin((double)x); }
234 _Check_return_ __CRT_INLINE float sinhf(_In_ float x) { return (float)sinh((double)x); }
235 _Check_return_ __CRT_INLINE float sqrtf(_In_ float x) { return (float)sqrt((double)x); }
236 _Check_return_ __CRT_INLINE float tanf(_In_ float x) { return (float)tan((double)x); }
237 _Check_return_ __CRT_INLINE float tanhf(_In_ float x) { return (float)tanh((double)x); }
238 #endif /* !defined(_CRTBLD) */
239 
240 _Check_return_ __CRT_INLINE double hypot(_In_ double x, _In_ double y) { return _hypot(x, y); }
241 _Check_return_ __CRT_INLINE float hypotf(_In_ float x, _In_ float y) { return _hypotf(x, y); }
242 _Check_return_ __CRT_INLINE float frexpf(_In_ float x, _Out_ int *y) { return ((float)frexp((double)x,y)); }
243 
244 /* long double equals double, so just use inline wrappers */
245 _Check_return_ __CRT_INLINE long double acosl(_In_ long double x) { return (acos((double)x)); }
246 _Check_return_ __CRT_INLINE long double asinl(_In_ long double x) { return (asin((double)x)); }
247 _Check_return_ __CRT_INLINE long double atanl(_In_ long double x) { return (atan((double)x)); }
248 _Check_return_ __CRT_INLINE long double atan2l(_In_ long double y, _In_ long double x) { return (atan2((double)y, (double)x)); }
249 _Check_return_ __CRT_INLINE long double ceill(_In_ long double x) { return (ceil((double)x)); }
250 _Check_return_ __CRT_INLINE long double cosl(_In_ long double x) { return (cos((double)x)); }
251 _Check_return_ __CRT_INLINE long double coshl(_In_ long double x) { return (cosh((double)x)); }
252 _Check_return_ __CRT_INLINE long double expl(_In_ long double x) { return (exp((double)x)); }
253 _Check_return_ __CRT_INLINE long double fabsl(_In_ long double x) { return fabs((double)x); }
254 _Check_return_ __CRT_INLINE long double floorl(_In_ long double x) { return (floor((double)x)); }
255 _Check_return_ __CRT_INLINE long double fmodl(_In_ long double x, _In_ long double y) { return (fmod((double)x, (double)y)); }
256 _Check_return_ __CRT_INLINE long double frexpl(_In_ long double x, _Out_ int *y) { return (frexp((double)x, y)); }
257 _Check_return_ __CRT_INLINE long double hypotl(_In_ long double x, _In_ long double y) { return _hypot((double)x, (double)y); }
258 _Check_return_ __CRT_INLINE long double logl(_In_ long double x) { return (log((double)x)); }
259 _Check_return_ __CRT_INLINE long double log10l(_In_ long double x) { return (log10((double)x)); }
260 _Check_return_ __CRT_INLINE long double powl(_In_ long double x, _In_ long double y) { return (pow((double)x, (double)y)); }
261 _Check_return_ __CRT_INLINE long double sinl(_In_ long double x) { return (sin((double)x)); }
262 _Check_return_ __CRT_INLINE long double sinhl(_In_ long double x) { return (sinh((double)x)); }
263 _Check_return_ __CRT_INLINE long double sqrtl(_In_ long double x) { return (sqrt((double)x)); }
264 _Check_return_ __CRT_INLINE long double tanhl(_In_ long double x) {return (tanh((double)x)); }
265 _Check_return_ __CRT_INLINE long double _chgsignl(_In_ long double number) { return _chgsign((double)number); }
266 _Check_return_ __CRT_INLINE long double _copysignl(_In_ long double number, _In_ long double sign) { return _copysign((double)number, (double)sign); }
267 _Check_return_ __CRT_INLINE long double _hypotl(_In_ long double x, _In_ long double y) { return _hypot((double)x, (double)y); }
268 _Check_return_ __CRT_INLINE long double ldexpl(_In_ long double x, _In_ int y) { return ldexp((double)x, y); }
269 _Check_return_ __CRT_INLINE long double modfl(_In_ long double x, _Out_ long double *y) { return (long double)modf((double)x, (double *)y); }
270 
271 /* Support for some functions, not exported in MSVCRT */
272 #if (_MSC_VER >= 1929)
273 _Check_return_ long lrint(_In_ double x);
274 _Check_return_ long lrintf(_In_ float x);
275 _Check_return_ long lrintl(_In_ long double x);
276 #pragma function(lrint, lrintf, lrintl)
277 #endif
278 
279 #ifndef _CRTBLD
280 _Check_return_ __CRT_INLINE double round(_In_ double x) { return (x < 0) ? ceil(x - 0.5f) : floor(x + 0.5); }
281 _Check_return_ __CRT_INLINE float roundf(_In_ float x) { return (x < 0) ? ceilf(x - 0.5f) : floorf(x + 0.5); }
282 _Check_return_ __CRT_INLINE long double roundl(_In_ long double x) { return (x < 0) ? ceill(x - 0.5f) : floorl(x + 0.5); }
283 _Check_return_ __CRT_INLINE long lround(_In_ double x) { return (long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }
284 _Check_return_ __CRT_INLINE long lroundf(_In_ float x) { return (long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }
285 _Check_return_ __CRT_INLINE long lroundl(_In_ long double x) { return (long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }
286 _Check_return_ __CRT_INLINE long long llround(_In_ double x) { return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }
287 _Check_return_ __CRT_INLINE long long llroundf(_In_ float x) { return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }
288 _Check_return_ __CRT_INLINE long long llroundl(_In_ long double x) { return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }
289 _Check_return_ __CRT_INLINE double rint(_In_ double x) { return round(x); }
290 _Check_return_ __CRT_INLINE float rintf(_In_ float x) { return roundf(x); }
291 _Check_return_ __CRT_INLINE long double rintl(_In_ long double x) { return roundl(x); }
292 _Check_return_ __CRT_INLINE long lrint(_In_ double x) { return (long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }
293 _Check_return_ __CRT_INLINE long lrintf(_In_ float x) { return (long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }
294 _Check_return_ __CRT_INLINE long lrintl(_In_ long double x) { return (long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }
295 _Check_return_ __CRT_INLINE long long llrint(_In_ double x) { return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }
296 _Check_return_ __CRT_INLINE long long llrintf(_In_ float x) { return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }
297 _Check_return_ __CRT_INLINE long long llrintl(_In_ long double x) { return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }
298 _Check_return_ __CRT_INLINE double log2(_In_ double x) { return log(x) / log(2); }
299 #endif /* !_CRTBLD */
300 
301 #ifndef NO_OLDNAMES /* !__STDC__ */
302 
303 #define DOMAIN _DOMAIN
304 #define SING _SING
305 #define OVERFLOW _OVERFLOW
306 #define UNDERFLOW _UNDERFLOW
307 #define TLOSS _TLOSS
308 #define PLOSS _PLOSS
309 #define matherr _matherr
310 //_CRTIMP extern double HUGE;
311 #define HUGE _HUGE
312 //_CRT_NONSTDC_DEPRECATE(_cabs) _CRTIMP double __cdecl cabs(_In_ struct _complex x);
313 #define cabs _cabs
314 
315 _CRT_NONSTDC_DEPRECATE(_j0) _CRTIMP double __cdecl j0(_In_ double x);
316 _CRT_NONSTDC_DEPRECATE(_j1) _CRTIMP double __cdecl j1(_In_ double x);
320 _CRT_NONSTDC_DEPRECATE(_yn) _CRTIMP double __cdecl yn(_In_ int x, _In_ double y);
321 
322 #endif /* NO_OLDNAMES */
323 
324 #ifdef __cplusplus
325 }
326 #ifndef _CMATH_
327 extern "C++" {
328 
329 //inline long abs(_In_ long x) { return labs(x); }
330 _Check_return_ inline double abs(_In_ double x) throw() { return fabs(x); }
331 
332 _Check_return_ inline float abs(_In_ float x) throw() { return fabsf(x); }
333 _Check_return_ inline float acos(_In_ float x) throw() { return acosf(x); }
334 _Check_return_ inline float asin(_In_ float x) throw() { return asinf(x); }
335 _Check_return_ inline float atan(_In_ float x) throw() { return atanf(x); }
336 _Check_return_ inline float atan2(_In_ float y, _In_ float x) throw() { return atan2f(y, x); }
337 _Check_return_ inline float ceil(_In_ float x) throw() { return ceilf(x); }
338 _Check_return_ inline float copysign(_In_ float x, _In_ float y) throw() { return _copysignf(x, y); }
339 _Check_return_ inline float cos(_In_ float x) throw() { return cosf(x); }
340 _Check_return_ inline float cosh(_In_ float x) throw() { return coshf(x); }
341 _Check_return_ inline float exp(_In_ float x) throw() { return expf(x); }
342 _Check_return_ inline float fabs(_In_ float x) throw() { return fabsf(x); }
343 _Check_return_ inline float floor(_In_ float x) throw() { return floorf(x); }
344 _Check_return_ inline float fmod(_In_ float x, _In_ float y) throw() { return fmodf(x, y); }
345 _Check_return_ inline float frexp(_In_ float x, _Out_ int * y) throw() { return frexpf(x, y); }
346 _Check_return_ inline float hypot(_In_ float x, _In_ float y) throw() { return _hypotf(x, y); }
347 _Check_return_ inline float ldexp(_In_ float x, _In_ int y) throw() { return ldexpf(x, y); }
348 _Check_return_ inline float log(_In_ float x) throw() { return logf(x); }
349 _Check_return_ inline float log10(_In_ float x) throw() { return log10f(x); }
350 _Check_return_ inline float modf(_In_ float x, _Out_ float * y) throw() { return modff(x, y); }
351 _Check_return_ inline float pow(_In_ float x, _In_ float y) throw() { return powf(x, y); }
352 _Check_return_ inline float sin(_In_ float x) throw() { return sinf(x); }
353 _Check_return_ inline float sinh(_In_ float x) throw() { return sinhf(x); }
354 _Check_return_ inline float sqrt(_In_ float x) throw() { return sqrtf(x); }
355 _Check_return_ inline float tan(_In_ float x) throw() { return tanf(x); }
356 _Check_return_ inline float tanh(_In_ float x) throw() { return tanhf(x); }
357 
358 _Check_return_ inline long double abs(_In_ long double x) throw() { return fabsl(x); }
359 _Check_return_ inline long double acos(_In_ long double x) throw() { return acosl(x); }
360 _Check_return_ inline long double asin(_In_ long double x) throw() { return asinl(x); }
361 _Check_return_ inline long double atan(_In_ long double x) throw() { return atanl(x); }
362 _Check_return_ inline long double atan2(_In_ long double y, _In_ long double x) throw() { return atan2l(y, x); }
363 _Check_return_ inline long double ceil(_In_ long double x) throw() { return ceill(x); }
364 _Check_return_ inline long double copysign(_In_ long double x, _In_ long double y) throw() { return _copysignl(x, y); }
365 _Check_return_ inline long double cos(_In_ long double x) throw() { return cosl(x); }
366 _Check_return_ inline long double cosh(_In_ long double x) throw() { return coshl(x); }
367 _Check_return_ inline long double exp(_In_ long double x) throw() { return expl(x); }
368 _Check_return_ inline long double fabs(_In_ long double x) throw() { return fabsl(x); }
369 _Check_return_ inline long double floor(_In_ long double x) throw() { return floorl(x); }
370 _Check_return_ inline long double fmod(_In_ long double x, _In_ long double y) throw() { return fmodl(x, y); }
371 _Check_return_ inline long double frexp(_In_ long double x, _Out_ int * y) throw() { return frexpl(x, y); }
372 _Check_return_ inline long double hypot(_In_ long double x, _In_ long double y) throw() { return hypotl(x, y); }
373 _Check_return_ inline long double ldexp(_In_ long double x, _In_ int y) throw() { return ldexpl(x, y); }
374 _Check_return_ inline long double log(_In_ long double x) throw() { return logl(x); }
375 _Check_return_ inline long double log10(_In_ long double x) throw() { return log10l(x); }
376 _Check_return_ inline long double modf(_In_ long double x, _Out_ long double * y) throw() { return modfl(x, y); }
377 _Check_return_ inline long double pow(_In_ long double x, _In_ long double y) throw() { return powl(x, y); }
378 _Check_return_ inline long double sin(_In_ long double x) throw() { return sinl(x); }
379 _Check_return_ inline long double sinh(_In_ long double x) throw() { return sinhl(x); }
380 _Check_return_ inline long double sqrt(_In_ long double x) throw() { return sqrtl(x); }
381 _Check_return_ inline long double tan(_In_ long double x) throw() { return tanl(x); }
382 _Check_return_ inline long double tanh(_In_ long double x) throw() { return tanhl(x); }
383 }
384 #endif /* !_CMATH_ */
385 #endif /* __cplusplus */
386 
387 #pragma pack(pop)
388 
389 #endif /* !_INC_MATH */
390 
391 #if defined(_USE_MATH_DEFINES) && !defined(_MATH_DEFINES_DEFINED)
392 #define _MATH_DEFINES_DEFINED
393 
394 #define M_E 2.71828182845904523536
395 #define M_LOG2E 1.44269504088896340736
396 #define M_LOG10E 0.434294481903251827651
397 #define M_LN2 0.693147180559945309417
398 #define M_LN10 2.30258509299404568402
399 #define M_PI 3.14159265358979323846
400 #define M_PI_2 1.57079632679489661923
401 #define M_PI_4 0.785398163397448309616
402 #define M_1_PI 0.318309886183790671538
403 #define M_2_PI 0.636619772367581343076
404 #define M_2_SQRTPI 1.12837916709551257390
405 #define M_SQRT2 1.41421356237309504880
406 #define M_SQRT1_2 0.707106781186547524401
407 
408 #endif /* _USE_MATH_DEFINES */
_Check_return_ double __cdecl tanh(_In_ double x)
_Check_return_ __CRT_INLINE long double _hypotl(_In_ long double x, _In_ long double y)
Definition: math.h:267
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3706
static size_t double int int int * sign
Definition: printf.c:71
_Check_return_ __CRT_INLINE long double __CRTDECL tanl(_In_ long double x)
Definition: math.h:169
_Check_return_ float __cdecl logf(_In_ float x)
Definition: math.h:229
_Check_return_ _CRTIMP double __cdecl ceil(_In_ double x)
_Check_return_ __CRT_INLINE long double atan2l(_In_ long double y, _In_ long double x)
Definition: math.h:248
double __cdecl copysign(double, double)
_Check_return_ __CRT_INLINE long double asinl(_In_ long double x)
Definition: math.h:246
_CRT_NONSTDC_DEPRECATE(_j0) _CRTIMP double __cdecl j0(_In_ double x)
_Check_return_ float __cdecl floorf(_In_ float x)
Definition: math.h:227
_Check_return_ __CRT_INLINE float __CRTDECL ldexpf(_In_ float x, _In_ int y)
Definition: math.h:168
_Check_return_ __CRT_INLINE double round(_In_ double x)
Definition: math.h:280
_Check_return_ __CRT_INLINE long double sinhl(_In_ long double x)
Definition: math.h:262
_Check_return_ __CRT_INLINE long long llrintf(_In_ float x)
Definition: math.h:296
_Check_return_ double __cdecl log(_In_ double x)
_Check_return_ float __cdecl powf(_In_ float b, _In_ float e)
Definition: math.h:232
double arg2
Definition: math.h:24
#define _In_opt_
Definition: ms_sal.h:309
#define _Inout_
Definition: ms_sal.h:378
double y
Definition: math.h:32
long sgn(REAL x)
Definition: varray.cc:48
#define __cdecl
Definition: accygwin.h:79
_Check_return_ __CRT_INLINE long double _copysignl(_In_ long double number, _In_ long double sign)
Definition: math.h:266
#define _Out_
Definition: ms_sal.h:345
_Check_return_ float __cdecl acosf(_In_ float x)
Definition: math.h:219
_Check_return_ __CRT_INLINE long double expl(_In_ long double x)
Definition: math.h:252
_Check_return_ _CRTIMP double __cdecl _atof_l(_In_z_ const char *str, _In_opt_ _locale_t locale)
#define _CRTIMP
Definition: crtdefs.h:72
_Check_return_ __CRT_INLINE long double coshl(_In_ long double x)
Definition: math.h:251
_Check_return_ double __cdecl atan2(_In_ double y, _In_ double x)
_Check_return_ _CRTIMP double __cdecl _nextafter(_In_ double x, _In_ double y)
_Check_return_ __CRT_INLINE long double sqrtl(_In_ long double x)
Definition: math.h:263
_Check_return_ __CRT_INLINE long double frexpl(_In_ long double x, _Out_ int *y)
Definition: math.h:256
char * name
Definition: math.h:22
_Check_return_ _CRTIMP double __cdecl _cabs(_In_ struct _complex a)
_Check_return_ _CRTIMP double __cdecl ldexp(_In_ double x, _In_ int y)
_Check_return_ _CRTIMP double __cdecl _yn(_In_ int x, _In_ double y)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
_Check_return_ __CRT_INLINE long double fabsl(_In_ long double x)
Definition: math.h:253
_Check_return_ double __cdecl pow(_In_ double x, double y)
int type
Definition: math.h:21
Definition: math.h:31
_Check_return_ _CRTIMP double __cdecl _j0(_In_ double x)
_Check_return_ __CRT_INLINE long lrint(_In_ double x)
Definition: math.h:292
_Check_return_ _CRTIMP double __cdecl _hypot(_In_ double x, _In_ double y)
_Check_return_ __CRT_INLINE long long llrintl(_In_ long double x)
Definition: math.h:297
_Check_return_ __CRT_INLINE long double hypotl(_In_ long double x, _In_ long double y)
Definition: math.h:257
_Check_return_ double __cdecl sinh(_In_ double x)
_Check_return_ __CRT_INLINE double rint(_In_ double x)
Definition: math.h:289
_Check_return_ double __cdecl cos(_In_ double x)
_Check_return_ float __cdecl expf(_In_ float x)
Definition: math.h:226
_Check_return_ float __cdecl cosf(_In_ float x)
Definition: math.h:224
_Check_return_ __CRT_INLINE long lroundf(_In_ float x)
Definition: math.h:284
double x
Definition: math.h:32
_Check_return_ __CRT_INLINE long double roundl(_In_ long double x)
Definition: math.h:282
_Check_return_ __CRT_INLINE float roundf(_In_ float x)
Definition: math.h:281
_Check_return_ _CRTIMP double __cdecl atof(_In_z_ const char *str)
_Check_return_ __CRT_INLINE long lrintl(_In_ long double x)
Definition: math.h:294
#define _CRT_JIT_INTRINSIC
Definition: crtdefs.h:253
_Check_return_ __CRT_INLINE double log2(_In_ double x)
Definition: math.h:298
_Check_return_ double __cdecl cosh(_In_ double x)
Definition: _locale.h:75
#define e
Definition: ke_i.h:82
_Check_return_ __CRT_INLINE long double acosl(_In_ long double x)
Definition: math.h:245
static size_t double number
Definition: printf.c:71
_Check_return_ __CRT_INLINE long double sinl(_In_ long double x)
Definition: math.h:261
_Check_return_ double __cdecl asin(_In_ double x)
_Check_return_ float __cdecl sqrtf(_In_ float x)
Definition: math.h:235
_Check_return_ __CRT_INLINE long long llround(_In_ double x)
Definition: math.h:286
_Check_return_ __CRT_INLINE float frexpf(_In_ float x, _Out_ int *y)
Definition: math.h:242
_Check_return_ _CRTIMP double __cdecl _copysign(_In_ double x, _In_ double sgn)
_Check_return_ __CRT_INLINE long double logl(_In_ long double x)
Definition: math.h:258
_Check_return_ _CRTIMP double __cdecl _y1(_In_ double x)
_Check_return_ float __cdecl _chgsignf(_In_ float x)
Definition: math.h:216
_Check_return_ long long __cdecl llabs(_In_ long long x)
Definition: stdlib.h:1435
_Check_return_ __CRT_INLINE long double ldexpl(_In_ long double x, _In_ int y)
Definition: math.h:268
_Check_return_ __CRT_INLINE long double tanhl(_In_ long double x)
Definition: math.h:264
const WCHAR * str
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl sqrt(_In_ double x)
#define _In_
Definition: ms_sal.h:308
#define _In_z_
Definition: ms_sal.h:313
_Check_return_ __CRT_INLINE double hypot(_In_ double x, _In_ double y)
Definition: math.h:240
_Check_return_ float __cdecl modff(_In_ float x, _Out_ float *y)
Definition: math.h:231
_Check_return_ __CRT_INLINE long lrintf(_In_ float x)
Definition: math.h:293
double double_t
Definition: math.h:16
GLfloat f
Definition: glext.h:7540
_Check_return_ double __cdecl fmod(_In_ double x, _In_ double y)
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
_Check_return_ double __cdecl tan(_In_ double x)
_Check_return_ float __cdecl sinhf(_In_ float x)
Definition: math.h:234
double retval
Definition: math.h:25
_Check_return_ double __cdecl acos(_In_ double x)
float float_t
Definition: math.h:15
_Check_return_ float __cdecl fmodf(_In_ float x, _In_ float y)
Definition: math.h:228
_CRTIMP double const _HUGE
Definition: huge_val.c:6
_Check_return_ double __cdecl log10(_In_ double x)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
_Check_return_ _CRTIMP double __cdecl _chgsign(_In_ double x)
_Check_return_ __CRT_INLINE long lroundl(_In_ long double x)
Definition: math.h:285
_Check_return_ __CRT_INLINE long long llrint(_In_ double x)
Definition: math.h:295
_Check_return_ float __cdecl _copysignf(_In_ float x, _In_ float y)
Definition: math.h:217
#define __CRTDECL
Definition: crtdefs.h:167
_Check_return_ __CRT_INLINE long double floorl(_In_ long double x)
Definition: math.h:254
_Check_return_ __CRT_INLINE long double modfl(_In_ long double x, _Out_ long double *y)
Definition: math.h:269
_Check_return_ __CRT_INLINE long double rintl(_In_ long double x)
Definition: math.h:291
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
Definition: fabs.c:17
_Check_return_ __CRT_INLINE long double _chgsignl(_In_ long double number)
Definition: math.h:265
_Check_return_ __CRT_INLINE long double atanl(_In_ long double x)
Definition: math.h:247
_Check_return_ __CRT_INLINE float rintf(_In_ float x)
Definition: math.h:290
#define _Check_return_
Definition: ms_sal.h:557
_Check_return_ float __cdecl tanf(_In_ float x)
Definition: math.h:236
_Check_return_ __CRT_INLINE long double cosl(_In_ long double x)
Definition: math.h:250
int __CRTDECL _matherr(_Inout_ struct _exception *exception)
_Check_return_ __CRT_INLINE float hypotf(_In_ float x, _In_ float y)
Definition: math.h:241
static float(__cdecl *square_half_float)(float x
_Check_return_ __CRT_INLINE long lround(_In_ double x)
Definition: math.h:283
_Check_return_ float __cdecl sinf(_In_ float x)
Definition: math.h:233
GLint y0
Definition: linetemp.h:96
_Check_return_ _CRTIMP double __cdecl frexp(_In_ double x, _Out_ int *y)
_Check_return_ float __cdecl log10f(_In_ float x)
Definition: math.h:230
_Check_return_ float __cdecl atanf(_In_ float x)
Definition: math.h:221
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
_Check_return_ int __cdecl abs(_In_ int x)
_Check_return_ double __cdecl atan(_In_ double x)
double arg1
Definition: math.h:23
_Check_return_ __CRT_INLINE long double powl(_In_ long double x, _In_ long double y)
Definition: math.h:260
_Check_return_ double __cdecl exp(_In_ double x)
_Check_return_ _CRTIMP double __cdecl _jn(_In_ int x, _In_ double y)
_Check_return_ __CRT_INLINE long double log10l(_In_ long double x)
Definition: math.h:259
_Check_return_ float __cdecl _hypotf(_In_ float x, _In_ float y)
Definition: math.h:218
_Check_return_ _CRTIMP double __cdecl _j1(_In_ double x)
_Check_return_ __CRT_INLINE float __CRTDECL fabsf(_In_ float x)
Definition: math.h:179
_Check_return_ __CRT_INLINE long double ceill(_In_ long double x)
Definition: math.h:249
_Check_return_ __CRT_INLINE long double fmodl(_In_ long double x, _In_ long double y)
Definition: math.h:255
_Check_return_ float __cdecl asinf(_In_ float x)
Definition: math.h:220
_Check_return_ long __cdecl labs(_In_ long x)
_Check_return_ float __cdecl atan2f(_In_ float x, _In_ float y)
Definition: math.h:222
_Check_return_ __CRT_INLINE long long llroundl(_In_ long double x)
Definition: math.h:288
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
_Check_return_ float __cdecl ceilf(_In_ float x)
Definition: math.h:223
_Check_return_ float __cdecl coshf(_In_ float x)
Definition: math.h:225
_Check_return_ double __cdecl sin(_In_ double x)
_Check_return_ float __cdecl tanhf(_In_ float x)
Definition: math.h:237
_Check_return_ __CRT_INLINE long long llroundf(_In_ float x)
Definition: math.h:287
_Check_return_ _CRTIMP double __cdecl _y0(_In_ double x)
_Check_return_ _CRTIMP double __cdecl modf(_In_ double x, _Out_ double *y)