Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP exp() Function

PHP exp() Function

PHP Math Reference Manual PHP Math Reference Manual

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 PHP Math Reference Manual