Function Reference

EXP

Returns e raised to the given power.

PostgreSQL 17.9
EXP(num)
num
Exponent
numeric | double precision

Return value

A number of the same type as num (double precision or numeric); an error if the result is too large: EXP(1000)

Examples

The number e

PostgreSQL 17.9
SELECT EXP(1);
exp
2.718281828459045

The reverse function LN

PostgreSQL 17.9
SELECT EXP(LN(10)) AS back_to_ten,
	LN(EXP(2)) AS back_to_two;
back_to_tenback_to_two
10.0000000000000022

Details

The reverse function is LN: LN(EXP(x)) returns x. Because of floating-point rounding, EXP(LN(10)) gives 10.000000000000002 rather than exactly 10.

See also

Where to learn