w3resource

PostgreSQL EXP() function

EXP() function

The PostgreSQL exp() function is used to return the exponentiation of a number as specified in the argument. It calculates the value of e raised to the power of the given number, where e is the base of the natural logarithm, approximately equal to 2.71828.

Uses of EXP() Function
  • Mathematical Calculations: To perform exponential calculations in mathematical formulas.

  • Scientific Computations: Useful in scientific computations that require exponentiation.

  • Financial Modeling: To calculate compound interest and other exponential growth models.

  • Data Analysis: In statistical and data analysis, where exponential functions are needed to model data trends.

Syntax:

exp()

PostgreSQL Version: 9.3

Pictorial presentation of PostgreSQL EXP() function

pictorial presentation of PostgreSQL EXP() function

Example: PostgreSQL EXP() function:

Code:

SELECT EXP(2.0) AS "Exponential";

Sample Output:

    Exponential
--------------------
 7.3890560989306502
(1 row)

Previous: DIV function
Next: FLOOR function



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/PostgreSQL/exp-function.php