This tutorial explains how to use the MySQL EXP function with syntax and examples.
The MySQL EXP function returns e raised to the power of number (or enumber).
The syntax for the EXP function in MySQL is:
EXP( number )
The power to raise e to, so the formula would be enumber.
The EXP function can be used in the following versions of MySQL:
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);
Output: 1
mysql> SELECT EXP(1);
Output: 2.718281828459045
mysql> SELECT EXP(2);
Output: 7.38905609893065
mysql> SELECT EXP(-2);
Output: 0.1353352832366127