PHP exp() Function Example

PHP exp() Function Example


Posted in : PHP Posted on : January 31, 2011 at 5:23 PM Comments : [ 0 ]

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

Download Example Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics