The exp() function used to calculate the value of Ex, where E is Euler's constant.
PHP exp() Function Example:
The exp() function used to calculate the value of Ex, where E is Euler's constant and value of the Euler's constant is approximately 2.7183 and x is the number that you passed.
Syntax:
exp(x)
where x is a number.
Example:
<?php $return = exp(2); echo "The value of exp(2) is : " . $return . "<br/>"; $return_value = exp(-5); echo "The value of exp(-5) is : " . $return_value; ?>
After running the output is:
Output:
The value of exp(2) is : 7.3890560989307 The value of exp(-5) is : 0.0067379469990855
[ 0 ] Comments