Javatpoint Logo
Javatpoint Logo

PHP exp() function

The exp() function is used to calculate the exponent of e. It returns e raised to the power of x (ex) where 'e' is the base of the natural system of logarithms and x is the number passed to it.

Syntax:

Name Description Return type
x Specifies the exponent float

Example1:

PHP math exp function
Test it Now

Output:

exponent of 0 is = 1
exponent of 1 is = 2.718281828459
exponent of 2.5 is = 12.182493960703

Note: 'e' is the base of the natural system of logarithms, or approximately 2.718282.

Example2

Test it Now

Output:

The exponent value of e^-3 = 0.049787068367864
The exponent value of e^-2 = 0.13533528323661
The exponent value of e^-1 = 0.36787944117144
The exponent value of e^0 = 1
The exponent value of e^1 = 2.718281828459
The exponent value of e^2 = 7.3890560989307
The exponent value of e^3 = 20.085536923188

Next TopicPHP Math





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA