PHP exp()Functions
Examples
Returns different powers of 'e':
<?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));
?>
Run Example »
Definition and Usage
The exp() function returns e to the power of x (ex)。
'e' is the base of natural logarithms (approximately 2.718282), and x is the exponent.
Syntax
exp(x);
| Parameters | Description |
|---|---|
| x | Required. Specifies the exponent. |
Technical Details
| Return Value: | 'e' raised to thexpower. |
|---|---|
| Return Type: | Float |
| PHP Version: | 4+ |
PHP Math Reference Manual Other Extensions