PHP exp() Function
Example
Return different powers of 'e':
"); echo(exp(1) . ""); echo(exp(10) . "
"); echo(exp(4.8)); ?>
Run Example »
Definition and Usage
The exp() function returns e raised to the power of x (ex).
'e' is the base of the natural logarithm (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 x th power. |
|---|---|
| Return Type: | Float |
| PHP Version: | 4+ |
PHP Math Reference Manual