PostgreSQL exp() Function
The PostgreSQL exp() function returns the natural constant e raised to the specified power.
exp() Syntax
This is the syntax of the PostgreSQL exp() function:
exp(numeric_value) -> numeric type
Parameters
numeric_value-
Required. A number.
Return value
The PostgreSQL exp() function returns the natural constant e raised to the specified power. For example, exp(4) return the natural constant e raised to the 4th power.
The exp() function will return NULL if the argument is NULL.
PostgreSQL will give an error if you supply a parameter that is not a numeric type.
exp() Examples
Here are a few examples of the exp() function:
SELECT
exp(0) AS "exp(0)",
exp(1) AS "exp(1)",
exp(2) AS "exp(2)";
exp(0) | exp(1) | exp(2)
--------+-------------------+------------------
1 | 2.718281828459045 | 7.38905609893065