Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
Date: 2008-05-08 22:23:31
Message-ID: 29579.1210285411@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

momjian(at)postgresql(dot)org (Bruce Momjian) writes:
> Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^ 0.0
> return 1, rather than error.

This is wrongly described, and the implementation is still not correct
either, because it should throw an error for negative exponents.
Would you please *read* that wikipedia page you keep citing?
http://en.wikipedia.org/wiki/Exponentiation#Powers_of_zero

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2008-05-08 22:34:20 Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
Previous Message Bruce Momjian 2008-05-08 22:18:00 Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^