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