Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees.

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Noah Misch <noah(at)leadboat(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees.
Date: 2016-04-26 10:59:58
Message-ID: CAEZATCVXC-1UW8OO0Zv+=p7812QbyLUN2JmdxXrKcd8GRKps_w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 26 April 2016 at 04:25, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> In short, these tests suggest that we need a coding pattern like
> this:
>
> volatile float8 asin_x = asin(x);
> return (asin_x / asin_0_5) * 30.0;
>
> We could drop the "volatile" by adopting -ffloat-store, but that
> doesn't seem like a better answer, because -ffloat-store would
> pessimize a lot of code elsewhere. (It causes a whole lot of
> changes in float.c, for sure.)

Agreed. That looks like the least hacky way of solving the problem. I
think it's more readable when the logic is kept local, and it's
preferable to avoid any compiler-specific options or global flags that
would affect other code.

6b1a213bbd6599228b2b67f7552ff7cc378797bf by itself looks like a
worthwhile improvement that ought to be more robust, even though it
didn't fix this problem.

Regards,
Dean

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-04-26 12:36:38 pgsql: Enable parallel query by default.
Previous Message Magnus Hagander 2016-04-26 08:39:12 pgsql: Fix typo in comment

Browse pgsql-hackers by date

  From Date Subject
Next Message José Luis Tallón 2016-04-26 11:23:11 Re: Protocol buffer support for Postgres
Previous Message Ashutosh Sharma 2016-04-26 09:02:05 Re: pg_basebackup creates a corrupt file for pg_stat_tmp and pg_replslot on a backup location