PHP exp () function
Examples
Returns 'e' of different power of:
<?php
echo(exp(0) . "<br>");
echo(exp(1) . "<br>");
echo(exp(10) . "<br>");
echo(exp(4.8));
?>
echo(exp(0) . "<br>");
echo(exp(1) . "<br>");
echo(exp(10) . "<br>");
echo(exp(4.8));
?>
Running instance »
Definition and Usage
The exp () function returns e to the power of x (e x).
'E' is the natural logarithms (its value is approximately equal to 2.718282), x is the exponent.
grammar
exp( x );
参数 | 描述 |
---|---|
x | 必需。规定指数。 |
technical details
return value: | 'e' to the power of x. |
---|---|
Return type: | Float |
PHP version: | 4+ |
PHP Math Reference