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

From Tom Lane
Subject Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
Date
Msg-id 29579.1210285411@sss.pgh.pa.us
Whole thread Raw
In response to pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^  (momjian@postgresql.org (Bruce Momjian))
Responses Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
List pgsql-committers
momjian@postgresql.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

pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
Next
From: Bruce Momjian
Date:
Subject: Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^