Re: pgsql: Add support for hyperbolic functions, as well as log10().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Add support for hyperbolic functions, as well as log10().
Дата
Msg-id 27340.1552524529@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Add support for hyperbolic functions, as well as log10().  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: pgsql: Add support for hyperbolic functions, as well as log10().
Список pgsql-hackers
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> It's not unreasonable to expect these functions to be accurate to within
> the last 1 or 2 digits, so testing with extra_float_digits or whatever
> seems reasonable, but I think a wider variety of test inputs is required.

Meh.  As I said before, we're not in the business of improving on what
libm does --- if someone has a beef with the results, they need to take
it to their platform's libm maintainer, not us.  The point of testing
this at all is just to ensure that we've wired up the SQL functions
to the library functions correctly.

> I also wonder if we should be doing what we do for the regular trig
> functions and explicitly handle special cases like Inf and NaN to ensure
> POSIX compatibility on all platforms.

I'm not too excited about this, but perhaps it would be interesting to
throw in tests of the inf/nan cases temporarily, just to see how big
a problem there is of that sort.  If the answer comes out to be
"all modern platforms get this right", I don't think it's our job to
clean up after the stragglers.  But if the answer is not that, maybe
I could be talked into spending code on it.

            regards, tom lane


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

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: pgsql: Add support for hyperbolic functions, as well as log10().
Следующее
От: John Naylor
Дата:
Сообщение: Re: WIP: Avoid creation of the free space map for small tables