Make test for Decimal correct

This commit is contained in:
Alexey Milovidov 2021-05-08 03:33:01 +03:00
parent 06e79e914c
commit 1f69f8c475
2 changed files with 30 additions and 30 deletions

View File

@ -58,18 +58,18 @@
-12345.6789 -12340.0000 -12300.0000 -12000.0000 -10000.0000 0.0000
-12345.6789 -12350.0000 -12400.0000 -13000.0000 -20000.0000 -100000.0000
-12345.6789 -12340.0000 -12300.0000 -12000.0000 -10000.0000 0.0000
123456789.123456784 -123456789.123456784 123456789.000000000 -123456789.000000000 123456789.123460000 -123456789.123460000 123500000.000000000 -123500000.000000000
123456789.123456784 -123456789.123456784 123456789.000000000 -123456789.000000000 123456789.123460000 -123456789.123460000 123500000.000000000 -123500000.000000000
123456789.123456784 -123456789.123456784 123456790.000000000 -123456789.000000000 123456789.123460000 -123456789.123450000 123500000.000000000 -123400000.000000000
123456789.123456784 -123456789.123456784 123456789.000000000 -123456790.000000000 123456789.123450000 -123456789.123460000 123400000.000000000 -123500000.000000000
123456789.123456784 -123456789.123456784 123456789.000000000 -123456789.000000000 123456789.123450000 -123456789.123450000 123400000.000000000 -123400000.000000000
12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324607.000000000 -12345678901234567525491324607.000000000 12345678901234567525491324606.797000000 -12345678901234567525491324606.797000000
12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324607.000000000 -12345678901234567525491324607.000000000 12345678901234567525491324606.797000000 -12345678901234567525491324606.797000000
12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324607.000000000 -12345678901234567525491324606.000000000 12345678901234567525491324606.798000000 -12345678901234567525491324606.797000000
12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324606.000000000 -12345678901234567525491324607.000000000 12345678901234567525491324606.797000000 -12345678901234567525491324606.798000000
12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324606.000000000 -12345678901234567525491324606.000000000 12345678901234567525491324606.797000000 -12345678901234567525491324606.797000000
12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324607.000000000 -12345678901234567525491324607.000000000 12345678901234567525491325000.000000000 -12345678901234567525491325000.000000000
12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324607.000000000 -12345678901234567525491324607.000000000 12345678901234567525491325000.000000000 -12345678901234567525491325000.000000000
12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324607.000000000 -12345678901234567525491324606.000000000 12345678901234567525491325000.000000000 -12345678901234567525491324000.000000000
12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324606.000000000 -12345678901234567525491324607.000000000 12345678901234567525491324000.000000000 -12345678901234567525491325000.000000000
12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324606.000000000 -12345678901234567525491324606.000000000 12345678901234567525491324000.000000000 -12345678901234567525491324000.000000000
123456789.123456789 -123456789.123456789 123456789.000000000 -123456789.000000000 123456789.123460000 -123456789.123460000 123500000.000000000 -123500000.000000000
123456789.123456789 -123456789.123456789 123456789.000000000 -123456789.000000000 123456789.123460000 -123456789.123460000 123500000.000000000 -123500000.000000000
123456789.123456789 -123456789.123456789 123456790.000000000 -123456789.000000000 123456789.123460000 -123456789.123450000 123500000.000000000 -123400000.000000000
123456789.123456789 -123456789.123456789 123456789.000000000 -123456790.000000000 123456789.123450000 -123456789.123460000 123400000.000000000 -123500000.000000000
123456789.123456789 -123456789.123456789 123456789.000000000 -123456789.000000000 123456789.123450000 -123456789.123450000 123400000.000000000 -123400000.000000000
12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456789.000000000 12345678901234567890123456789.123000000 -12345678901234567890123456789.123000000
12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456789.000000000 12345678901234567890123456789.123000000 -12345678901234567890123456789.123000000
12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456790.000000000 -12345678901234567890123456789.000000000 12345678901234567890123456789.124000000 -12345678901234567890123456789.123000000
12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456790.000000000 12345678901234567890123456789.123000000 -12345678901234567890123456789.124000000
12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456789.000000000 12345678901234567890123456789.123000000 -12345678901234567890123456789.123000000
12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456789.000000000 12345678901234567890123457000.000000000 -12345678901234567890123457000.000000000
12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456789.000000000 12345678901234567890123457000.000000000 -12345678901234567890123457000.000000000
12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456790.000000000 -12345678901234567890123456789.000000000 12345678901234567890123457000.000000000 -12345678901234567890123456000.000000000
12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456790.000000000 12345678901234567890123456000.000000000 -12345678901234567890123457000.000000000
12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456789.000000000 12345678901234567890123456000.000000000 -12345678901234567890123456000.000000000

View File

@ -61,20 +61,20 @@ SELECT toDecimal128(-12345.6789, 4) AS x, ceil(x, -1), ceil(x, -2), ceil(x, -3),
SELECT toDecimal128(-12345.6789, 4) AS x, floor(x, -1), floor(x, -2), floor(x, -3), floor(x, -4), floor(x, -5);
SELECT toDecimal128(-12345.6789, 4) AS x, trunc(x, -1), trunc(x, -2), trunc(x, -3), trunc(x, -4), trunc(x, -5);
SELECT toDecimal64(123456789.123456789, 9) AS x, -x AS y, round(x), round(y), round(x, 5), round(y, 5), round(x, -5), round(y, -5);
SELECT toDecimal64(123456789.123456789, 9) AS x, -x AS y, roundBankers(x), roundBankers(y), roundBankers(x, 5), roundBankers(y, 5), roundBankers(x, -5), roundBankers(y, -5);
SELECT toDecimal64(123456789.123456789, 9) AS x, -x AS y, ceil(x), ceil(y), ceil(x, 5), ceil(y, 5), ceil(x, -5), ceil(y, -5);
SELECT toDecimal64(123456789.123456789, 9) AS x, -x AS y, floor(x), floor(y), floor(x, 5), floor(y, 5), floor(x, -5), floor(y, -5);
SELECT toDecimal64(123456789.123456789, 9) AS x, -x AS y, trunc(x), trunc(y), trunc(x, 5), trunc(y, 5), trunc(x, -5), trunc(y, -5);
SELECT toDecimal64('123456789.123456789', 9) AS x, -x AS y, round(x), round(y), round(x, 5), round(y, 5), round(x, -5), round(y, -5);
SELECT toDecimal64('123456789.123456789', 9) AS x, -x AS y, roundBankers(x), roundBankers(y), roundBankers(x, 5), roundBankers(y, 5), roundBankers(x, -5), roundBankers(y, -5);
SELECT toDecimal64('123456789.123456789', 9) AS x, -x AS y, ceil(x), ceil(y), ceil(x, 5), ceil(y, 5), ceil(x, -5), ceil(y, -5);
SELECT toDecimal64('123456789.123456789', 9) AS x, -x AS y, floor(x), floor(y), floor(x, 5), floor(y, 5), floor(x, -5), floor(y, -5);
SELECT toDecimal64('123456789.123456789', 9) AS x, -x AS y, trunc(x), trunc(y), trunc(x, 5), trunc(y, 5), trunc(x, -5), trunc(y, -5);
SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, round(x), round(y), round(x, 3), round(y, 3);
SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, roundBankers(x), roundBankers(y), roundBankers(x, 3), roundBankers(y, 3);
SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, ceil(x), ceil(y), ceil(x, 3), ceil(y, 3);
SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, floor(x), floor(y), floor(x, 3), floor(y, 3);
SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, trunc(x), trunc(y), trunc(x, 3), trunc(y, 3);
SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, round(x), round(y), round(x, 3), round(y, 3);
SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, roundBankers(x), roundBankers(y), roundBankers(x, 3), roundBankers(y, 3);
SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, ceil(x), ceil(y), ceil(x, 3), ceil(y, 3);
SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, floor(x), floor(y), floor(x, 3), floor(y, 3);
SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, trunc(x), trunc(y), trunc(x, 3), trunc(y, 3);
SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, round(x), round(y), round(x, -3), round(y, -3);
SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, roundBankers(x), roundBankers(y), roundBankers(x, -3), roundBankers(y, -3);
SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, ceil(x), ceil(y), ceil(x, -3), ceil(y, -3);
SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, floor(x), floor(y), floor(x, -3), floor(y, -3);
SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, trunc(x), trunc(y), trunc(x, -3), trunc(y, -3);
SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, round(x), round(y), round(x, -3), round(y, -3);
SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, roundBankers(x), roundBankers(y), roundBankers(x, -3), roundBankers(y, -3);
SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, ceil(x), ceil(y), ceil(x, -3), ceil(y, -3);
SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, floor(x), floor(y), floor(x, -3), floor(y, -3);
SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, trunc(x), trunc(y), trunc(x, -3), trunc(y, -3);