exp function
The exp function returns the exponential value of the given expression, that is, e raised to the power of the specified expression. Here, e is the base of the natural logarithm and has the value 2.718281828459045.
Syntax:
double exp(n)
Semantics:
-
n: The argument n is an expression that resolves to a number.
-
return type: double.
-
Returns a NULL value in the following cases:
-
n resolves to a NULL value
-
n does not resolve to a number
-
-
Returns NaN if n resolves to NaN.
-
Returns positive infinity if n resolves to positive infinity.
-
Returns positive zero if n resolves to negative infinity.
-
Example 1 - exp function
SELECT exp(n) FROM PHtable
| Value of n | Output |
|---|---|
| 0 | 1.0 |
| 2 | 7.38905609893065 |
| -2 | 0.1353352832366127 |