Re: Anti log in PostgreSQL
От | Tom Lane |
---|---|
Тема | Re: Anti log in PostgreSQL |
Дата | |
Msg-id | 8203.1072481860@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Anti log in PostgreSQL (Sai Hertz And Control Systems <sank89@sancharnet.in>) |
Ответы |
Re: Anti log in PostgreSQL
|
Список | pgsql-sql |
Sai Hertz And Control Systems <sank89@sancharnet.in> writes: >> What is the mathematical operation that "antilog" is supposed to perform? > Its going to calculate rate of intrest for an fixed deposit , This is not a mathematical operation, it is a financial issue that has to conform to rules developed long ago by bankers. The closest thing that PG offers is 10^x, but regression=# select 10^(3.3234); ?column? ------------------2105.71698391175 (1 row) which is not real close to the 2144 that you say you want. The difference must be due to compounding rules, and perhaps also accumulated roundoff in the monetary amounts. I think you will need to write a little function (in plpgsql or your language of choice) that performs the sequence of compounding steps, if you want to get an answer that a banker will like. regards, tom lane
В списке pgsql-sql по дате отправления: