PostgreSQL/Math Functions/exp

Материал из SQL эксперт
Перейти к: навигация, поиск

exp(dp or numeric) exponential

   <source lang="sql">

postgres=# -- exp(dp or numeric) exponential postgres=# postgres=# select exp(1.0);

       exp

2.7182818284590452

(1 row) postgres=#

      </source>
   
  


exp(x): Returns the e constant (2.71828...), to the power of x

   <source lang="sql">

postgres=# postgres=# -- exp(x): Returns the e constant (2.71828...), to the power of x postgres=# SELECT exp(0.0) AS one, postgres-# exp(1.0) AS e, postgres-# exp(2.0) AS "e squared";

       one         |         e          |     e squared

+--------------------+--------------------
1.0000000000000000 | 2.7182818284590452 | 7.3890560989306502

(1 row) postgres=#

      </source>