Two of the trigonometry functions have differing error condition behavior between Linux and OSX. The Linux behavior follows the standard set by the other trig functions.
On Linux:
SELECT asin(2);
ERROR: input is out of range
SELECT acos(2);
ERROR: input is out of range
On OSX:
SELECT asin(2);
asin
------
NaN
(1 row)
SELECT asin(2);
asin
------
NaN
(1 row)
The attached patch brings OSX into line with the expected behaviour and the additional regression tests verify this.
Is this worth fixing and if so what is the next step?
Best, John