1. Home
  2. Computing & Technology
  3. PHP / MySQL

Exp () PHP Function

By Angela Bradley, About.com

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
Explore PHP / MySQL
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. PHP Functions
  5. Exp PHP function - e raised to the power of x

©2009 About.com, a part of The New York Times Company.

All rights reserved.