Two of the tests added by
4dd5ce2fd fail on buildfarm member
castoroides, though it's not clear why. Improve the tests to report
the actual values produced, if they're not what was expected.
Apply to v11 only for now, until it's clearer what's going on.
0.7678656556403084
(1 row)
-select 0.9999999999 ^ 23300000000000 = 0 as rounds_to_zero;
+select coalesce(nullif(0.9999999999 ^ 23300000000000, 0), 0) as rounds_to_zero;
rounds_to_zero
----------------
- t
+ 0
(1 row)
-- cases that used to error out
782333637740774446257.7719390061997396
(1 row)
-select 0.9999999999 ^ 70000000000000 = 0 as underflows;
+select coalesce(nullif(0.9999999999 ^ 70000000000000, 0), 0) as underflows;
underflows
------------
- t
+ 0
(1 row)
-- negative base to integer powers
select 1.2 ^ 345;
select 0.12 ^ (-20);
select 1.000000000123 ^ (-2147483648);
-select 0.9999999999 ^ 23300000000000 = 0 as rounds_to_zero;
+select coalesce(nullif(0.9999999999 ^ 23300000000000, 0), 0) as rounds_to_zero;
-- cases that used to error out
select 0.12 ^ (-25);
select 0.5678 ^ (-85);
-select 0.9999999999 ^ 70000000000000 = 0 as underflows;
+select coalesce(nullif(0.9999999999 ^ 70000000000000, 0), 0) as underflows;
-- negative base to integer powers
select (-1.0) ^ 2147483646;