- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
exp() function in PHP
The exp() function Returns ex. This is e raised to the power x.
Here,
'e' is 2.718282 x is the power
Syntax
exp(x)
Parameters
x = The exponent
Return
The exp() function Returns e raised to the power of x, which is a float value.
Example
<?php echo(exp(0) . "<br>"); echo(exp(1)); ?>
Output
1<br>2.718281828459
Let us see another example −
Example
<?php echo(exp(2) . "<br>"); echo(exp(5) . "<br>"); echo(exp(20)); ?>
Output
7.3890560989307<br>148.41315910258<br>485165195.40979
Advertisements