array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'function.exp.php', 1 => 'exp', ), 'up' => array ( 0 => 'ref.math.php', 1 => 'Math Functions', ), 'prev' => array ( 0 => 'function.deg2rad.php', 1 => 'deg2rad', ), 'next' => array ( 0 => 'function.expm1.php', 1 => 'expm1', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/math/functions/exp.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
exp — Calculates the exponent of e
Returns e
raised to the power of num
.
Note:
'
e
' is the base of the natural system of logarithms, or approximately 2.718282.
num
The argument to process
'e' raised to the power of num
Example #1 exp() example
<?php
echo exp(12) . "\n";
echo exp(5.7);
?>
The above example will output:
1.6275E+005 298.87