EXP
Returns e raised to the given power.
PostgreSQL 17.9
EXP(num)- num
- Exponentnumeric | 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);The reverse function LN
PostgreSQL 17.9
SELECT EXP(LN(10)) AS back_to_ten,
LN(EXP(2)) AS back_to_two;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.