Return different powers of 'e':
<?phpecho(exp(0) . "<br>");echo(exp(1) . "<br>");echo(exp(10) . "<br>");echo(exp(4.8) );?>The exp() function returns e raised to the power x (ex).
'e' is the base of the natural logarithm (its value is approximately equal to 2.718282), and x is the exponent.
exp( x );
parameter | describe |
---|---|
x | Required. Specify index. |
Return value: | 'e' raised to the power x . |
---|---|
Return type: | Float |
PHP version: | 4+ |