home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / math.h < prev    next >
C/C++ Source or Header  |  1998-06-17  |  22KB  |  657 lines

  1. /***
  2. *math.h - definitions and declarations for math library
  3. *
  4. *       Copyright (c) 1985-1997, 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. ****/
  14.  
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif  /* _MSC_VER > 1000 */
  18.  
  19. #ifndef _INC_MATH
  20. #define _INC_MATH
  21.  
  22. #if !defined (_WIN32) && !defined (_MAC)
  23. #error ERROR: Only Mac or Win32 targets supported!
  24. #endif  /* !defined (_WIN32) && !defined (_MAC) */
  25.  
  26. #ifndef _CRTBLD
  27. /* This version of the header files is NOT for user programs.
  28.  * It is intended for use when building the C runtimes ONLY.
  29.  * The version intended for public use will not have this message.
  30.  */
  31. #error ERROR: Use of C runtime library internal header file.
  32. #endif  /* _CRTBLD */
  33.  
  34. #ifdef _MSC_VER
  35. /*
  36.  * Currently, all MS C compilers for Win32 platforms default to 8 byte
  37.  * alignment.
  38.  */
  39. #pragma pack(push,8)
  40. #endif  /* _MSC_VER */
  41.  
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif  /* __cplusplus */
  45.  
  46. #ifndef __assembler
  47. #ifndef _INTERNAL_IFSTRIP_
  48. #include <cruntime.h>
  49. #endif  /* _INTERNAL_IFSTRIP_ */
  50.  
  51. /* Define _CRTIMP */
  52.  
  53. #ifndef _CRTIMP
  54. #ifdef CRTDLL
  55. #define _CRTIMP __declspec(dllexport)
  56. #else  /* CRTDLL */
  57. #ifdef _DLL
  58. #define _CRTIMP __declspec(dllimport)
  59. #else  /* _DLL */
  60. #define _CRTIMP
  61. #endif  /* _DLL */
  62. #endif  /* CRTDLL */
  63. #endif  /* _CRTIMP */
  64.  
  65.  
  66. /* Define __cdecl for non-Microsoft compilers */
  67.  
  68. #if (!defined (_MSC_VER) && !defined (__cdecl))
  69. #define __cdecl
  70. #endif  /* (!defined (_MSC_VER) && !defined (__cdecl)) */
  71.  
  72. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  73.  
  74. #ifndef _CRTAPI1
  75. #if _MSC_VER >= 800 && _M_IX86 >= 300
  76. #define _CRTAPI1 __cdecl
  77. #else  /* _MSC_VER >= 800 && _M_IX86 >= 300 */
  78. #define _CRTAPI1
  79. #endif  /* _MSC_VER >= 800 && _M_IX86 >= 300 */
  80. #endif  /* _CRTAPI1 */
  81.  
  82.  
  83. /* Definition of _exception struct - this struct is passed to the matherr
  84.  * routine when a floating point exception is detected
  85.  */
  86.  
  87. #ifndef _EXCEPTION_DEFINED
  88. struct _exception {
  89.         int type;       /* exception type - see below */
  90.         char *name;     /* name of function where error occured */
  91.         double arg1;    /* first argument to function */
  92.         double arg2;    /* second argument (if any) to function */
  93.         double retval;  /* value to be returned by function */
  94.         } ;
  95.  
  96. #define _EXCEPTION_DEFINED
  97. #endif  /* _EXCEPTION_DEFINED */
  98.  
  99.  
  100. /* Definition of a _complex struct to be used by those who use cabs and
  101.  * want type checking on their argument
  102.  */
  103.  
  104. #ifndef _COMPLEX_DEFINED
  105. struct _complex {
  106.         double x,y; /* real and imaginary parts */
  107.         } ;
  108.  
  109. #if !__STDC__ && !defined (__cplusplus)
  110. /* Non-ANSI name for compatibility */
  111. #define complex _complex
  112. #endif  /* !__STDC__ && !defined (__cplusplus) */
  113.  
  114. #define _COMPLEX_DEFINED
  115. #endif  /* _COMPLEX_DEFINED */
  116. #endif  /* __assembler */
  117.  
  118.  
  119. /* Constant definitions for the exception type passed in the _exception struct
  120.  */
  121.  
  122. #define _DOMAIN     1   /* argument domain error */
  123. #define _SING       2   /* argument singularity */
  124. #define _OVERFLOW   3   /* overflow range error */
  125. #define _UNDERFLOW  4   /* underflow range error */
  126. #define _TLOSS      5   /* total loss of precision */
  127. #define _PLOSS      6   /* partial loss of precision */
  128.  
  129. #define EDOM        33
  130. #define ERANGE      34
  131.  
  132.  
  133. /* Definitions of _HUGE and HUGE_VAL - respectively the XENIX and ANSI names
  134.  * for a value returned in case of error by a number of the floating point
  135.  * math routines
  136.  */
  137. #ifndef __assembler
  138. _CRTIMP extern double _HUGE;
  139. #endif  /* __assembler */
  140.  
  141. #define HUGE_VAL _HUGE
  142.  
  143.  
  144. /* Function prototypes */
  145.  
  146. #if !defined (__assembler)
  147. #if _M_MRX000
  148. _CRTIMP int     __cdecl abs(int);
  149. _CRTIMP double  __cdecl acos(double);
  150. _CRTIMP double  __cdecl asin(double);
  151. _CRTIMP double  __cdecl atan(double);
  152. _CRTIMP double  __cdecl atan2(double, double);
  153. _CRTIMP double  __cdecl cos(double);
  154. _CRTIMP double  __cdecl cosh(double);
  155. _CRTIMP double  __cdecl exp(double);
  156. _CRTIMP double  __cdecl fabs(double);
  157. _CRTIMP double  __cdecl fmod(double, double);
  158. _CRTIMP long    __cdecl labs(long);
  159. _CRTIMP double  __cdecl log(double);
  160. _CRTIMP double  __cdecl log10(double);
  161. _CRTIMP double  __cdecl pow(double, double);
  162. _CRTIMP double  __cdecl sin(double);
  163. _CRTIMP double  __cdecl sinh(double);
  164. _CRTIMP double  __cdecl tan(double);
  165. _CRTIMP double  __cdecl tanh(double);
  166. _CRTIMP double  __cdecl sqrt(double);
  167. #else  /* _M_MRX000 */
  168.         int     __cdecl abs(int);
  169.         double  __cdecl acos(double);
  170.         double  __cdecl asin(double);
  171.         double  __cdecl atan(double);
  172.         double  __cdecl atan2(double, double);
  173.         double  __cdecl cos(double);
  174.         double  __cdecl cosh(double);
  175.         double  __cdecl exp(double);
  176.         double  __cdecl fabs(double);
  177.         double  __cdecl fmod(double, double);
  178.         long    __cdecl labs(long);
  179.         double  __cdecl log(double);
  180.         double  __cdecl log10(double);
  181.         double  __cdecl pow(double, double);
  182.         double  __cdecl sin(double);
  183.         double  __cdecl sinh(double);
  184.         double  __cdecl tan(double);
  185.         double  __cdecl tanh(double);
  186.         double  __cdecl sqrt(double);
  187. #endif  /* _M_MRX000 */
  188. _CRTIMP double  __cdecl atof(const char *);
  189. _CRTIMP double  __cdecl _cabs(struct _complex);
  190. #if defined (_M_ALPHA)
  191.         double  __cdecl ceil(double);
  192.         double  __cdecl floor(double);
  193. #else  /* defined (_M_ALPHA) */
  194. _CRTIMP double  __cdecl ceil(double);
  195. _CRTIMP double  __cdecl floor(double);
  196. #endif  /* defined (_M_ALPHA) */
  197. _CRTIMP double  __cdecl frexp(double, int *);
  198. _CRTIMP double  __cdecl _hypot(double, double);
  199. _CRTIMP double  __cdecl _j0(double);
  200. _CRTIMP double  __cdecl _j1(double);
  201. _CRTIMP double  __cdecl _jn(int, double);
  202. _CRTIMP double  __cdecl ldexp(double, int);
  203.         int     __cdecl _matherr(struct _exception *);
  204. _CRTIMP double  __cdecl modf(double, double *);
  205.  
  206. _CRTIMP double  __cdecl _y0(double);
  207. _CRTIMP double  __cdecl _y1(double);
  208. _CRTIMP double  __cdecl _yn(int, double);
  209.  
  210.  
  211. #if defined (_M_MRX000)
  212.  
  213. /* MIPS fast prototypes for float */
  214. /* ANSI C, 4.5 Mathematics        */
  215.  
  216. /* 4.5.2 Trigonometric functions */
  217.  
  218. _CRTIMP float  __cdecl acosf( float );
  219. _CRTIMP float  __cdecl asinf( float );
  220. _CRTIMP float  __cdecl atanf( float );
  221. _CRTIMP float  __cdecl atan2f( float , float );
  222. _CRTIMP float  __cdecl cosf( float );
  223. _CRTIMP float  __cdecl sinf( float );
  224. _CRTIMP float  __cdecl tanf( float );
  225.  
  226. /* 4.5.3 Hyperbolic functions */
  227. _CRTIMP float  __cdecl coshf( float );
  228. _CRTIMP float  __cdecl sinhf( float );
  229. _CRTIMP float  __cdecl tanhf( float );
  230.  
  231. /* 4.5.4 Exponential and logarithmic functions */
  232. _CRTIMP float  __cdecl expf( float );
  233. _CRTIMP float  __cdecl logf( float );
  234. _CRTIMP float  __cdecl log10f( float );
  235. _CRTIMP float  __cdecl modff( float , float* );
  236.  
  237. /* 4.5.5 Power functions */
  238. _CRTIMP float  __cdecl powf( float , float );
  239.         float  __cdecl sqrtf( float );
  240.  
  241. /* 4.5.6 Nearest integer, absolute value, and remainder functions */
  242.         float  __cdecl ceilf( float );
  243.         float  __cdecl fabsf( float );
  244.         float  __cdecl floorf( float );
  245. _CRTIMP float  __cdecl fmodf( float , float );
  246.  
  247. _CRTIMP float  __cdecl hypotf(float, float);
  248.  
  249. #endif  /* defined (_M_MRX000) */
  250.  
  251. #if defined (_M_ALPHA)
  252.  
  253. /* ALPHA fast prototypes for float */
  254. /* ANSI C, 4.5 Mathematics        */
  255.  
  256. /* 4.5.2 Trigonometric functions */
  257.  
  258.         float  __cdecl acosf( float );
  259.         float  __cdecl asinf( float );
  260.         float  __cdecl atanf( float );
  261.         float  __cdecl atan2f( float , float );
  262.         float  __cdecl cosf( float );
  263.         float  __cdecl sinf( float );
  264.         float  __cdecl tanf( float );
  265.  
  266. /* 4.5.3 Hyperbolic functions */
  267.         float  __cdecl coshf( float );
  268.         float  __cdecl sinhf( float );
  269.         float  __cdecl tanhf( float );
  270.  
  271. /* 4.5.4 Exponential and logarithmic functions */
  272.         float  __cdecl expf( float );
  273.         float  __cdecl logf( float );
  274.         float  __cdecl log10f( float );
  275. _CRTIMP float  __cdecl modff( float , float* );
  276.  
  277. /* 4.5.5 Power functions */
  278.         float  __cdecl powf( float , float );
  279.         float  __cdecl sqrtf( float );
  280.  
  281. /* 4.5.6 Nearest integer, absolute value, and remainder functions */
  282.         float  __cdecl ceilf( float );
  283.         float  __cdecl fabsf( float );
  284.         float  __cdecl floorf( float );
  285.         float  __cdecl fmodf( float , float );
  286.  
  287. _CRTIMP float  __cdecl _hypotf(float, float);
  288.  
  289. #endif  /* defined (_M_ALPHA) */
  290.  
  291. #if !defined (_M_M68K)
  292. /* Macros defining long double functions to be their double counterparts
  293.  * (long double is synonymous with double in this implementation).
  294.  */
  295.  
  296.  
  297. #ifndef __cplusplus
  298. #define acosl(x)    ((long double)acos((double)(x)))
  299. #define asinl(x)    ((long double)asin((double)(x)))
  300. #define atanl(x)    ((long double)atan((double)(x)))
  301. #define atan2l(x,y) ((long double)atan2((double)(x), (double)(y)))
  302. #define _cabsl      _cabs
  303. #define ceill(x)    ((long double)ceil((double)(x)))
  304. #define cosl(x)     ((long double)cos((double)(x)))
  305. #define coshl(x)    ((long double)cosh((double)(x)))
  306. #define expl(x)     ((long double)exp((double)(x)))
  307. #define fabsl(x)    ((long double)fabs((double)(x)))
  308. #define floorl(x)   ((long double)floor((double)(x)))
  309. #define fmodl(x,y)  ((long double)fmod((double)(x), (double)(y)))
  310. #define frexpl(x,y) ((long double)frexp((double)(x), (y)))
  311. #define _hypotl(x,y)    ((long double)_hypot((double)(x), (double)(y)))
  312. #define ldexpl(x,y) ((long double)ldexp((double)(x), (y)))
  313. #define logl(x)     ((long double)log((double)(x)))
  314. #define log10l(x)   ((long double)log10((double)(x)))
  315. #define _matherrl   _matherr
  316. #define modfl(x,y)  ((long double)modf((double)(x), (double *)(y)))
  317. #define powl(x,y)   ((long double)pow((double)(x), (double)(y)))
  318. #define sinl(x)     ((long double)sin((double)(x)))
  319. #define sinhl(x)    ((long double)sinh((double)(x)))
  320. #define sqrtl(x)    ((long double)sqrt((double)(x)))
  321. #define tanl(x)     ((long double)tan((double)(x)))
  322. #define tanhl(x)    ((long double)tanh((double)(x)))
  323. #else  /* __cplusplus */
  324. inline long double acosl(long double _X)
  325.         {return (acos((double)_X)); }
  326. inline long double asinl(long double _X)
  327.         {return (asin((double)_X)); }
  328. inline long double atanl(long double _X)
  329.         {return (atan((double)_X)); }
  330. inline long double atan2l(long double _X, long double _Y)
  331.         {return (atan2((double)_X, (double)_Y)); }
  332. inline long double ceill(long double _X)
  333.         {return (ceil((double)_X)); }
  334. inline long double cosl(long double _X)
  335.         {return (cos((double)_X)); }
  336. inline long double coshl(long double _X)
  337.         {return (cosh((double)_X)); }
  338. inline long double expl(long double _X)
  339.         {return (exp((double)_X)); }
  340. inline long double fabsl(long double _X)
  341.         {return (fabs((double)_X)); }
  342. inline long double floorl(long double _X)
  343.         {return (floor((double)_X)); }
  344. inline long double fmodl(long double _X, long double _Y)
  345.         {return (fmod((double)_X, (double)_Y)); }
  346. inline long double frexpl(long double _X, int *_Y)
  347.         {return (frexp((double)_X, _Y)); }
  348. inline long double ldexpl(long double _X, int _Y)
  349.         {return (ldexp((double)_X, _Y)); }
  350. inline long double logl(long double _X)
  351.         {return (log((double)_X)); }
  352. inline long double log10l(long double _X)
  353.         {return (log10((double)_X)); }
  354. inline long double modfl(long double _X, long double *_Y)
  355.         {double _Di, _Df = modf((double)_X, &_Di);
  356.         *_Y = (long double)_Di;
  357.         return (_Df); }
  358. inline long double powl(long double _X, long double _Y)
  359.         {return (pow((double)_X, (double)_Y)); }
  360. inline long double sinl(long double _X)
  361.         {return (sin((double)_X)); }
  362. inline long double sinhl(long double _X)
  363.         {return (sinh((double)_X)); }
  364. inline long double sqrtl(long double _X)
  365.         {return (sqrt((double)_X)); }
  366. inline long double tanl(long double _X)
  367.         {return (tan((double)_X)); }
  368. inline long double tanhl(long double _X)
  369.         {return (tanh((double)_X)); }
  370.  
  371. inline float frexpf(float _X, int *_Y)
  372.         {return ((float)frexp((double)_X, _Y)); }
  373. inline float ldexpf(float _X, int _Y)
  374.         {return ((float)ldexp((double)_X, _Y)); }
  375. #if !defined (_M_MRX000) && !defined (_M_ALPHA)
  376. inline float acosf(float _X)
  377.         {return ((float)acos((double)_X)); }
  378. inline float asinf(float _X)
  379.         {return ((float)asin((double)_X)); }
  380. inline float atanf(float _X)
  381.         {return ((float)atan((double)_X)); }
  382. inline float atan2f(float _X, float _Y)
  383.         {return ((float)atan2((double)_X, (double)_Y)); }
  384. inline float ceilf(float _X)
  385.         {return ((float)ceil((double)_X)); }
  386. inline float cosf(float _X)
  387.         {return ((float)cos((double)_X)); }
  388. inline float coshf(float _X)
  389.         {return ((float)cosh((double)_X)); }
  390. inline float expf(float _X)
  391.         {return ((float)exp((double)_X)); }
  392. inline float fabsf(float _X)
  393.         {return ((float)fabs((double)_X)); }
  394. inline float floorf(float _X)
  395.         {return ((float)floor((double)_X)); }
  396. inline float fmodf(float _X, float _Y)
  397.         {return ((float)fmod((double)_X, (double)_Y)); }
  398. inline float logf(float _X)
  399.         {return ((float)log((double)_X)); }
  400. inline float log10f(float _X)
  401.         {return ((float)log10((double)_X)); }
  402. inline float modff(float _X, float *_Y)
  403.         { double _Di, _Df = modf((double)_X, &_Di);
  404.         *_Y = (float)_Di;
  405.         return ((float)_Df); }
  406. inline float powf(float _X, float _Y)
  407.         {return ((float)pow((double)_X, (double)_Y)); }
  408. inline float sinf(float _X)
  409.         {return ((float)sin((double)_X)); }
  410. inline float sinhf(float _X)
  411.         {return ((float)sinh((double)_X)); }
  412. inline float sqrtf(float _X)
  413.         {return ((float)sqrt((double)_X)); }
  414. inline float tanf(float _X)
  415.         {return ((float)tan((double)_X)); }
  416. inline float tanhf(float _X)
  417.         {return ((float)tanh((double)_X)); }
  418. #endif  /* !defined (_M_MRX000) && !defined (_M_ALPHA) */
  419. #endif  /* __cplusplus */
  420. #endif  /* !defined (_M_M68K) */
  421. #endif  /* !defined (__assembler) */
  422.  
  423. #if !__STDC__
  424.  
  425. /* Non-ANSI names for compatibility */
  426.  
  427. #define DOMAIN      _DOMAIN
  428. #define SING        _SING
  429. #define OVERFLOW    _OVERFLOW
  430. #define UNDERFLOW   _UNDERFLOW
  431. #define TLOSS       _TLOSS
  432. #define PLOSS       _PLOSS
  433.  
  434. #ifndef _MAC
  435. #define matherr     _matherr
  436. #endif  /* _MAC */
  437.  
  438. #ifndef __assembler
  439.  
  440. _CRTIMP extern double HUGE;
  441.  
  442. _CRTIMP double  __cdecl cabs(struct _complex);
  443. _CRTIMP double  __cdecl hypot(double, double);
  444. _CRTIMP double  __cdecl j0(double);
  445. _CRTIMP double  __cdecl j1(double);
  446. _CRTIMP double  __cdecl jn(int, double);
  447.         int     __cdecl matherr(struct _exception *);
  448. _CRTIMP double  __cdecl y0(double);
  449. _CRTIMP double  __cdecl y1(double);
  450. _CRTIMP double  __cdecl yn(int, double);
  451.  
  452. #endif  /* __assembler */
  453.  
  454. #endif  /* !__STDC__ */
  455.  
  456. #ifdef _M_M68K
  457. /* definition of _exceptionl struct - this struct is passed to the _matherrl
  458.  * routine when a floating point exception is detected in a long double routine
  459.  */
  460.  
  461. #ifndef _LD_EXCEPTION_DEFINED
  462.  
  463. struct _exceptionl {
  464.         int type;           /* exception type - see below */
  465.         char *name;         /* name of function where error occured */
  466.         long double arg1;   /* first argument to function */
  467.         long double arg2;   /* second argument (if any) to function */
  468.         long double retval; /* value to be returned by function */
  469. } ;
  470. #define _LD_EXCEPTION_DEFINED
  471. #endif  /* _LD_EXCEPTION_DEFINED */
  472.  
  473.  
  474. /* definition of a _complexl struct to be used by those who use _cabsl and
  475.  * want type checking on their argument
  476.  */
  477.  
  478. #ifndef _LD_COMPLEX_DEFINED
  479. struct _complexl {
  480.         long double x,y;    /* real and imaginary parts */
  481. } ;
  482. #define _LD_COMPLEX_DEFINED
  483. #endif  /* _LD_COMPLEX_DEFINED */
  484.  
  485.  
  486. long double  __cdecl acosl(long double);
  487. long double  __cdecl asinl(long double);
  488. long double  __cdecl atanl(long double);
  489. long double  __cdecl atan2l(long double, long double);
  490. long double  __cdecl _atold(const char  *);
  491. long double  __cdecl _cabsl(struct _complexl);
  492. long double  __cdecl ceill(long double);
  493. long double  __cdecl cosl(long double);
  494. long double  __cdecl coshl(long double);
  495. long double  __cdecl expl(long double);
  496. long double  __cdecl fabsl(long double);
  497. long double  __cdecl floorl(long double);
  498. long double  __cdecl fmodl(long double, long double);
  499. long double  __cdecl frexpl(long double, int  *);
  500. long double  __cdecl _hypotl(long double, long double);
  501. long double  __cdecl _j0l(long double);
  502. long double  __cdecl _j1l(long double);
  503. long double  __cdecl _jnl(int, long double);
  504. long double  __cdecl ldexpl(long double, int);
  505. long double  __cdecl logl(long double);
  506. long double  __cdecl log10l(long double);
  507. int          __cdecl _matherrl(struct _exceptionl  *);
  508. long double  __cdecl modfl(long double, long double  *);
  509. long double  __cdecl powl(long double, long double);
  510. long double  __cdecl sinl(long double);
  511. long double  __cdecl sinhl(long double);
  512. long double  __cdecl sqrtl(long double);
  513. long double  __cdecl tanl(long double);
  514. long double  __cdecl tanhl(long double);
  515. long double  __cdecl _y0l(long double);
  516. long double  __cdecl _y1l(long double);
  517. long double  __cdecl _ynl(int, long double);
  518.  
  519. #endif  /* _M_M68K */
  520.  
  521.  
  522. #ifdef __cplusplus
  523. }
  524.  
  525. #if !defined (_M_M68K)
  526.  
  527.  
  528. template<class _Ty> inline
  529.         _Ty _Pow_int(_Ty _X, int _Y)
  530.         {unsigned int _N;
  531.         if (_Y >= 0)
  532.                 _N = _Y;
  533.         else
  534.                 _N = -_Y;
  535.         for (_Ty _Z = _Ty(1); ; _X *= _X)
  536.                 {if ((_N & 1) != 0)
  537.                         _Z *= _X;
  538.                 if ((_N >>= 1) == 0)
  539.                         return (_Y < 0 ? _Ty(1) / _Z : _Z); }}
  540.  
  541. #ifndef _MSC_EXTENSIONS
  542.  
  543. inline long __cdecl abs(long _X)
  544.         {return (labs(_X)); }
  545. inline double __cdecl abs(double _X)
  546.         {return (fabs(_X)); }
  547. inline double __cdecl pow(double _X, int _Y)
  548.         {return (_Pow_int(_X, _Y)); }
  549. inline double __cdecl pow(int _X, int _Y)
  550.         {return (_Pow_int(_X, _Y)); }
  551. inline float __cdecl abs(float _X)
  552.         {return (fabsf(_X)); }
  553. inline float __cdecl acos(float _X)
  554.         {return (acosf(_X)); }
  555. inline float __cdecl asin(float _X)
  556.         {return (asinf(_X)); }
  557. inline float __cdecl atan(float _X)
  558.         {return (atanf(_X)); }
  559. inline float __cdecl atan2(float _Y, float _X)
  560.         {return (atan2f(_Y, _X)); }
  561. inline float __cdecl ceil(float _X)
  562.         {return (ceilf(_X)); }
  563. inline float __cdecl cos(float _X)
  564.         {return (cosf(_X)); }
  565. inline float __cdecl cosh(float _X)
  566.         {return (coshf(_X)); }
  567. inline float __cdecl exp(float _X)
  568.         {return (expf(_X)); }
  569. inline float __cdecl fabs(float _X)
  570.         {return (fabsf(_X)); }
  571. inline float __cdecl floor(float _X)
  572.         {return (floorf(_X)); }
  573. inline float __cdecl fmod(float _X, float _Y)
  574.         {return (fmodf(_X, _Y)); }
  575. inline float __cdecl frexp(float _X, int * _Y)
  576.         {return (frexpf(_X, _Y)); }
  577. inline float __cdecl ldexp(float _X, int _Y)
  578.         {return (ldexpf(_X, _Y)); }
  579. inline float __cdecl log(float _X)
  580.         {return (logf(_X)); }
  581. inline float __cdecl log10(float _X)
  582.         {return (log10f(_X)); }
  583. inline float __cdecl modf(float _X, float * _Y)
  584.         {return (modff(_X, _Y)); }
  585. inline float __cdecl pow(float _X, float _Y)
  586.         {return (powf(_X, _Y)); }
  587. inline float __cdecl pow(float _X, int _Y)
  588.         {return (_Pow_int(_X, _Y)); }
  589. inline float __cdecl sin(float _X)
  590.         {return (sinf(_X)); }
  591. inline float __cdecl sinh(float _X)
  592.         {return (sinhf(_X)); }
  593. inline float __cdecl sqrt(float _X)
  594.         {return (sqrtf(_X)); }
  595. inline float __cdecl tan(float _X)
  596.         {return (tanf(_X)); }
  597. inline float __cdecl tanh(float _X)
  598.         {return (tanhf(_X)); }
  599. inline long double __cdecl abs(long double _X)
  600.         {return (fabsl(_X)); }
  601. inline long double __cdecl acos(long double _X)
  602.         {return (acosl(_X)); }
  603. inline long double __cdecl asin(long double _X)
  604.         {return (asinl(_X)); }
  605. inline long double __cdecl atan(long double _X)
  606.         {return (atanl(_X)); }
  607. inline long double __cdecl atan2(long double _Y, long double _X)
  608.         {return (atan2l(_Y, _X)); }
  609. inline long double __cdecl ceil(long double _X)
  610.         {return (ceill(_X)); }
  611. inline long double __cdecl cos(long double _X)
  612.         {return (cosl(_X)); }
  613. inline long double __cdecl cosh(long double _X)
  614.         {return (coshl(_X)); }
  615. inline long double __cdecl exp(long double _X)
  616.         {return (expl(_X)); }
  617. inline long double __cdecl fabs(long double _X)
  618.         {return (fabsl(_X)); }
  619. inline long double __cdecl floor(long double _X)
  620.         {return (floorl(_X)); }
  621. inline long double __cdecl fmod(long double _X, long double _Y)
  622.         {return (fmodl(_X, _Y)); }
  623. inline long double __cdecl frexp(long double _X, int * _Y)
  624.         {return (frexpl(_X, _Y)); }
  625. inline long double __cdecl ldexp(long double _X, int _Y)
  626.         {return (ldexpl(_X, _Y)); }
  627. inline long double __cdecl log(long double _X)
  628.         {return (logl(_X)); }
  629. inline long double __cdecl log10(long double _X)
  630.         {return (log10l(_X)); }
  631. inline long double __cdecl modf(long double _X, long double * _Y)
  632.         {return (modfl(_X, _Y)); }
  633. inline long double __cdecl pow(long double _X, long double _Y)
  634.         {return (powl(_X, _Y)); }
  635. inline long double __cdecl pow(long double _X, int _Y)
  636.         {return (_Pow_int(_X, _Y)); }
  637. inline long double __cdecl sin(long double _X)
  638.         {return (sinl(_X)); }
  639. inline long double __cdecl sinh(long double _X)
  640.         {return (sinhl(_X)); }
  641. inline long double __cdecl sqrt(long double _X)
  642.         {return (sqrtl(_X)); }
  643. inline long double __cdecl tan(long double _X)
  644.         {return (tanl(_X)); }
  645. inline long double __cdecl tanh(long double _X)
  646.         {return (tanhl(_X)); }
  647.  
  648. #endif  /* _MSC_EXTENSIONS */
  649. #endif  /* !defined (_M_M68K) */
  650. #endif  /* __cplusplus */
  651.  
  652. #ifdef _MSC_VER
  653. #pragma pack(pop)
  654. #endif  /* _MSC_VER */
  655.  
  656. #endif  /* _INC_MATH */
  657.