1. Computing & Technology

Discuss in my forum

Exp () PHP Function

By , About.com Guide

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

©2012 About.com. All rights reserved.

A part of The New York Times Company.