Re: postgres arithmetic: raising to nth power

From: Ennio-Sr <nasr(dot)laili(at)tin(dot)it>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: postgres arithmetic: raising to nth power
Date: 2005-09-29 23:26:27
Message-ID: 20050929232627.GA8506@deby.ei.hnet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

* Andrej Ricnik-Bay <andrej(dot)groups(at)gmail(dot)com> [300905, 10:34]:
> > Hi all,
>
> I'm not sure I understand what you're trying to say.
>
>
> Except for the fact that you encounter rounding errors (which
> shouldn't come as a surprise with an exponent of 54) everything
> seems to work "normally" as far as I'm concerned.
>

Well, more than a rounding, as it gives a result which misses the
multiplication by 100 and - apparently - is not issuing a warning to
this effect.

> If you need arbitrary precision don't do the calculation using
> a select statement but rather utilise CLN or some other special
> maths library.
>

Never dealt with CLN; just discovered it means Class Library for Numbers
and seems to be an independent math software (Google fires around 61000
items for 'cln' ...) to be used on its own (i.e. I don't think I could
call it from postgres, could I?)

I'm trying to do some financial calculations using data contained in a
pg_db table via select command given from a bash script.

Anyway, thanks for your answer, Andrej.

Regards,
Ennio.

--
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo. \\?//
Fa' qualche cosa di cui non sei capace!" (diceva Henry Miller) ] (°|°)
[Why use Win$ozz (I say) if ... "even a fool can do that. )=(
Do something you aren't good at!" (as Henry Miller used to say) ]

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Ennio-Sr 2005-09-30 00:05:59 Re: postgres arithmetic: raising to nth power
Previous Message Andrej Ricnik-Bay 2005-09-29 22:34:45 Re: postgres arithmetic: raising to nth power