Re: Proposal: Trigonometric functions in degrees

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Proposal: Trigonometric functions in degrees
Дата
Msg-id 28880.1453568920@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Proposal: Trigonometric functions in degrees  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Proposal: Trigonometric functions in degrees  (Peter Eisentraut <peter_e@gmx.net>)
Re: Proposal: Trigonometric functions in degrees  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
I wrote:
> So the early returns from the buildfarm aren't very good:
> * tern/sungazer isn't getting exactly 0.5 from sind(30).

> The tern/sungazer result implies that this:

>     return (sin(x * (M_PI / 180.0)) / sin(30.0 * (M_PI / 180.0))) / 2.0;

> is not producing exactly 0.5, which means that the two sin() calls aren't
> producing identical results, which I suspect is best explained by the
> theory that the compiler is rearranging 30.0 * (M_PI / 180.0) into
> (30.0 * M_PI) / 180.0, and getting a slightly different number that way.

> I think we could fix that by replacing (M_PI / 180.0) by a hard-wired
> constant (computed to say 20 digits or so).

So I pushed that, and tern/sungazer are still failing.  Noah, could you
trace through that and see exactly where it's going off the rails?
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Removing Functionally Dependent GROUP BY Columns
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: PoC: Partial sort