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

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: power() function in Windows: "value out of range: underflow"
Дата
Msg-id CAKJS1f91ZWgCUVbsprYMNwcOsWs9PwS_WLGyUcXAEJh9Y1c2rQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: power() function in Windows: "value out of range: underflow"  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: power() function in Windows: "value out of range: underflow"  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 30 April 2018 at 10:22, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> David Rowley <david.rowley@2ndquadrant.com> writes:
>> Wouldn't this machine have returned 1 before this patch though?
>
> No, don't think so, because it doesn't set EDOM for the case.
>
> Basically what we're doing here is making sure that we get results
> conforming to current POSIX even on machines that predate that
> standard.  There are more of them floating around than I'd have
> expected, but it still seems like a good change to make.  Maybe
> there's an argument for not back-patching, though?

I think we should back patch and try to be consistent about the
power(float8 1.0, 'NaN') and power('NaN', float8 0.0) cases. The
archives don't show any complaints about power() with NaN until this
one, so I imagine the number of people affected by this is small.
However, I think if we're willing to try to make MSVC consistent with
other platforms on this topic then there's no reason to draw the line
there and ignore other platforms that we claim to support.

POSIX seems like a good standard to follow for this in the absence of
guidance from the SQL standard.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Cold welcoming message when installing anything because of LLVMbitcode stuff
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Postgres, fsync, and OSs (specifically linux)