power() function in Windows: "value out of range: underflow"
От | Huong Dangminh |
---|---|
Тема | power() function in Windows: "value out of range: underflow" |
Дата | |
Msg-id | 75DB81BEEA95B445AE6D576A0A5C9E936A73E741@BPXM05GP.gisp.nec.co.jp обсуждение исходный текст |
Ответы |
Re: power() function in Windows: "value out of range: underflow"
Re: power() function in Windows: "value out of range: underflow" Re: power() function in Windows: "value out of range: underflow" Re: power() function in Windows: "value out of range: underflow" |
Список | pgsql-bugs |
Hi, There are some cases that power() function does not work correctly with 'NaN' arguments in Windows environment. Something like, postgres=# select power('NaN',11); ERROR: value out of range: underflow postgres=# select power('NaN','NaN'); ERROR: value out of range: underflow postgres=# select power(11,'NaN'); ERROR: value out of range: underflow In Linux environment, instead of ERROR it returns 'NaN'. The reason here is, When pow() in float.c:dpow() is called with 'NaN' arguments, pow() returns 'NaN' but in Windows environment errno is set to EDOM(invalid floating-point exception). So, PostgreSQL update "result" and cause an ERROR in CHECKFLOATVAL macro. I think it should be return 'NaN' in all of above cases. I have tried to create a patch to fix it. Please confirm the attached file. --- Thanks and best regards, Dang Minh Huong NEC Solution Innovators, Ltd. http://www.nec-solutioninnovators.co.jp/en/
Вложения
В списке pgsql-bugs по дате отправления: