Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

631 lines
23 KiB

  1. /***
  2. *math.h - definitions and declarations for math library
  3. *
  4. * Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file contains constant definitions and external subroutine
  8. * declarations for the math subroutine library.
  9. * [ANSI/System V]
  10. *
  11. * [Public]
  12. *
  13. *Revision History:
  14. * 10/20/87 JCR Removed "MSC40_ONLY" entries
  15. * 12-11-87 JCR Added "_loadds" functionality
  16. * 12-18-87 JCR Added _FAR_ to declarations
  17. * 02-10-88 JCR Cleaned up white space
  18. * 02-10-88 WAJ Changed HUGE and HUGE_VAL definitions for DLL libraries
  19. * 05-32-88 PHG Added _CDECL and _NEAR for declaration of HUGE
  20. * 08-22-88 GJF Modified to also work with the 386 (small model only)
  21. * 05-03-89 JCR Added _INTERNAL_IFSTRIP for relinc usage
  22. * 08-02-89 GJF Cleanup, now specific to OS/2 2.0 (i.e., 386 flat model)
  23. * 10-30-89 GJF Fixed copyright
  24. * 11-02-89 JCR Changed "DLL" to "_DLL"
  25. * 11-20-89 JCR Routines are now _cdecl in both single and multi-thread
  26. * 12-14-89 WAJ Removed pascal from mthread version.
  27. * 03-01-90 GJF Added #ifndef _INC_MATH and #include <cruntime.h>
  28. * stuff. Also, removed some (now) useless preprocessor
  29. * directives.
  30. * 03-29-90 GJF Replaced _cdecl with _VARTYPE1, _CALLTYPE1 or
  31. * _CALLTYPE2, as appropriate.
  32. * 07-30-90 SBM Removed special _DLL definitions of HUGE and HUGE_VAL
  33. * 08-17-90 WAJ Floating point routines now use _stdcall.
  34. * 08-08-91 GJF Added long double stuff. ANSI naming.
  35. * 08-20-91 JCR C++ and ANSI naming
  36. * 09-28-91 JCR ANSI names: DOSX32=prototypes, WIN32=#defines for now
  37. * 10-03-91 GDP Added #pragma function(...)
  38. * No floating point intrinsics for WIN32/NT86
  39. * 10-06-91 SRW Removed long double stuff.
  40. * 01-24-92 GJF Fixed [_]HUGE for crtdll.dll.
  41. * 01-30-92 GJF Removed prototypes and macros for the ieee-to/from-
  42. * msbin functions (they don't exist).
  43. * 08-05-92 GJF Function calling type and variable type macros.
  44. * 12-18-92 GDP Removed #pragma function(...)
  45. * 01-21-93 GJF Removed support for C6-386's _cdecl.
  46. * 04-06-93 SKS Replace _CRTAPI1/2 with __cdecl, _CRTVAR1 with nothing
  47. * 04-07-93 SKS Add _CRTIMP keyword for CRT DLL model
  48. * Use link-time aliases for old names, not #define's
  49. * 10-07-93 GJF Merged NT and Cuda versions. Other fixes: Jonm's
  50. * #define for _hypotl was wrong, added #define for
  51. * _cabsl, added matherr to the 'oldnames' prototypes.
  52. * 01-13-94 RDL Added #ifndef _LANGUAGE_ASSEMBLY for asm includes.
  53. * 01-24-94 GJF Merged in 01-13 change above (from crt32 tree on
  54. * \\orville\razzle).
  55. * 08-05-94 GJF Added support for user-supplied _matherr routine
  56. * to msvcrt20.dll (Win32 and Win32s versions).
  57. * 11-03-94 GJF Ensure 8 byte alignment.
  58. * 12-10-94 BWT Add _CRTIMP to MIPS float math functions.
  59. * 12-30-94 JCF Merged with mac header.
  60. * 01-05-95 JCF Don't do the prototypes under _MAC_.
  61. * 01-09-95 JCF Don't do the prototypes only under _M_M68K.
  62. * 01-11-95 RDL Put #ifndef __assembler for asm includes back.
  63. * 02-11-95 CFW Add _CRTBLD to avoid users getting wrong headers.
  64. * 02-14-95 CFW Clean up Mac merge.
  65. * 03-03-95 CFW Remove bogus 'oldnames' 68k stuff.
  66. * 03-10-95 SAH add _CRTIMP to MIPS intrinsics
  67. * 05-16-95 CFW #define exception _exception removed - hoses class exception.
  68. * 12-14-95 JWM Add "#pragma once".
  69. * 03-05-96 JWM Added PlumHall modifications.
  70. * 05-06-96 JWM Inlines are now #ifndef _M_M68K.
  71. * 05-15-96 JWM Minor fix to remove a C4244 warning from the Pow_int template.
  72. * 08-28-96 JWM Added inline long __cdecl abs(long); also __cdecls to other inlines.
  73. * 09-09-96 JWM Inlines are now #ifndef _MSC_EXTENSIONS, i.e. -Za only.
  74. * 09-17-96 RKP Treat single precision routines on ALPHA like MIPS
  75. * 10-06-96 JWM _Pow_int template no longer #ifndef _MSC_EXTENSIONS.
  76. * 01-24-96 RKP Allow single precision routines to be used as intrinsics
  77. * 02-05-97 GJF Deleted obsolete support for _CRTAPI* and _NTSDK.
  78. * Also, detab-ed.
  79. * 06-23-97 GJF Fixed typo introduced by DEC checkin.
  80. * 09-30-97 JWM Restored not-so-obsolete _CRTAPI1 support.
  81. * 10-07-97 RDL Added IA64.
  82. * 11-19-97 JWM Cleaned up _Pow_int to prevent C4146.
  83. * 05-13-99 PML Remove _CRTAPI1
  84. * 05-17-99 PML Remove all Macintosh support.
  85. * 06-04-99 PML modff and hypotf are intrinsics on IA64.
  86. * 10-28-99 PML Add #defines for useful constants
  87. * 11-02-99 PML Add extern "C++" around C++ definitions.
  88. * 12-02-99 PML add defined(_M_MRX000) check (vs7#65291)
  89. * 02-07-01 GB Place math constant defines under #ifdef (vs7#193177).
  90. * 02-21-01 PML Add _set_SSE2_enable().
  91. * 07-15-01 PML Remove all ALPHA, MIPS, and PPC code
  92. *
  93. ****/
  94. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  95. #pragma once
  96. #endif
  97. #ifndef _INC_MATH
  98. #define _INC_MATH
  99. #if !defined(_WIN32)
  100. #error ERROR: Only Win32 target supported!
  101. #endif
  102. #ifndef _CRTBLD
  103. /* This version of the header files is NOT for user programs.
  104. * It is intended for use when building the C runtimes ONLY.
  105. * The version intended for public use will not have this message.
  106. */
  107. #error ERROR: Use of C runtime library internal header file.
  108. #endif /* _CRTBLD */
  109. #ifdef _MSC_VER
  110. /*
  111. * Currently, all MS C compilers for Win32 platforms default to 8 byte
  112. * alignment.
  113. */
  114. #pragma pack(push,8)
  115. #endif /* _MSC_VER */
  116. #ifdef __cplusplus
  117. extern "C" {
  118. #endif
  119. #ifndef __assembler /* Protect from assembler */
  120. #ifndef _INTERNAL_IFSTRIP_
  121. #include <cruntime.h>
  122. #endif /* _INTERNAL_IFSTRIP_ */
  123. /* Define _CRTIMP */
  124. #ifndef _CRTIMP
  125. #ifdef CRTDLL
  126. #define _CRTIMP __declspec(dllexport)
  127. #else /* ndef CRTDLL */
  128. #ifdef _DLL
  129. #define _CRTIMP __declspec(dllimport)
  130. #else /* ndef _DLL */
  131. #define _CRTIMP
  132. #endif /* _DLL */
  133. #endif /* CRTDLL */
  134. #endif /* _CRTIMP */
  135. /* Define __cdecl for non-Microsoft compilers */
  136. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  137. #define __cdecl
  138. #endif
  139. /* Definition of _exception struct - this struct is passed to the matherr
  140. * routine when a floating point exception is detected
  141. */
  142. #ifndef _EXCEPTION_DEFINED
  143. struct _exception {
  144. int type; /* exception type - see below */
  145. char *name; /* name of function where error occured */
  146. double arg1; /* first argument to function */
  147. double arg2; /* second argument (if any) to function */
  148. double retval; /* value to be returned by function */
  149. } ;
  150. #define _EXCEPTION_DEFINED
  151. #endif
  152. /* Definition of a _complex struct to be used by those who use cabs and
  153. * want type checking on their argument
  154. */
  155. #ifndef _COMPLEX_DEFINED
  156. struct _complex {
  157. double x,y; /* real and imaginary parts */
  158. } ;
  159. #if !__STDC__ && !defined (__cplusplus) /*IFSTRIP=IGN*/
  160. /* Non-ANSI name for compatibility */
  161. #define complex _complex
  162. #endif
  163. #define _COMPLEX_DEFINED
  164. #endif
  165. #endif /* __assembler */
  166. /* Constant definitions for the exception type passed in the _exception struct
  167. */
  168. #define _DOMAIN 1 /* argument domain error */
  169. #define _SING 2 /* argument singularity */
  170. #define _OVERFLOW 3 /* overflow range error */
  171. #define _UNDERFLOW 4 /* underflow range error */
  172. #define _TLOSS 5 /* total loss of precision */
  173. #define _PLOSS 6 /* partial loss of precision */
  174. #define EDOM 33
  175. #define ERANGE 34
  176. /* Definitions of _HUGE and HUGE_VAL - respectively the XENIX and ANSI names
  177. * for a value returned in case of error by a number of the floating point
  178. * math routines
  179. */
  180. #ifndef __assembler /* Protect from assembler */
  181. _CRTIMP extern double _HUGE;
  182. #endif /* __assembler */
  183. #define HUGE_VAL _HUGE
  184. #ifdef _USE_MATH_DEFINES
  185. /* Define _USE_MATH_DEFINES before including math.h to expose these macro
  186. * definitions for common math constants. These are placed under an #ifdef
  187. * since these commonly-defined names are not part of the C/C++ standards.
  188. */
  189. /* Definitions of useful mathematical constants
  190. * M_E - e
  191. * M_LOG2E - log2(e)
  192. * M_LOG10E - log10(e)
  193. * M_LN2 - ln(2)
  194. * M_LN10 - ln(10)
  195. * M_PI - pi
  196. * M_PI_2 - pi/2
  197. * M_PI_4 - pi/4
  198. * M_1_PI - 1/pi
  199. * M_2_PI - 2/pi
  200. * M_2_SQRTPI - 2/sqrt(pi)
  201. * M_SQRT2 - sqrt(2)
  202. * M_SQRT1_2 - 1/sqrt(2)
  203. */
  204. #define M_E 2.71828182845904523536
  205. #define M_LOG2E 1.44269504088896340736
  206. #define M_LOG10E 0.434294481903251827651
  207. #define M_LN2 0.693147180559945309417
  208. #define M_LN10 2.30258509299404568402
  209. #define M_PI 3.14159265358979323846
  210. #define M_PI_2 1.57079632679489661923
  211. #define M_PI_4 0.785398163397448309616
  212. #define M_1_PI 0.318309886183790671538
  213. #define M_2_PI 0.636619772367581343076
  214. #define M_2_SQRTPI 1.12837916709551257390
  215. #define M_SQRT2 1.41421356237309504880
  216. #define M_SQRT1_2 0.707106781186547524401
  217. #endif /* _USE_MATH_DEFINES */
  218. /* Function prototypes */
  219. #if !defined(__assembler) /* Protect from assembler */
  220. int __cdecl abs(int);
  221. double __cdecl acos(double);
  222. double __cdecl asin(double);
  223. double __cdecl atan(double);
  224. double __cdecl atan2(double, double);
  225. double __cdecl cos(double);
  226. double __cdecl cosh(double);
  227. double __cdecl exp(double);
  228. double __cdecl fabs(double);
  229. double __cdecl fmod(double, double);
  230. long __cdecl labs(long);
  231. double __cdecl log(double);
  232. double __cdecl log10(double);
  233. double __cdecl pow(double, double);
  234. double __cdecl sin(double);
  235. double __cdecl sinh(double);
  236. double __cdecl tan(double);
  237. double __cdecl tanh(double);
  238. double __cdecl sqrt(double);
  239. _CRTIMP double __cdecl atof(const char *);
  240. _CRTIMP double __cdecl _cabs(struct _complex);
  241. _CRTIMP double __cdecl ceil(double);
  242. _CRTIMP double __cdecl floor(double);
  243. _CRTIMP double __cdecl frexp(double, int *);
  244. _CRTIMP double __cdecl _hypot(double, double);
  245. _CRTIMP double __cdecl _j0(double);
  246. _CRTIMP double __cdecl _j1(double);
  247. _CRTIMP double __cdecl _jn(int, double);
  248. _CRTIMP double __cdecl ldexp(double, int);
  249. int __cdecl _matherr(struct _exception *);
  250. _CRTIMP double __cdecl modf(double, double *);
  251. _CRTIMP double __cdecl _y0(double);
  252. _CRTIMP double __cdecl _y1(double);
  253. _CRTIMP double __cdecl _yn(int, double);
  254. #if defined(_M_IX86)
  255. _CRTIMP int __cdecl _set_SSE2_enable(int);
  256. #endif
  257. #if defined(_M_IA64)
  258. /* ANSI C, 4.5 Mathematics */
  259. /* 4.5.2 Trigonometric functions */
  260. float __cdecl acosf( float );
  261. float __cdecl asinf( float );
  262. float __cdecl atanf( float );
  263. float __cdecl atan2f( float , float );
  264. float __cdecl cosf( float );
  265. float __cdecl sinf( float );
  266. float __cdecl tanf( float );
  267. /* 4.5.3 Hyperbolic functions */
  268. float __cdecl coshf( float );
  269. float __cdecl sinhf( float );
  270. float __cdecl tanhf( float );
  271. /* 4.5.4 Exponential and logarithmic functions */
  272. float __cdecl expf( float );
  273. float __cdecl logf( float );
  274. float __cdecl log10f( float );
  275. float __cdecl modff( float , float* );
  276. /* 4.5.5 Power functions */
  277. float __cdecl powf( float , float );
  278. float __cdecl sqrtf( float );
  279. /* 4.5.6 Nearest integer, absolute value, and remainder functions */
  280. float __cdecl ceilf( float );
  281. float __cdecl fabsf( float );
  282. float __cdecl floorf( float );
  283. float __cdecl fmodf( float , float );
  284. float __cdecl hypotf(float, float);
  285. #endif /* _M_IA64 */
  286. /* Macros defining long double functions to be their double counterparts
  287. * (long double is synonymous with double in this implementation).
  288. */
  289. #ifndef __cplusplus /*IFSTRIP=IGN*/
  290. #define acosl(x) ((long double)acos((double)(x)))
  291. #define asinl(x) ((long double)asin((double)(x)))
  292. #define atanl(x) ((long double)atan((double)(x)))
  293. #define atan2l(x,y) ((long double)atan2((double)(x), (double)(y)))
  294. #define _cabsl _cabs
  295. #define ceill(x) ((long double)ceil((double)(x)))
  296. #define cosl(x) ((long double)cos((double)(x)))
  297. #define coshl(x) ((long double)cosh((double)(x)))
  298. #define expl(x) ((long double)exp((double)(x)))
  299. #define fabsl(x) ((long double)fabs((double)(x)))
  300. #define floorl(x) ((long double)floor((double)(x)))
  301. #define fmodl(x,y) ((long double)fmod((double)(x), (double)(y)))
  302. #define frexpl(x,y) ((long double)frexp((double)(x), (y)))
  303. #define _hypotl(x,y) ((long double)_hypot((double)(x), (double)(y)))
  304. #define ldexpl(x,y) ((long double)ldexp((double)(x), (y)))
  305. #define logl(x) ((long double)log((double)(x)))
  306. #define log10l(x) ((long double)log10((double)(x)))
  307. #define _matherrl _matherr
  308. #define modfl(x,y) ((long double)modf((double)(x), (double *)(y)))
  309. #define powl(x,y) ((long double)pow((double)(x), (double)(y)))
  310. #define sinl(x) ((long double)sin((double)(x)))
  311. #define sinhl(x) ((long double)sinh((double)(x)))
  312. #define sqrtl(x) ((long double)sqrt((double)(x)))
  313. #define tanl(x) ((long double)tan((double)(x)))
  314. #define tanhl(x) ((long double)tanh((double)(x)))
  315. #else /* __cplusplus */
  316. inline long double acosl(long double _X)
  317. {return (acos((double)_X)); }
  318. inline long double asinl(long double _X)
  319. {return (asin((double)_X)); }
  320. inline long double atanl(long double _X)
  321. {return (atan((double)_X)); }
  322. inline long double atan2l(long double _X, long double _Y)
  323. {return (atan2((double)_X, (double)_Y)); }
  324. inline long double ceill(long double _X)
  325. {return (ceil((double)_X)); }
  326. inline long double cosl(long double _X)
  327. {return (cos((double)_X)); }
  328. inline long double coshl(long double _X)
  329. {return (cosh((double)_X)); }
  330. inline long double expl(long double _X)
  331. {return (exp((double)_X)); }
  332. inline long double fabsl(long double _X)
  333. {return (fabs((double)_X)); }
  334. inline long double floorl(long double _X)
  335. {return (floor((double)_X)); }
  336. inline long double fmodl(long double _X, long double _Y)
  337. {return (fmod((double)_X, (double)_Y)); }
  338. inline long double frexpl(long double _X, int *_Y)
  339. {return (frexp((double)_X, _Y)); }
  340. inline long double ldexpl(long double _X, int _Y)
  341. {return (ldexp((double)_X, _Y)); }
  342. inline long double logl(long double _X)
  343. {return (log((double)_X)); }
  344. inline long double log10l(long double _X)
  345. {return (log10((double)_X)); }
  346. inline long double modfl(long double _X, long double *_Y)
  347. {double _Di, _Df = modf((double)_X, &_Di);
  348. *_Y = (long double)_Di;
  349. return (_Df); }
  350. inline long double powl(long double _X, long double _Y)
  351. {return (pow((double)_X, (double)_Y)); }
  352. inline long double sinl(long double _X)
  353. {return (sin((double)_X)); }
  354. inline long double sinhl(long double _X)
  355. {return (sinh((double)_X)); }
  356. inline long double sqrtl(long double _X)
  357. {return (sqrt((double)_X)); }
  358. inline long double tanl(long double _X)
  359. {return (tan((double)_X)); }
  360. inline long double tanhl(long double _X)
  361. {return (tanh((double)_X)); }
  362. inline float frexpf(float _X, int *_Y)
  363. {return ((float)frexp((double)_X, _Y)); }
  364. inline float ldexpf(float _X, int _Y)
  365. {return ((float)ldexp((double)_X, _Y)); }
  366. #if !defined(_M_IA64)
  367. inline float acosf(float _X)
  368. {return ((float)acos((double)_X)); }
  369. inline float asinf(float _X)
  370. {return ((float)asin((double)_X)); }
  371. inline float atanf(float _X)
  372. {return ((float)atan((double)_X)); }
  373. inline float atan2f(float _X, float _Y)
  374. {return ((float)atan2((double)_X, (double)_Y)); }
  375. inline float ceilf(float _X)
  376. {return ((float)ceil((double)_X)); }
  377. inline float cosf(float _X)
  378. {return ((float)cos((double)_X)); }
  379. inline float coshf(float _X)
  380. {return ((float)cosh((double)_X)); }
  381. inline float expf(float _X)
  382. {return ((float)exp((double)_X)); }
  383. inline float fabsf(float _X)
  384. {return ((float)fabs((double)_X)); }
  385. inline float floorf(float _X)
  386. {return ((float)floor((double)_X)); }
  387. inline float fmodf(float _X, float _Y)
  388. {return ((float)fmod((double)_X, (double)_Y)); }
  389. inline float logf(float _X)
  390. {return ((float)log((double)_X)); }
  391. inline float log10f(float _X)
  392. {return ((float)log10((double)_X)); }
  393. inline float modff(float _X, float *_Y)
  394. { double _Di, _Df = modf((double)_X, &_Di);
  395. *_Y = (float)_Di;
  396. return ((float)_Df); }
  397. inline float powf(float _X, float _Y)
  398. {return ((float)pow((double)_X, (double)_Y)); }
  399. inline float sinf(float _X)
  400. {return ((float)sin((double)_X)); }
  401. inline float sinhf(float _X)
  402. {return ((float)sinh((double)_X)); }
  403. inline float sqrtf(float _X)
  404. {return ((float)sqrt((double)_X)); }
  405. inline float tanf(float _X)
  406. {return ((float)tan((double)_X)); }
  407. inline float tanhf(float _X)
  408. {return ((float)tanh((double)_X)); }
  409. #endif /* !defined(_M_IA64) */
  410. #endif /* __cplusplus */
  411. #endif /* __assembler */
  412. #if !__STDC__
  413. /* Non-ANSI names for compatibility */
  414. #define DOMAIN _DOMAIN
  415. #define SING _SING
  416. #define OVERFLOW _OVERFLOW
  417. #define UNDERFLOW _UNDERFLOW
  418. #define TLOSS _TLOSS
  419. #define PLOSS _PLOSS
  420. #define matherr _matherr
  421. #ifndef __assembler /* Protect from assembler */
  422. _CRTIMP extern double HUGE;
  423. _CRTIMP double __cdecl cabs(struct _complex);
  424. _CRTIMP double __cdecl hypot(double, double);
  425. _CRTIMP double __cdecl j0(double);
  426. _CRTIMP double __cdecl j1(double);
  427. _CRTIMP double __cdecl jn(int, double);
  428. int __cdecl matherr(struct _exception *);
  429. _CRTIMP double __cdecl y0(double);
  430. _CRTIMP double __cdecl y1(double);
  431. _CRTIMP double __cdecl yn(int, double);
  432. #endif /* __assembler */
  433. #endif /* __STDC__ */
  434. #ifdef __cplusplus /*IFSTRIP=IGN*/
  435. }
  436. extern "C++" {
  437. template<class _Ty> inline
  438. _Ty _Pow_int(_Ty _X, int _Y)
  439. {unsigned int _N;
  440. if (_Y >= 0)
  441. _N = _Y;
  442. else
  443. _N = -_Y;
  444. for (_Ty _Z = _Ty(1); ; _X *= _X)
  445. {if ((_N & 1) != 0)
  446. _Z *= _X;
  447. if ((_N >>= 1) == 0)
  448. return (_Y < 0 ? _Ty(1) / _Z : _Z); }}
  449. #ifndef _MSC_EXTENSIONS
  450. inline long __cdecl abs(long _X)
  451. {return (labs(_X)); }
  452. inline double __cdecl abs(double _X)
  453. {return (fabs(_X)); }
  454. inline double __cdecl pow(double _X, int _Y)
  455. {return (_Pow_int(_X, _Y)); }
  456. inline double __cdecl pow(int _X, int _Y)
  457. {return (_Pow_int(_X, _Y)); }
  458. inline float __cdecl abs(float _X)
  459. {return (fabsf(_X)); }
  460. inline float __cdecl acos(float _X)
  461. {return (acosf(_X)); }
  462. inline float __cdecl asin(float _X)
  463. {return (asinf(_X)); }
  464. inline float __cdecl atan(float _X)
  465. {return (atanf(_X)); }
  466. inline float __cdecl atan2(float _Y, float _X)
  467. {return (atan2f(_Y, _X)); }
  468. inline float __cdecl ceil(float _X)
  469. {return (ceilf(_X)); }
  470. inline float __cdecl cos(float _X)
  471. {return (cosf(_X)); }
  472. inline float __cdecl cosh(float _X)
  473. {return (coshf(_X)); }
  474. inline float __cdecl exp(float _X)
  475. {return (expf(_X)); }
  476. inline float __cdecl fabs(float _X)
  477. {return (fabsf(_X)); }
  478. inline float __cdecl floor(float _X)
  479. {return (floorf(_X)); }
  480. inline float __cdecl fmod(float _X, float _Y)
  481. {return (fmodf(_X, _Y)); }
  482. inline float __cdecl frexp(float _X, int * _Y)
  483. {return (frexpf(_X, _Y)); }
  484. inline float __cdecl ldexp(float _X, int _Y)
  485. {return (ldexpf(_X, _Y)); }
  486. inline float __cdecl log(float _X)
  487. {return (logf(_X)); }
  488. inline float __cdecl log10(float _X)
  489. {return (log10f(_X)); }
  490. inline float __cdecl modf(float _X, float * _Y)
  491. {return (modff(_X, _Y)); }
  492. inline float __cdecl pow(float _X, float _Y)
  493. {return (powf(_X, _Y)); }
  494. inline float __cdecl pow(float _X, int _Y)
  495. {return (_Pow_int(_X, _Y)); }
  496. inline float __cdecl sin(float _X)
  497. {return (sinf(_X)); }
  498. inline float __cdecl sinh(float _X)
  499. {return (sinhf(_X)); }
  500. inline float __cdecl sqrt(float _X)
  501. {return (sqrtf(_X)); }
  502. inline float __cdecl tan(float _X)
  503. {return (tanf(_X)); }
  504. inline float __cdecl tanh(float _X)
  505. {return (tanhf(_X)); }
  506. inline long double __cdecl abs(long double _X)
  507. {return (fabsl(_X)); }
  508. inline long double __cdecl acos(long double _X)
  509. {return (acosl(_X)); }
  510. inline long double __cdecl asin(long double _X)
  511. {return (asinl(_X)); }
  512. inline long double __cdecl atan(long double _X)
  513. {return (atanl(_X)); }
  514. inline long double __cdecl atan2(long double _Y, long double _X)
  515. {return (atan2l(_Y, _X)); }
  516. inline long double __cdecl ceil(long double _X)
  517. {return (ceill(_X)); }
  518. inline long double __cdecl cos(long double _X)
  519. {return (cosl(_X)); }
  520. inline long double __cdecl cosh(long double _X)
  521. {return (coshl(_X)); }
  522. inline long double __cdecl exp(long double _X)
  523. {return (expl(_X)); }
  524. inline long double __cdecl fabs(long double _X)
  525. {return (fabsl(_X)); }
  526. inline long double __cdecl floor(long double _X)
  527. {return (floorl(_X)); }
  528. inline long double __cdecl fmod(long double _X, long double _Y)
  529. {return (fmodl(_X, _Y)); }
  530. inline long double __cdecl frexp(long double _X, int * _Y)
  531. {return (frexpl(_X, _Y)); }
  532. inline long double __cdecl ldexp(long double _X, int _Y)
  533. {return (ldexpl(_X, _Y)); }
  534. inline long double __cdecl log(long double _X)
  535. {return (logl(_X)); }
  536. inline long double __cdecl log10(long double _X)
  537. {return (log10l(_X)); }
  538. inline long double __cdecl modf(long double _X, long double * _Y)
  539. {return (modfl(_X, _Y)); }
  540. inline long double __cdecl pow(long double _X, long double _Y)
  541. {return (powl(_X, _Y)); }
  542. inline long double __cdecl pow(long double _X, int _Y)
  543. {return (_Pow_int(_X, _Y)); }
  544. inline long double __cdecl sin(long double _X)
  545. {return (sinl(_X)); }
  546. inline long double __cdecl sinh(long double _X)
  547. {return (sinhl(_X)); }
  548. inline long double __cdecl sqrt(long double _X)
  549. {return (sqrtl(_X)); }
  550. inline long double __cdecl tan(long double _X)
  551. {return (tanl(_X)); }
  552. inline long double __cdecl tanh(long double _X)
  553. {return (tanhl(_X)); }
  554. #endif /* _MSC_EXTENSIONS */
  555. }
  556. #endif /* __cplusplus */
  557. #ifdef _MSC_VER
  558. #pragma pack(pop)
  559. #endif /* _MSC_VER */
  560. #endif /* _INC_MATH */