MySQL: EXP Function
This MySQL tutorial explains how to use the MySQL EXP function with syntax and examples.
Description
The MySQL EXP function returns e raised to the power of number (or enumber).
Syntax
The syntax for the EXP function in MySQL is:
EXP( number )
Parameters or Arguments
- number
- The power to raise e to, so the formula would be enumber.
Applies To
The EXP function can be used in the following versions of MySQL:
- MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23
Example
Let's look at some MySQL EXP function examples and explore how to use the EXP function in MySQL.
For example:
mysql> SELECT EXP(0); Result: 1 mysql> SELECT EXP(1); Result: 2.718281828459045 mysql> SELECT EXP(2); Result: 7.38905609893065 mysql> SELECT EXP(-2); Result: 0.1353352832366127
Advertisements