X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP exp() Function

PHP Math Reference PHP Math Reference

Example

Return 'e' raised to the power of different numbers:

<?php
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 raised to the power of x (ex).

'e' is the base of the natural system of logarithms (approximately 2.718282) and x is the number passed to it.


Syntax

exp(x);

Parameter Description
x Required. Specifies the exponent

Technical Details

Return Value: 'e' raised to the power of x
Return Type: Float
PHP Version: 4+


PHP Math Reference PHP Math Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook