Patch: make behavior of all versions of the "isinf" function be similar

Поиск
Список
Период
Сортировка
От Vitaly Burovoy
Тема Patch: make behavior of all versions of the "isinf" function be similar
Дата
Msg-id CAKOSWN=a60VfcaKTmg_=3HRLSEvvFyN6nKQY8KjsbJuoq9+ySw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Patch: make behavior of all versions of the "isinf" function be similar  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Hello, hackers!

While I was searching for a function which checks doubles for
infinity, I discovered a function "isinf" in a file src/port/isinf.c
where one of three versions returns different value for "-inf" ("1"
instead of "-1") comparing to the other two.

It seems concrete values (not just "if isinf(...)") are checked only
in float.c in float4out and float8out, but I am going to check for
concrete values in my another patch.

For systems with HAVE_FPCLASS the function returns the same result for
both "+inf" and "-inf". I can't test it on my WS, but I found only one
man page[1] where system header file "ieeefp.h" must be included for
ability to use "fpclass" function.

I guess nothing will be broken if that version of the function returns
the same results for input values as the other two.

Proposed patch makes that behavior.

P.S.: Should the patch be added to the next CF?

[1]https://docs.oracle.com/cd/E36784_01/html/E36874/fpclass-3c.html
--
Best regards,
Vitaly Burovoy

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Template for commit messages
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Template for commit messages