Re: numeric precision when raising one numeric to another.

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "John D(dot) Burger" <john(at)mitre(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: numeric precision when raising one numeric to another.
Date: 2005-05-20 14:04:08
Message-ID: 20050520140408.GA23910@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, May 20, 2005 at 08:19:58 -0400,
"John D. Burger" <john(at)mitre(dot)org> wrote:
> I find all these statements about the near-uselessness of
> NUMERIC^NUMERIC to be pretty amazing. It's fine to say, "no one seems
> to be asking for this, so we haven't implemented it yet", but, c'mon,
> folks, Postgres gets used for more than "business cases".

It is pretty useless. If you are doing exact math, fractional exponents
don't fit. If you are using integer exponents, you can store usable
exponents in an int (arguably an an int2).

People may be interested in NUMERIC^NUMERIC MOD N, but if so they aren't
going to do the exponentation first and then the mod operation.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2005-05-20 14:06:31 Re: numeric precision when raising one numeric to another.
Previous Message Tom Lane 2005-05-20 13:55:37 Re: [HACKERS] Inherited constraints and search paths (was Re: Preserving data after updates)