Function Reference

EXP

Returns e raised to the given power.

MySQL 8.1
EXP(num)

Parameters

numDOUBLE
Exponent

Return value

A floating-point number (DOUBLE); an error if the result is too large: EXP(1000)

Examples

The number e

MySQL 8.1
SELECT EXP(1);
EXP(1)
2.718281828459045

Continuous growth of a sum over 3 years

MySQL 8.1
SELECT ROUND(1000 * EXP(0.05 * 3), 2) AS amount;
amount
1161.83

Details

The inverse function is LOG with one argument or LN: LOG(EXP(2)) returns 2.

See also

Where to learn