1. Computing

Exp () PHP Function

By

Definition: The Exp (x) function is used to determine e raised to the power of x. If you want to use an exponent and not e, you would use the pow () function. When working with e the log () function may also be of interest.
Examples:
 <?php 
 echo(exp(1) . "<br />"); 
 echo(exp(2) . "<br />"); 
 echo(exp(3) . "<br />"); 
 echo(exp(-1) . "<br />"); 
 ?> 
 
This returns the results:
2.718281828459
7.3890560989307
20.085536923188
0.36787944117144
  1. About.com
  2. Computing
  3. PHP / MySQL
  4. PHP Functions
  5. Exp PHP function - e raised to the power of x

©2014 About.com. All rights reserved.