diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-01-23 11:26:07 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-01-23 11:26:07 -0500 |
commit | 73193d82d7c8d849774bf6952dfb4287e213c572 (patch) | |
tree | e08c0288b5cbcf3916a7c7fd4a67f6dc2028d117 /contrib/postgres_fdw/postgres_fdw.c | |
parent | 6ae4c8de00c382b10e851e1eaf7f5e19e143b251 (diff) | |
download | postgresql-73193d82d7c8d849774bf6952dfb4287e213c572.tar.gz postgresql-73193d82d7c8d849774bf6952dfb4287e213c572.zip |
Adjust degree-based trig functions for more portability.
The buildfarm isn't very happy with the results of commit e1bd684a34c11139.
To try to get the expected exact results everywhere:
* Replace M_PI / 180 subexpressions with a precomputed constant, so that
the compiler can't decide to rearrange that division with an adjacent
operation. Hopefully this will fix failures to get exactly 0.5 from
sind(30) and cosd(60).
* Add scaling to ensure that tand(45) and cotd(45) give exactly 1; there
was nothing particularly guaranteeing that before.
* Replace minus zero by zero when tand() or cotd() would output that;
many machines did so for tand(180) and cotd(270), but not all. We could
alternatively deem both results valid, but that doesn't seem likely to
be what users will want.
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions