php8.5
Home/ Manual/ math / functions/ exp

exp

PHP function Edit on GitHub ✎

(PHP 4, PHP 5, PHP 7, PHP 8)

Calculates the exponent of e

Description

exp(float $num): float

Returns e raised to the power of num.

Note

'e' is the base of the natural system of logarithms, or approximately 2.718282.

Parameters

num

The argument to process

Return Values

'e' raised to the power of num

Examples

exp() example

php
<?php
echo exp(12), PHP_EOL;
echo exp(5.7);
?>

The above example will output:

output
162754.791419
298.86740096706

See Also

Source: reference/math/functions/exp.xml · from the official PHP manual (php/doc-en)