bug in numeric_power() function - Mailing list pgsql-hackers

From Richard Wang
Subject bug in numeric_power() function
Date
Msg-id fr7flt$2j04$1@news.hub.org
Whole thread Raw
Responses Re: bug in numeric_power() function
Re: bug in numeric_power() function
List pgsql-hackers
I expected 0 ^ 123.3 to be 0, but it reported error as follows

postgres=# select 0 ^ 123.3;
ERROR:  cannot take logarithm of zero

I find that there is a bug in numeric_power() function
the function caculates a ^ b based on the algorithm e ^ (lna * b)
as you see, ln0 is not valid 




pgsql-hackers by date:

Previous
From: longlong
Date:
Subject: Fwd: COPY issue(gsoc project)
Next
From: "Dann Corbit"
Date:
Subject: Re: bug in numeric_power() function