home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Magazine / HomeAutomation / Apache / include / php / ext / standard / php_math.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-13  |  3.9 KB  |  125 lines

  1. /* 
  2.    +----------------------------------------------------------------------+
  3.    | PHP HTML Embedded Scripting Language Version 3.0                     |
  4.    +----------------------------------------------------------------------+
  5.    | Copyright (c) 1997,1998 PHP Development Team (See Credits file)      |
  6.    +----------------------------------------------------------------------+
  7.    | This program is free software; you can redistribute it and/or modify |
  8.    | it under the terms of one of the following licenses:                 |
  9.    |                                                                      |
  10.    |  A) the GNU General Public License as published by the Free Software |
  11.    |     Foundation; either version 2 of the License, or (at your option) |
  12.    |     any later version.                                               |
  13.    |                                                                      |
  14.    |  B) the PHP License as published by the PHP Development Team and     |
  15.    |     included in the distribution in the file: LICENSE                |
  16.    |                                                                      |
  17.    | This program is distributed in the hope that it will be useful,      |
  18.    | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
  19.    | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
  20.    | GNU General Public License for more details.                         |
  21.    |                                                                      |
  22.    | You should have received a copy of both licenses referred to here.   |
  23.    | If you did not, or have any questions about PHP licensing, please    |
  24.    | contact core@php.net.                                                |
  25.    +----------------------------------------------------------------------+
  26.    | Authors: Jim Winstead (jimw@php.net)                                 |
  27.    |          Stig Sæther Bakken <ssb@guardian.no>                        |
  28.    +----------------------------------------------------------------------+
  29.  */
  30.  
  31.  
  32. /* $Id: php_math.h,v 1.2 2000/06/13 16:35:40 sas Exp $ */
  33.  
  34. #ifndef _PHPMATH_H
  35. #define _PHPMATH_H
  36. PHP_FUNCTION(sin);
  37. PHP_FUNCTION(cos);
  38. PHP_FUNCTION(tan);
  39. PHP_FUNCTION(asin);
  40. PHP_FUNCTION(acos);
  41. PHP_FUNCTION(atan);
  42. PHP_FUNCTION(atan2);
  43. PHP_FUNCTION(pi);
  44. PHP_FUNCTION(exp);
  45. PHP_FUNCTION(log);
  46. PHP_FUNCTION(log10);
  47. PHP_FUNCTION(pow);
  48. PHP_FUNCTION(sqrt);
  49. PHP_FUNCTION(srand);
  50. PHP_FUNCTION(rand);
  51. PHP_FUNCTION(getrandmax);
  52. PHP_FUNCTION(mt_srand);
  53. PHP_FUNCTION(mt_rand);
  54. PHP_FUNCTION(mt_getrandmax);
  55. PHP_FUNCTION(abs);
  56. PHP_FUNCTION(ceil);
  57. PHP_FUNCTION(floor);
  58. PHP_FUNCTION(round);
  59. PHP_FUNCTION(decbin);
  60. PHP_FUNCTION(dechex);
  61. PHP_FUNCTION(decoct);
  62. PHP_FUNCTION(bindec);
  63. PHP_FUNCTION(hexdec);
  64. PHP_FUNCTION(octdec);
  65. PHP_FUNCTION(base_convert);
  66. PHP_FUNCTION(number_format);
  67. PHP_FUNCTION(deg2rad);
  68. PHP_FUNCTION(rad2deg);
  69.  
  70. #include <math.h>
  71.  
  72. #ifndef M_E
  73. #define M_E            2.7182818284590452354   /* e */
  74. #endif
  75.  
  76. #ifndef M_LOG2E
  77. #define M_LOG2E        1.4426950408889634074   /* log_2 e */
  78. #endif
  79.  
  80. #ifndef M_LOG10E
  81. #define M_LOG10E       0.43429448190325182765  /* log_10 e */
  82. #endif
  83.  
  84. #ifndef M_LN2
  85. #define M_LN2          0.69314718055994530942  /* log_e 2 */
  86. #endif
  87.  
  88. #ifndef M_LN10
  89. #define M_LN10         2.30258509299404568402  /* log_e 10 */
  90. #endif
  91.  
  92. #ifndef M_PI
  93. #define M_PI           3.14159265358979323846  /* pi */
  94. #endif
  95.  
  96. #ifndef M_PI_2
  97. #define M_PI_2         1.57079632679489661923  /* pi/2 */
  98. #endif
  99.  
  100. #ifndef M_PI_4
  101. #define M_PI_4         0.78539816339744830962  /* pi/4 */
  102. #endif
  103.  
  104. #ifndef M_1_PI
  105. #define M_1_PI         0.31830988618379067154  /* 1/pi */
  106. #endif
  107.  
  108. #ifndef M_2_PI
  109. #define M_2_PI         0.63661977236758134308  /* 2/pi */
  110. #endif
  111.  
  112. #ifndef M_2_SQRTPI
  113. #define M_2_SQRTPI     1.12837916709551257390  /* 2/sqrt(pi) */
  114. #endif
  115.  
  116. #ifndef M_SQRT2
  117. #define M_SQRT2        1.41421356237309504880  /* sqrt(2) */
  118. #endif
  119.  
  120. #ifndef M_SQRT1_2
  121. #define M_SQRT1_2      0.70710678118654752440  /* 1/sqrt(2) */
  122. #endif
  123.  
  124. #endif /* _PHPMATH_H */
  125.