diff options
Diffstat (limited to 'src/test/regress/sql/numeric.sql')
-rw-r--r-- | src/test/regress/sql/numeric.sql | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/regress/sql/numeric.sql b/src/test/regress/sql/numeric.sql index d0d05957e61..83a4f3c89d4 100644 --- a/src/test/regress/sql/numeric.sql +++ b/src/test/regress/sql/numeric.sql @@ -876,10 +876,19 @@ select 3.789 ^ 35; select 1.2 ^ 345; select 0.12 ^ (-20); select 1.000000000123 ^ (-2147483648); +select 0.9999999999 ^ 23300000000000 = 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; + +-- negative base to integer powers +select (-1.0) ^ 2147483646; +select (-1.0) ^ 2147483647; +select (-1.0) ^ 2147483648; +select (-1.0) ^ 1000000000000000; +select (-1.0) ^ 1000000000000001; -- -- Tests for raising to non-integer powers @@ -912,6 +921,8 @@ select 1.234 ^ 5678; select exp(0.0); select exp(1.0); select exp(1.0::numeric(71,70)); +select exp(-5000::numeric) = 0 as rounds_to_zero; +select exp(-10000::numeric) = 0 as underflows; -- cases that used to generate inaccurate results select exp(32.999); |