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