📄 php_ref_math.asp
字号:
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_expm1.asp">expm1()</a></td>
<td valign="top">Returns the value of E<sup>x</sup> - 1</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_math_floor.asp">floor()</a></td>
<td valign="top">Returns the value of a number rounded downwards to the
nearest integer</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_fmod.asp">fmod()</a></td>
<td valign="top">Returns the remainder (modulo) of the division of the
arguments</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">
<p align="left"><a href="func_math_getrandmax.asp">getrandmax()</a></td>
<td valign="top">Returns the maximum random number that can be returned by
a call to the rand() function</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_hexdec.asp">hexdec()</a></td>
<td valign="top">Converts a hexadecimal number to a decimal number</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_hypot.asp">hypot()</a></td>
<td valign="top">Returns the length of the hypotenuse of a right-angle
triangle</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_math_is_finite.asp">is_finite()</a></td>
<td valign="top">Returns true if a value is a finite number</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_math_is_infinite.asp">is_infinite()</a></td>
<td valign="top">Returns true if a value is an infinite number</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_math_is_nan.asp">is_nan()</a></td>
<td valign="top">Returns true if a value is not a number</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_math_lcg_value.asp">lcg_value()</a></td>
<td valign="top">Returns a pseudo random number in the range of (0,1)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_math_log.asp">log()</a></td>
<td valign="top">Returns the natural logarithm (base E) of a number</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_log10.asp">log10()</a></td>
<td valign="top">Returns the base-10 logarithm of a number</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_log1p.asp">log1p()</a></td>
<td valign="top">Returns log(1+number)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_math_max.asp">max()</a></td>
<td valign="top">Returns the number with the highest value of two specified
numbers</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_min.asp">min()</a></td>
<td valign="top">Returns the number with the lowest value of two specified
numbers</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_mt_getrandmax.asp">mt_getrandmax()</a></td>
<td valign="top">Returns the largest possible value that can be returned by
mt_rand()</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_mt_rand.asp">mt_rand()</a></td>
<td valign="top">Returns a random integer using Mersenne Twister algorithm</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_mt_srand.asp">mt_srand()</a></td>
<td valign="top">Seeds the Mersenne Twister random number generator</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_octdec.asp">octdec()</a></td>
<td valign="top">Converts an octal number to a decimal number</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_pi.asp">pi()</a></td>
<td valign="top">Returns the value of PI</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_pow.asp">pow()</a></td>
<td valign="top">Returns the value of x to the power of y</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_rad2deg.asp">rad2deg()</a></td>
<td valign="top">Converts a radian number to a degree</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_rand.asp">rand()</a></td>
<td valign="top">Returns a random integer</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_round.asp">round()</a></td>
<td valign="top">Rounds a number to the nearest integer</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_sin.asp">sin()</a></td>
<td valign="top">Returns the sine of a number</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_sinh.asp">sinh()</a></td>
<td valign="top">Returns the hyperbolic sine of a number</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_math_sqrt.asp">sqrt()</a></td>
<td valign="top">Returns the square root of a number</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_srand.asp">srand()</a></td>
<td valign="top">Seeds the random number generator</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_tan.asp">tan()</a></td>
<td valign="top">Returns the tangent of an angle</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_math_tanh.asp">tanh()</a></td>
<td valign="top">Returns the hyperbolic tangent of an angle</td>
<td valign="top">4</td>
</tr>
</table>
<br />
<hr>
<h2>PHP Math Constants</h2>
<p><b>PHP</b>: indicates the earliest version of PHP that supports the
constant. </p>
<table class="ex" cellspacing="0" border="1" width="100%" id="table5">
<tr>
<th width="30%" align="left">Constant</th>
<th width="65%" align="left">Description</th>
<th width="5%" align="left">PHP</th>
</tr>
<tr>
<td valign="top">M_E</td>
<td valign="top">Returns e (approx. 2.718)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_EULER</td>
<td valign="top">Returns Euler's constant (approx. 0.577)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_LNPI</td>
<td valign="top">Returns the natural logarithm of PI (approx. 1.144)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_LN2</td>
<td valign="top">Returns the natural logarithm of 2 (approx. 0.693)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_LN10</td>
<td valign="top">Returns the natural logarithm of 10 (approx. 2.302)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_LOG2E</td>
<td valign="top">Returns the base-2 logarithm of E (approx. 1.442)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_LOG10E</td>
<td valign="top">Returns the base-10 logarithm of E (approx. 0.434)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_PI</td>
<td valign="top">Returns PI (approx. 3.14159)</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top">M_PI_2</td>
<td valign="top">Returns PI/2 (approx. 1.570)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_PI_4</td>
<td valign="top">Returns PI/4 (approx. 0.785)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_1_PI</td>
<td valign="top">Returns 1/PI (approx. 0.318)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_2_PI</td>
<td valign="top">Returns 2/PI (approx. 0.636)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_SQRTPI</td>
<td valign="top">Returns the square root of PI (approx. 1.772)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_2_SQRTPI</td>
<td valign="top">Returns 2/square root of PI (approx. 1.128)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_SQRT1_2</td>
<td valign="top">Returns the square root of 1/2 (approx. 0.707)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_SQRT2</td>
<td valign="top">Returns the square root of 2 (approx. 1.414)</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">M_SQRT3</td>
<td valign="top">Returns the square root of 3 (approx. 1.732)</td>
<td valign="top">4</td>
</tr>
</table>
<br />
<hr />
<a href="php_ref_mail.asp"><img alt="previous" border="0" src="../images/btn_previous.gif" width="100" height="20" /></a>
<a href="php_ref_misc.asp"><img alt="next" border="0" src="../images/btn_next.gif" width="100" height="20" /></a>
<br />
<hr />
<!-- **** SPOTLIGHTS 1 **** -->
<iframe src="../banners/aspallframe.asp" height="110" width="485"
marginwidth="0" marginheight="0" frameborder="0" scrolling="no">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
<hr />
<!-- **** SPOTLIGHTS 2 **** -->
<h2><a target="_blank" href="../../www.altova.com/ref/@s=w3s_spotlight&q=xmlspy">
Altova
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -