RE: power() function in Windows: "value out of range: underflow"

Поиск
Список
Период
Сортировка
От Huong Dangminh
Тема RE: power() function in Windows: "value out of range: underflow"
Дата
Msg-id 75DB81BEEA95B445AE6D576A0A5C9E936A73F249@BPXM05GP.gisp.nec.co.jp
обсуждение исходный текст
Ответ на Re: power() function in Windows: "value out of range: underflow"  (Euler Taveira <euler@timbira.com.br>)
Список pgsql-bugs
Hi,
Thanks for response

# I will add this thread to current CF soon.

> 2018-04-10 5:30 GMT-03:00 Huong Dangminh <huo-dangminh@ys.jp.nec.com>:
> > There are some cases that power() function does not work correctly
> > with 'NaN' arguments in Windows environment.
> > Something like,
> >
> What is your exact OS version? What is your postgres version? I tested with
> Windows 10 (10.0.16299) x64 and couldn't reproduce the error.

I think it is not depended on OS version but the visual c++ runtime libraries version 
(It seem also be included in installers).

My environment:
====================================

- PostgreSQL: 9.6.8
  # I am using the EDB PostgreSQL Installer
  # It also can reproduce in PostgreSQL 10.3 or 9.5.12

  >postgres -V
  postgres (PostgreSQL) 9.6.8

  >psql -c "select version()"
                             version
  -------------------------------------------------------------
   PostgreSQL 9.6.8, compiled by Visual C++ build 1800, 64-bit
  (1 row)

  >psql -c "select 'NaN'^11"
  ERROR:  value out of range: underflow

- OS: Microsoft Windows 10 Pro 10.0.14393 build 14393

=============================

> > 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'.
> >
> Could you show us a simple test case? Print arguments, result and errno.

It just is my confirmation when debug PostgreSQL in Windows environment.
# I built PostgreSQL with VC++ 2012 in debug mode and confirmed.
I don't know how to print those values.


---
Thanks and best regards,
Dang Minh Huong
NEC Solution Innovators, Ltd.
http://www.nec-solutioninnovators.co.jp/en/

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: pg_dump with disable trigger
Следующее
От: Soni M
Дата:
Сообщение: Re: pg_dump with disable trigger