Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees. - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees.
Date
Msg-id 57192E3C.9040109@gmx.net
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 04/19/2016 04:48 PM, Tom Lane wrote:
> Pushed.  Peter, what results do you get from these tests on your
> problematic machine?
       acosd(x),       acosd(x) IN (0,60,90,120,180) AS acosd_exactFROM (VALUES (-1), (-0.5), (0), (0.5), (1)) AS
t(x);
-  x   | asind | asind_exact | acosd | acosd_exact
-------+-------+-------------+-------+-------------
-   -1 |   -90 | t           |   180 | t
- -0.5 |   -30 | t           |   120 | t
-    0 |     0 | t           |    90 | t
-  0.5 |    30 | t           |    60 | t
-    1 |    90 | t           |     0 | t
+  x   |        asind         | asind_exact | acosd | acosd_exact
+------+----------------------+-------------+-------+-------------
+   -1 |                  -90 | t           |   180 | t
+ -0.5 | -29.9999999999999964 | f           |   120 | t
+    0 |                    0 | t           |    90 | t
+  0.5 |  29.9999999999999964 | f           |    60 | t
+    1 |                   90 | t           |     0 | t(5 rows)

This is the same under the default -O2 and under -O0.




pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: VS 2015 support in src/tools/msvc
Next
From: Tom Lane
Date:
Subject: Re: Dead code in win32.h