Re: Slaying the HYPOTamus

Поиск
Список
Период
Сортировка
От Paul Matthews
Тема Re: Slaying the HYPOTamus
Дата
Msg-id 4A93164E.7010706@netspace.net.au
обсуждение исходный текст
Ответ на Re: Slaying the HYPOTamus  (Greg Stark <gsstark@mit.edu>)
Ответы Re: Slaying the HYPOTamus  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Greg Stark wrote:
> Also, the question arises what should be returned for hypot(Inf,NaN)
> which your code returns Inf for. Empirically, it seems the normal
> floating point behaviour is to return NaN so I think the NaN test
> should be first.
>
>   
See http://www.opengroup.org/onlinepubs/000095399/functions/hypot.html
   If /x/ or /y/ is ±Inf, +Inf shall be returned (even if one of /x/ or
/y/ is NaN).   If /x/ or /y/ is NaN, and the other is not ±Inf, a NaN shall be
returned.

Just trying to implement correct C99 behaviour here.


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: alpha1 bundled -- please verify
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug in date arithmetic