Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance

Поиск
Список
Период
Сортировка
От Lætitia Avrot
Тема Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance
Дата
Msg-id CAB_COdgvguRHKS_hTZ=4tjf1nO3fefR3=8Pf3JbQPgrwa2DGHA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi Andrew and Tom,

I considered that option before writing my patch but I refrained for 2 reasons:

- There is no consensus about how to name these functions. The standard 8000-2 goes with arsinh, arcosh and artanh,
  but you will find easily arcsinh, arccosh and arctanh or even argsinh, argcosh and argtanh. In IT, the names asinh, 
  acosh and atanh are commonly used too. We might implement them with asinh, acosh and atanh names and add
  aliases if SQL standard decide to add it under other names though.
- If we go with inverse hyperbolic functions, I guess we could add other hyperbolic functions as hyperbolic cosecant,
  secant and cotangent too. Then it adds the inverse hyperbolic functions of these three functions. These six functions
  are not described in math.h library. I guess it's because these functions are quite simple to deduce from the others.

So, as you're asking that too, maybe my reasons weren't good enough. You'll find enclosed a new version of the patch
with asinh, acosh and atanh (v5).

Then I tried for several days to implement the 6 last hyperbolic functions, but I wasn't satisfied with the result, so I just dropped it.

Cheers,

Lætitia

Le dim. 3 févr. 2019 à 16:12, Tom Lane <tgl@sss.pgh.pa.us> a écrit :
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> The spec doesn't require the inverse functions (asinh, acosh, atanh),
> but surely there is no principled reason to omit them?

+1 --- AFAICS, the C library has offered all six since C89.

                        regards, tom lane


--
Think! Do you really need to print this email ?
There is no Planet B.
Вложения

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

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: WIP: Avoid creation of the free space map for small tables
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Too rigorous assert in reorderbuffer.c