Initial commit

This commit is contained in:
René Mathieu
2026-01-17 13:49:51 +01:00
commit 0fef8d96c5
1897 changed files with 396119 additions and 0 deletions

View File

@@ -0,0 +1,161 @@
------------------------------------------------------------------------
-- abs.decTest -- decimal absolute value --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- This set of tests primarily tests the existence of the operator.
-- Addition, subtraction, rounding, and more overflows are tested
-- elsewhere.
precision: 9
rounding: half_up
maxExponent: 384
minexponent: -383
extended: 1
absx001 abs '1' -> '1'
absx002 abs '-1' -> '1'
absx003 abs '1.00' -> '1.00'
absx004 abs '-1.00' -> '1.00'
absx005 abs '0' -> '0'
absx006 abs '0.00' -> '0.00'
absx007 abs '00.0' -> '0.0'
absx008 abs '00.00' -> '0.00'
absx009 abs '00' -> '0'
absx010 abs '-2' -> '2'
absx011 abs '2' -> '2'
absx012 abs '-2.00' -> '2.00'
absx013 abs '2.00' -> '2.00'
absx014 abs '-0' -> '0'
absx015 abs '-0.00' -> '0.00'
absx016 abs '-00.0' -> '0.0'
absx017 abs '-00.00' -> '0.00'
absx018 abs '-00' -> '0'
absx020 abs '-2000000' -> '2000000'
absx021 abs '2000000' -> '2000000'
precision: 7
absx022 abs '-2000000' -> '2000000'
absx023 abs '2000000' -> '2000000'
precision: 6
absx024 abs '-2000000' -> '2.00000E+6' Rounded
absx025 abs '2000000' -> '2.00000E+6' Rounded
precision: 3
absx026 abs '-2000000' -> '2.00E+6' Rounded
absx027 abs '2000000' -> '2.00E+6' Rounded
absx030 abs '+0.1' -> '0.1'
absx031 abs '-0.1' -> '0.1'
absx032 abs '+0.01' -> '0.01'
absx033 abs '-0.01' -> '0.01'
absx034 abs '+0.001' -> '0.001'
absx035 abs '-0.001' -> '0.001'
absx036 abs '+0.000001' -> '0.000001'
absx037 abs '-0.000001' -> '0.000001'
absx038 abs '+0.000000000001' -> '1E-12'
absx039 abs '-0.000000000001' -> '1E-12'
-- examples from decArith
precision: 9
absx040 abs '2.1' -> '2.1'
absx041 abs '-100' -> '100'
absx042 abs '101.5' -> '101.5'
absx043 abs '-101.5' -> '101.5'
-- more fixed, potential LHS swaps/overlays if done by subtract 0
precision: 9
absx060 abs '-56267E-10' -> '0.0000056267'
absx061 abs '-56267E-5' -> '0.56267'
absx062 abs '-56267E-2' -> '562.67'
absx063 abs '-56267E-1' -> '5626.7'
absx065 abs '-56267E-0' -> '56267'
-- overflow tests
maxexponent: 999999999
minexponent: -999999999
precision: 3
absx120 abs 9.999E+999999999 -> Infinity Inexact Overflow Rounded
-- subnormals and underflow
precision: 3
maxexponent: 999
minexponent: -999
absx210 abs 1.00E-999 -> 1.00E-999
absx211 abs 0.1E-999 -> 1E-1000 Subnormal
absx212 abs 0.10E-999 -> 1.0E-1000 Subnormal
absx213 abs 0.100E-999 -> 1.0E-1000 Subnormal Rounded
absx214 abs 0.01E-999 -> 1E-1001 Subnormal
-- next is rounded to Emin
absx215 abs 0.999E-999 -> 1.00E-999 Inexact Rounded Subnormal Underflow
absx216 abs 0.099E-999 -> 1.0E-1000 Inexact Rounded Subnormal Underflow
absx217 abs 0.009E-999 -> 1E-1001 Inexact Rounded Subnormal Underflow
absx218 abs 0.001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
absx219 abs 0.0009E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
absx220 abs 0.0001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
absx230 abs -1.00E-999 -> 1.00E-999
absx231 abs -0.1E-999 -> 1E-1000 Subnormal
absx232 abs -0.10E-999 -> 1.0E-1000 Subnormal
absx233 abs -0.100E-999 -> 1.0E-1000 Subnormal Rounded
absx234 abs -0.01E-999 -> 1E-1001 Subnormal
-- next is rounded to Emin
absx235 abs -0.999E-999 -> 1.00E-999 Inexact Rounded Subnormal Underflow
absx236 abs -0.099E-999 -> 1.0E-1000 Inexact Rounded Subnormal Underflow
absx237 abs -0.009E-999 -> 1E-1001 Inexact Rounded Subnormal Underflow
absx238 abs -0.001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
absx239 abs -0.0009E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
absx240 abs -0.0001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
-- long operand tests
maxexponent: 999
minexponent: -999
precision: 9
absx301 abs 12345678000 -> 1.23456780E+10 Rounded
absx302 abs 1234567800 -> 1.23456780E+9 Rounded
absx303 abs 1234567890 -> 1.23456789E+9 Rounded
absx304 abs 1234567891 -> 1.23456789E+9 Inexact Rounded
absx305 abs 12345678901 -> 1.23456789E+10 Inexact Rounded
absx306 abs 1234567896 -> 1.23456790E+9 Inexact Rounded
precision: 15
absx321 abs 12345678000 -> 12345678000
absx322 abs 1234567800 -> 1234567800
absx323 abs 1234567890 -> 1234567890
absx324 abs 1234567891 -> 1234567891
absx325 abs 12345678901 -> 12345678901
absx326 abs 1234567896 -> 1234567896
-- Specials
precision: 9
-- specials
absx520 abs 'Inf' -> 'Infinity'
absx521 abs '-Inf' -> 'Infinity'
absx522 abs NaN -> NaN
absx523 abs sNaN -> NaN Invalid_operation
absx524 abs NaN22 -> NaN22
absx525 abs sNaN33 -> NaN33 Invalid_operation
absx526 abs -NaN22 -> -NaN22
absx527 abs -sNaN33 -> -NaN33 Invalid_operation
-- Null tests
absx900 abs # -> NaN Invalid_operation

View File

@@ -0,0 +1,338 @@
------------------------------------------------------------------------
-- and.decTest -- digitwise logical AND --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
precision: 9
rounding: half_up
maxExponent: 999
minExponent: -999
-- Sanity check (truth table)
andx001 and 0 0 -> 0
andx002 and 0 1 -> 0
andx003 and 1 0 -> 0
andx004 and 1 1 -> 1
andx005 and 1100 1010 -> 1000
andx006 and 1111 10 -> 10
andx007 and 1111 1010 -> 1010
-- and at msd and msd-1
andx010 and 000000000 000000000 -> 0
andx011 and 000000000 100000000 -> 0
andx012 and 100000000 000000000 -> 0
andx013 and 100000000 100000000 -> 100000000
andx014 and 000000000 000000000 -> 0
andx015 and 000000000 010000000 -> 0
andx016 and 010000000 000000000 -> 0
andx017 and 010000000 010000000 -> 10000000
-- Various lengths
-- 123456789 123456789 123456789
andx021 and 111111111 111111111 -> 111111111
andx022 and 111111111111 111111111 -> 111111111
andx023 and 111111111111 11111111 -> 11111111
andx024 and 111111111 11111111 -> 11111111
andx025 and 111111111 1111111 -> 1111111
andx026 and 111111111111 111111 -> 111111
andx027 and 111111111111 11111 -> 11111
andx028 and 111111111111 1111 -> 1111
andx029 and 111111111111 111 -> 111
andx031 and 111111111111 11 -> 11
andx032 and 111111111111 1 -> 1
andx033 and 111111111111 1111111111 -> 111111111
andx034 and 11111111111 11111111111 -> 111111111
andx035 and 1111111111 111111111111 -> 111111111
andx036 and 111111111 1111111111111 -> 111111111
andx040 and 111111111 111111111111 -> 111111111
andx041 and 11111111 111111111111 -> 11111111
andx042 and 11111111 111111111 -> 11111111
andx043 and 1111111 111111111 -> 1111111
andx044 and 111111 111111111 -> 111111
andx045 and 11111 111111111 -> 11111
andx046 and 1111 111111111 -> 1111
andx047 and 111 111111111 -> 111
andx048 and 11 111111111 -> 11
andx049 and 1 111111111 -> 1
andx050 and 1111111111 1 -> 1
andx051 and 111111111 1 -> 1
andx052 and 11111111 1 -> 1
andx053 and 1111111 1 -> 1
andx054 and 111111 1 -> 1
andx055 and 11111 1 -> 1
andx056 and 1111 1 -> 1
andx057 and 111 1 -> 1
andx058 and 11 1 -> 1
andx059 and 1 1 -> 1
andx060 and 1111111111 0 -> 0
andx061 and 111111111 0 -> 0
andx062 and 11111111 0 -> 0
andx063 and 1111111 0 -> 0
andx064 and 111111 0 -> 0
andx065 and 11111 0 -> 0
andx066 and 1111 0 -> 0
andx067 and 111 0 -> 0
andx068 and 11 0 -> 0
andx069 and 1 0 -> 0
andx070 and 1 1111111111 -> 1
andx071 and 1 111111111 -> 1
andx072 and 1 11111111 -> 1
andx073 and 1 1111111 -> 1
andx074 and 1 111111 -> 1
andx075 and 1 11111 -> 1
andx076 and 1 1111 -> 1
andx077 and 1 111 -> 1
andx078 and 1 11 -> 1
andx079 and 1 1 -> 1
andx080 and 0 1111111111 -> 0
andx081 and 0 111111111 -> 0
andx082 and 0 11111111 -> 0
andx083 and 0 1111111 -> 0
andx084 and 0 111111 -> 0
andx085 and 0 11111 -> 0
andx086 and 0 1111 -> 0
andx087 and 0 111 -> 0
andx088 and 0 11 -> 0
andx089 and 0 1 -> 0
andx090 and 011111111 111111111 -> 11111111
andx091 and 101111111 111111111 -> 101111111
andx092 and 110111111 111111111 -> 110111111
andx093 and 111011111 111111111 -> 111011111
andx094 and 111101111 111111111 -> 111101111
andx095 and 111110111 111111111 -> 111110111
andx096 and 111111011 111111111 -> 111111011
andx097 and 111111101 111111111 -> 111111101
andx098 and 111111110 111111111 -> 111111110
andx100 and 111111111 011111111 -> 11111111
andx101 and 111111111 101111111 -> 101111111
andx102 and 111111111 110111111 -> 110111111
andx103 and 111111111 111011111 -> 111011111
andx104 and 111111111 111101111 -> 111101111
andx105 and 111111111 111110111 -> 111110111
andx106 and 111111111 111111011 -> 111111011
andx107 and 111111111 111111101 -> 111111101
andx108 and 111111111 111111110 -> 111111110
-- non-0/1 should not be accepted, nor should signs
andx220 and 111111112 111111111 -> NaN Invalid_operation
andx221 and 333333333 333333333 -> NaN Invalid_operation
andx222 and 555555555 555555555 -> NaN Invalid_operation
andx223 and 777777777 777777777 -> NaN Invalid_operation
andx224 and 999999999 999999999 -> NaN Invalid_operation
andx225 and 222222222 999999999 -> NaN Invalid_operation
andx226 and 444444444 999999999 -> NaN Invalid_operation
andx227 and 666666666 999999999 -> NaN Invalid_operation
andx228 and 888888888 999999999 -> NaN Invalid_operation
andx229 and 999999999 222222222 -> NaN Invalid_operation
andx230 and 999999999 444444444 -> NaN Invalid_operation
andx231 and 999999999 666666666 -> NaN Invalid_operation
andx232 and 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
andx240 and 567468689 -934981942 -> NaN Invalid_operation
andx241 and 567367689 934981942 -> NaN Invalid_operation
andx242 and -631917772 -706014634 -> NaN Invalid_operation
andx243 and -756253257 138579234 -> NaN Invalid_operation
andx244 and 835590149 567435400 -> NaN Invalid_operation
-- test MSD
andx250 and 200000000 100000000 -> NaN Invalid_operation
andx251 and 700000000 100000000 -> NaN Invalid_operation
andx252 and 800000000 100000000 -> NaN Invalid_operation
andx253 and 900000000 100000000 -> NaN Invalid_operation
andx254 and 200000000 000000000 -> NaN Invalid_operation
andx255 and 700000000 000000000 -> NaN Invalid_operation
andx256 and 800000000 000000000 -> NaN Invalid_operation
andx257 and 900000000 000000000 -> NaN Invalid_operation
andx258 and 100000000 200000000 -> NaN Invalid_operation
andx259 and 100000000 700000000 -> NaN Invalid_operation
andx260 and 100000000 800000000 -> NaN Invalid_operation
andx261 and 100000000 900000000 -> NaN Invalid_operation
andx262 and 000000000 200000000 -> NaN Invalid_operation
andx263 and 000000000 700000000 -> NaN Invalid_operation
andx264 and 000000000 800000000 -> NaN Invalid_operation
andx265 and 000000000 900000000 -> NaN Invalid_operation
-- test MSD-1
andx270 and 020000000 100000000 -> NaN Invalid_operation
andx271 and 070100000 100000000 -> NaN Invalid_operation
andx272 and 080010000 100000001 -> NaN Invalid_operation
andx273 and 090001000 100000010 -> NaN Invalid_operation
andx274 and 100000100 020010100 -> NaN Invalid_operation
andx275 and 100000000 070001000 -> NaN Invalid_operation
andx276 and 100000010 080010100 -> NaN Invalid_operation
andx277 and 100000000 090000010 -> NaN Invalid_operation
-- test LSD
andx280 and 001000002 100000000 -> NaN Invalid_operation
andx281 and 000000007 100000000 -> NaN Invalid_operation
andx282 and 000000008 100000000 -> NaN Invalid_operation
andx283 and 000000009 100000000 -> NaN Invalid_operation
andx284 and 100000000 000100002 -> NaN Invalid_operation
andx285 and 100100000 001000007 -> NaN Invalid_operation
andx286 and 100010000 010000008 -> NaN Invalid_operation
andx287 and 100001000 100000009 -> NaN Invalid_operation
-- test Middie
andx288 and 001020000 100000000 -> NaN Invalid_operation
andx289 and 000070001 100000000 -> NaN Invalid_operation
andx290 and 000080000 100010000 -> NaN Invalid_operation
andx291 and 000090000 100001000 -> NaN Invalid_operation
andx292 and 100000010 000020100 -> NaN Invalid_operation
andx293 and 100100000 000070010 -> NaN Invalid_operation
andx294 and 100010100 000080001 -> NaN Invalid_operation
andx295 and 100001000 000090000 -> NaN Invalid_operation
-- signs
andx296 and -100001000 -000000000 -> NaN Invalid_operation
andx297 and -100001000 000010000 -> NaN Invalid_operation
andx298 and 100001000 -000000000 -> NaN Invalid_operation
andx299 and 100001000 000011000 -> 1000
-- Nmax, Nmin, Ntiny
andx331 and 2 9.99999999E+999 -> NaN Invalid_operation
andx332 and 3 1E-999 -> NaN Invalid_operation
andx333 and 4 1.00000000E-999 -> NaN Invalid_operation
andx334 and 5 1E-1007 -> NaN Invalid_operation
andx335 and 6 -1E-1007 -> NaN Invalid_operation
andx336 and 7 -1.00000000E-999 -> NaN Invalid_operation
andx337 and 8 -1E-999 -> NaN Invalid_operation
andx338 and 9 -9.99999999E+999 -> NaN Invalid_operation
andx341 and 9.99999999E+999 -18 -> NaN Invalid_operation
andx342 and 1E-999 01 -> NaN Invalid_operation
andx343 and 1.00000000E-999 -18 -> NaN Invalid_operation
andx344 and 1E-1007 18 -> NaN Invalid_operation
andx345 and -1E-1007 -10 -> NaN Invalid_operation
andx346 and -1.00000000E-999 18 -> NaN Invalid_operation
andx347 and -1E-999 10 -> NaN Invalid_operation
andx348 and -9.99999999E+999 -18 -> NaN Invalid_operation
-- A few other non-integers
andx361 and 1.0 1 -> NaN Invalid_operation
andx362 and 1E+1 1 -> NaN Invalid_operation
andx363 and 0.0 1 -> NaN Invalid_operation
andx364 and 0E+1 1 -> NaN Invalid_operation
andx365 and 9.9 1 -> NaN Invalid_operation
andx366 and 9E+1 1 -> NaN Invalid_operation
andx371 and 0 1.0 -> NaN Invalid_operation
andx372 and 0 1E+1 -> NaN Invalid_operation
andx373 and 0 0.0 -> NaN Invalid_operation
andx374 and 0 0E+1 -> NaN Invalid_operation
andx375 and 0 9.9 -> NaN Invalid_operation
andx376 and 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
andx780 and -Inf -Inf -> NaN Invalid_operation
andx781 and -Inf -1000 -> NaN Invalid_operation
andx782 and -Inf -1 -> NaN Invalid_operation
andx783 and -Inf -0 -> NaN Invalid_operation
andx784 and -Inf 0 -> NaN Invalid_operation
andx785 and -Inf 1 -> NaN Invalid_operation
andx786 and -Inf 1000 -> NaN Invalid_operation
andx787 and -1000 -Inf -> NaN Invalid_operation
andx788 and -Inf -Inf -> NaN Invalid_operation
andx789 and -1 -Inf -> NaN Invalid_operation
andx790 and -0 -Inf -> NaN Invalid_operation
andx791 and 0 -Inf -> NaN Invalid_operation
andx792 and 1 -Inf -> NaN Invalid_operation
andx793 and 1000 -Inf -> NaN Invalid_operation
andx794 and Inf -Inf -> NaN Invalid_operation
andx800 and Inf -Inf -> NaN Invalid_operation
andx801 and Inf -1000 -> NaN Invalid_operation
andx802 and Inf -1 -> NaN Invalid_operation
andx803 and Inf -0 -> NaN Invalid_operation
andx804 and Inf 0 -> NaN Invalid_operation
andx805 and Inf 1 -> NaN Invalid_operation
andx806 and Inf 1000 -> NaN Invalid_operation
andx807 and Inf Inf -> NaN Invalid_operation
andx808 and -1000 Inf -> NaN Invalid_operation
andx809 and -Inf Inf -> NaN Invalid_operation
andx810 and -1 Inf -> NaN Invalid_operation
andx811 and -0 Inf -> NaN Invalid_operation
andx812 and 0 Inf -> NaN Invalid_operation
andx813 and 1 Inf -> NaN Invalid_operation
andx814 and 1000 Inf -> NaN Invalid_operation
andx815 and Inf Inf -> NaN Invalid_operation
andx821 and NaN -Inf -> NaN Invalid_operation
andx822 and NaN -1000 -> NaN Invalid_operation
andx823 and NaN -1 -> NaN Invalid_operation
andx824 and NaN -0 -> NaN Invalid_operation
andx825 and NaN 0 -> NaN Invalid_operation
andx826 and NaN 1 -> NaN Invalid_operation
andx827 and NaN 1000 -> NaN Invalid_operation
andx828 and NaN Inf -> NaN Invalid_operation
andx829 and NaN NaN -> NaN Invalid_operation
andx830 and -Inf NaN -> NaN Invalid_operation
andx831 and -1000 NaN -> NaN Invalid_operation
andx832 and -1 NaN -> NaN Invalid_operation
andx833 and -0 NaN -> NaN Invalid_operation
andx834 and 0 NaN -> NaN Invalid_operation
andx835 and 1 NaN -> NaN Invalid_operation
andx836 and 1000 NaN -> NaN Invalid_operation
andx837 and Inf NaN -> NaN Invalid_operation
andx841 and sNaN -Inf -> NaN Invalid_operation
andx842 and sNaN -1000 -> NaN Invalid_operation
andx843 and sNaN -1 -> NaN Invalid_operation
andx844 and sNaN -0 -> NaN Invalid_operation
andx845 and sNaN 0 -> NaN Invalid_operation
andx846 and sNaN 1 -> NaN Invalid_operation
andx847 and sNaN 1000 -> NaN Invalid_operation
andx848 and sNaN NaN -> NaN Invalid_operation
andx849 and sNaN sNaN -> NaN Invalid_operation
andx850 and NaN sNaN -> NaN Invalid_operation
andx851 and -Inf sNaN -> NaN Invalid_operation
andx852 and -1000 sNaN -> NaN Invalid_operation
andx853 and -1 sNaN -> NaN Invalid_operation
andx854 and -0 sNaN -> NaN Invalid_operation
andx855 and 0 sNaN -> NaN Invalid_operation
andx856 and 1 sNaN -> NaN Invalid_operation
andx857 and 1000 sNaN -> NaN Invalid_operation
andx858 and Inf sNaN -> NaN Invalid_operation
andx859 and NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
andx861 and NaN1 -Inf -> NaN Invalid_operation
andx862 and +NaN2 -1000 -> NaN Invalid_operation
andx863 and NaN3 1000 -> NaN Invalid_operation
andx864 and NaN4 Inf -> NaN Invalid_operation
andx865 and NaN5 +NaN6 -> NaN Invalid_operation
andx866 and -Inf NaN7 -> NaN Invalid_operation
andx867 and -1000 NaN8 -> NaN Invalid_operation
andx868 and 1000 NaN9 -> NaN Invalid_operation
andx869 and Inf +NaN10 -> NaN Invalid_operation
andx871 and sNaN11 -Inf -> NaN Invalid_operation
andx872 and sNaN12 -1000 -> NaN Invalid_operation
andx873 and sNaN13 1000 -> NaN Invalid_operation
andx874 and sNaN14 NaN17 -> NaN Invalid_operation
andx875 and sNaN15 sNaN18 -> NaN Invalid_operation
andx876 and NaN16 sNaN19 -> NaN Invalid_operation
andx877 and -Inf +sNaN20 -> NaN Invalid_operation
andx878 and -1000 sNaN21 -> NaN Invalid_operation
andx879 and 1000 sNaN22 -> NaN Invalid_operation
andx880 and Inf sNaN23 -> NaN Invalid_operation
andx881 and +NaN25 +sNaN24 -> NaN Invalid_operation
andx882 and -NaN26 NaN28 -> NaN Invalid_operation
andx883 and -sNaN27 sNaN29 -> NaN Invalid_operation
andx884 and 1000 -NaN30 -> NaN Invalid_operation
andx885 and 1000 -sNaN31 -> NaN Invalid_operation

View File

@@ -0,0 +1,131 @@
------------------------------------------------------------------------
-- class.decTest -- Class operations --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- [New 2006.11.27]
precision: 9
maxExponent: 999
minExponent: -999
extended: 1
clamp: 1
rounding: half_even
clasx001 class 0 -> +Zero
clasx002 class 0.00 -> +Zero
clasx003 class 0E+5 -> +Zero
clasx004 class 1E-1007 -> +Subnormal
clasx005 class 0.1E-999 -> +Subnormal
clasx006 class 0.99999999E-999 -> +Subnormal
clasx007 class 1.00000000E-999 -> +Normal
clasx008 class 1E-999 -> +Normal
clasx009 class 1E-100 -> +Normal
clasx010 class 1E-10 -> +Normal
clasx012 class 1E-1 -> +Normal
clasx013 class 1 -> +Normal
clasx014 class 2.50 -> +Normal
clasx015 class 100.100 -> +Normal
clasx016 class 1E+30 -> +Normal
clasx017 class 1E+999 -> +Normal
clasx018 class 9.99999999E+999 -> +Normal
clasx019 class Inf -> +Infinity
clasx021 class -0 -> -Zero
clasx022 class -0.00 -> -Zero
clasx023 class -0E+5 -> -Zero
clasx024 class -1E-1007 -> -Subnormal
clasx025 class -0.1E-999 -> -Subnormal
clasx026 class -0.99999999E-999 -> -Subnormal
clasx027 class -1.00000000E-999 -> -Normal
clasx028 class -1E-999 -> -Normal
clasx029 class -1E-100 -> -Normal
clasx030 class -1E-10 -> -Normal
clasx032 class -1E-1 -> -Normal
clasx033 class -1 -> -Normal
clasx034 class -2.50 -> -Normal
clasx035 class -100.100 -> -Normal
clasx036 class -1E+30 -> -Normal
clasx037 class -1E+999 -> -Normal
clasx038 class -9.99999999E+999 -> -Normal
clasx039 class -Inf -> -Infinity
clasx041 class NaN -> NaN
clasx042 class -NaN -> NaN
clasx043 class +NaN12345 -> NaN
clasx044 class sNaN -> sNaN
clasx045 class -sNaN -> sNaN
clasx046 class +sNaN12345 -> sNaN
-- decimal64 bounds
precision: 16
maxExponent: 384
minExponent: -383
clamp: 1
rounding: half_even
clasx201 class 0 -> +Zero
clasx202 class 0.00 -> +Zero
clasx203 class 0E+5 -> +Zero
clasx204 class 1E-396 -> +Subnormal
clasx205 class 0.1E-383 -> +Subnormal
clasx206 class 0.999999999999999E-383 -> +Subnormal
clasx207 class 1.000000000000000E-383 -> +Normal
clasx208 class 1E-383 -> +Normal
clasx209 class 1E-100 -> +Normal
clasx210 class 1E-10 -> +Normal
clasx212 class 1E-1 -> +Normal
clasx213 class 1 -> +Normal
clasx214 class 2.50 -> +Normal
clasx215 class 100.100 -> +Normal
clasx216 class 1E+30 -> +Normal
clasx217 class 1E+384 -> +Normal
clasx218 class 9.999999999999999E+384 -> +Normal
clasx219 class Inf -> +Infinity
clasx221 class -0 -> -Zero
clasx222 class -0.00 -> -Zero
clasx223 class -0E+5 -> -Zero
clasx224 class -1E-396 -> -Subnormal
clasx225 class -0.1E-383 -> -Subnormal
clasx226 class -0.999999999999999E-383 -> -Subnormal
clasx227 class -1.000000000000000E-383 -> -Normal
clasx228 class -1E-383 -> -Normal
clasx229 class -1E-100 -> -Normal
clasx230 class -1E-10 -> -Normal
clasx232 class -1E-1 -> -Normal
clasx233 class -1 -> -Normal
clasx234 class -2.50 -> -Normal
clasx235 class -100.100 -> -Normal
clasx236 class -1E+30 -> -Normal
clasx237 class -1E+384 -> -Normal
clasx238 class -9.999999999999999E+384 -> -Normal
clasx239 class -Inf -> -Infinity
clasx241 class NaN -> NaN
clasx242 class -NaN -> NaN
clasx243 class +NaN12345 -> NaN
clasx244 class sNaN -> sNaN
clasx245 class -sNaN -> sNaN
clasx246 class +sNaN12345 -> sNaN

View File

@@ -0,0 +1,758 @@
------------------------------------------------------------------------
-- compare.decTest -- decimal comparison that allows quiet NaNs --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Note that we cannot assume add/subtract tests cover paths adequately,
-- here, because the code might be quite different (comparison cannot
-- overflow or underflow, so actual subtractions are not necessary).
extended: 1
precision: 9
rounding: half_up
maxExponent: 999
minexponent: -999
-- sanity checks
comx001 compare -2 -2 -> 0
comx002 compare -2 -1 -> -1
comx003 compare -2 0 -> -1
comx004 compare -2 1 -> -1
comx005 compare -2 2 -> -1
comx006 compare -1 -2 -> 1
comx007 compare -1 -1 -> 0
comx008 compare -1 0 -> -1
comx009 compare -1 1 -> -1
comx010 compare -1 2 -> -1
comx011 compare 0 -2 -> 1
comx012 compare 0 -1 -> 1
comx013 compare 0 0 -> 0
comx014 compare 0 1 -> -1
comx015 compare 0 2 -> -1
comx016 compare 1 -2 -> 1
comx017 compare 1 -1 -> 1
comx018 compare 1 0 -> 1
comx019 compare 1 1 -> 0
comx020 compare 1 2 -> -1
comx021 compare 2 -2 -> 1
comx022 compare 2 -1 -> 1
comx023 compare 2 0 -> 1
comx025 compare 2 1 -> 1
comx026 compare 2 2 -> 0
comx031 compare -20 -20 -> 0
comx032 compare -20 -10 -> -1
comx033 compare -20 00 -> -1
comx034 compare -20 10 -> -1
comx035 compare -20 20 -> -1
comx036 compare -10 -20 -> 1
comx037 compare -10 -10 -> 0
comx038 compare -10 00 -> -1
comx039 compare -10 10 -> -1
comx040 compare -10 20 -> -1
comx041 compare 00 -20 -> 1
comx042 compare 00 -10 -> 1
comx043 compare 00 00 -> 0
comx044 compare 00 10 -> -1
comx045 compare 00 20 -> -1
comx046 compare 10 -20 -> 1
comx047 compare 10 -10 -> 1
comx048 compare 10 00 -> 1
comx049 compare 10 10 -> 0
comx050 compare 10 20 -> -1
comx051 compare 20 -20 -> 1
comx052 compare 20 -10 -> 1
comx053 compare 20 00 -> 1
comx055 compare 20 10 -> 1
comx056 compare 20 20 -> 0
comx061 compare -2.0 -2.0 -> 0
comx062 compare -2.0 -1.0 -> -1
comx063 compare -2.0 0.0 -> -1
comx064 compare -2.0 1.0 -> -1
comx065 compare -2.0 2.0 -> -1
comx066 compare -1.0 -2.0 -> 1
comx067 compare -1.0 -1.0 -> 0
comx068 compare -1.0 0.0 -> -1
comx069 compare -1.0 1.0 -> -1
comx070 compare -1.0 2.0 -> -1
comx071 compare 0.0 -2.0 -> 1
comx072 compare 0.0 -1.0 -> 1
comx073 compare 0.0 0.0 -> 0
comx074 compare 0.0 1.0 -> -1
comx075 compare 0.0 2.0 -> -1
comx076 compare 1.0 -2.0 -> 1
comx077 compare 1.0 -1.0 -> 1
comx078 compare 1.0 0.0 -> 1
comx079 compare 1.0 1.0 -> 0
comx080 compare 1.0 2.0 -> -1
comx081 compare 2.0 -2.0 -> 1
comx082 compare 2.0 -1.0 -> 1
comx083 compare 2.0 0.0 -> 1
comx085 compare 2.0 1.0 -> 1
comx086 compare 2.0 2.0 -> 0
-- now some cases which might overflow if subtract were used
maxexponent: 999999999
minexponent: -999999999
comx095 compare 9.99999999E+999999999 9.99999999E+999999999 -> 0
comx096 compare -9.99999999E+999999999 9.99999999E+999999999 -> -1
comx097 compare 9.99999999E+999999999 -9.99999999E+999999999 -> 1
comx098 compare -9.99999999E+999999999 -9.99999999E+999999999 -> 0
-- some differing length/exponent cases
comx100 compare 7.0 7.0 -> 0
comx101 compare 7.0 7 -> 0
comx102 compare 7 7.0 -> 0
comx103 compare 7E+0 7.0 -> 0
comx104 compare 70E-1 7.0 -> 0
comx105 compare 0.7E+1 7 -> 0
comx106 compare 70E-1 7 -> 0
comx107 compare 7.0 7E+0 -> 0
comx108 compare 7.0 70E-1 -> 0
comx109 compare 7 0.7E+1 -> 0
comx110 compare 7 70E-1 -> 0
comx120 compare 8.0 7.0 -> 1
comx121 compare 8.0 7 -> 1
comx122 compare 8 7.0 -> 1
comx123 compare 8E+0 7.0 -> 1
comx124 compare 80E-1 7.0 -> 1
comx125 compare 0.8E+1 7 -> 1
comx126 compare 80E-1 7 -> 1
comx127 compare 8.0 7E+0 -> 1
comx128 compare 8.0 70E-1 -> 1
comx129 compare 8 0.7E+1 -> 1
comx130 compare 8 70E-1 -> 1
comx140 compare 8.0 9.0 -> -1
comx141 compare 8.0 9 -> -1
comx142 compare 8 9.0 -> -1
comx143 compare 8E+0 9.0 -> -1
comx144 compare 80E-1 9.0 -> -1
comx145 compare 0.8E+1 9 -> -1
comx146 compare 80E-1 9 -> -1
comx147 compare 8.0 9E+0 -> -1
comx148 compare 8.0 90E-1 -> -1
comx149 compare 8 0.9E+1 -> -1
comx150 compare 8 90E-1 -> -1
-- and again, with sign changes -+ ..
comx200 compare -7.0 7.0 -> -1
comx201 compare -7.0 7 -> -1
comx202 compare -7 7.0 -> -1
comx203 compare -7E+0 7.0 -> -1
comx204 compare -70E-1 7.0 -> -1
comx205 compare -0.7E+1 7 -> -1
comx206 compare -70E-1 7 -> -1
comx207 compare -7.0 7E+0 -> -1
comx208 compare -7.0 70E-1 -> -1
comx209 compare -7 0.7E+1 -> -1
comx210 compare -7 70E-1 -> -1
comx220 compare -8.0 7.0 -> -1
comx221 compare -8.0 7 -> -1
comx222 compare -8 7.0 -> -1
comx223 compare -8E+0 7.0 -> -1
comx224 compare -80E-1 7.0 -> -1
comx225 compare -0.8E+1 7 -> -1
comx226 compare -80E-1 7 -> -1
comx227 compare -8.0 7E+0 -> -1
comx228 compare -8.0 70E-1 -> -1
comx229 compare -8 0.7E+1 -> -1
comx230 compare -8 70E-1 -> -1
comx240 compare -8.0 9.0 -> -1
comx241 compare -8.0 9 -> -1
comx242 compare -8 9.0 -> -1
comx243 compare -8E+0 9.0 -> -1
comx244 compare -80E-1 9.0 -> -1
comx245 compare -0.8E+1 9 -> -1
comx246 compare -80E-1 9 -> -1
comx247 compare -8.0 9E+0 -> -1
comx248 compare -8.0 90E-1 -> -1
comx249 compare -8 0.9E+1 -> -1
comx250 compare -8 90E-1 -> -1
-- and again, with sign changes +- ..
comx300 compare 7.0 -7.0 -> 1
comx301 compare 7.0 -7 -> 1
comx302 compare 7 -7.0 -> 1
comx303 compare 7E+0 -7.0 -> 1
comx304 compare 70E-1 -7.0 -> 1
comx305 compare .7E+1 -7 -> 1
comx306 compare 70E-1 -7 -> 1
comx307 compare 7.0 -7E+0 -> 1
comx308 compare 7.0 -70E-1 -> 1
comx309 compare 7 -.7E+1 -> 1
comx310 compare 7 -70E-1 -> 1
comx320 compare 8.0 -7.0 -> 1
comx321 compare 8.0 -7 -> 1
comx322 compare 8 -7.0 -> 1
comx323 compare 8E+0 -7.0 -> 1
comx324 compare 80E-1 -7.0 -> 1
comx325 compare .8E+1 -7 -> 1
comx326 compare 80E-1 -7 -> 1
comx327 compare 8.0 -7E+0 -> 1
comx328 compare 8.0 -70E-1 -> 1
comx329 compare 8 -.7E+1 -> 1
comx330 compare 8 -70E-1 -> 1
comx340 compare 8.0 -9.0 -> 1
comx341 compare 8.0 -9 -> 1
comx342 compare 8 -9.0 -> 1
comx343 compare 8E+0 -9.0 -> 1
comx344 compare 80E-1 -9.0 -> 1
comx345 compare .8E+1 -9 -> 1
comx346 compare 80E-1 -9 -> 1
comx347 compare 8.0 -9E+0 -> 1
comx348 compare 8.0 -90E-1 -> 1
comx349 compare 8 -.9E+1 -> 1
comx350 compare 8 -90E-1 -> 1
-- and again, with sign changes -- ..
comx400 compare -7.0 -7.0 -> 0
comx401 compare -7.0 -7 -> 0
comx402 compare -7 -7.0 -> 0
comx403 compare -7E+0 -7.0 -> 0
comx404 compare -70E-1 -7.0 -> 0
comx405 compare -.7E+1 -7 -> 0
comx406 compare -70E-1 -7 -> 0
comx407 compare -7.0 -7E+0 -> 0
comx408 compare -7.0 -70E-1 -> 0
comx409 compare -7 -.7E+1 -> 0
comx410 compare -7 -70E-1 -> 0
comx420 compare -8.0 -7.0 -> -1
comx421 compare -8.0 -7 -> -1
comx422 compare -8 -7.0 -> -1
comx423 compare -8E+0 -7.0 -> -1
comx424 compare -80E-1 -7.0 -> -1
comx425 compare -.8E+1 -7 -> -1
comx426 compare -80E-1 -7 -> -1
comx427 compare -8.0 -7E+0 -> -1
comx428 compare -8.0 -70E-1 -> -1
comx429 compare -8 -.7E+1 -> -1
comx430 compare -8 -70E-1 -> -1
comx440 compare -8.0 -9.0 -> 1
comx441 compare -8.0 -9 -> 1
comx442 compare -8 -9.0 -> 1
comx443 compare -8E+0 -9.0 -> 1
comx444 compare -80E-1 -9.0 -> 1
comx445 compare -.8E+1 -9 -> 1
comx446 compare -80E-1 -9 -> 1
comx447 compare -8.0 -9E+0 -> 1
comx448 compare -8.0 -90E-1 -> 1
comx449 compare -8 -.9E+1 -> 1
comx450 compare -8 -90E-1 -> 1
-- misalignment traps for little-endian
comx451 compare 1.0 0.1 -> 1
comx452 compare 0.1 1.0 -> -1
comx453 compare 10.0 0.1 -> 1
comx454 compare 0.1 10.0 -> -1
comx455 compare 100 1.0 -> 1
comx456 compare 1.0 100 -> -1
comx457 compare 1000 10.0 -> 1
comx458 compare 10.0 1000 -> -1
comx459 compare 10000 100.0 -> 1
comx460 compare 100.0 10000 -> -1
comx461 compare 100000 1000.0 -> 1
comx462 compare 1000.0 100000 -> -1
comx463 compare 1000000 10000.0 -> 1
comx464 compare 10000.0 1000000 -> -1
-- testcases that subtract to lots of zeros at boundaries [pgr]
precision: 40
comx470 compare 123.4560000000000000E789 123.456E789 -> 0
comx471 compare 123.456000000000000E-89 123.456E-89 -> 0
comx472 compare 123.45600000000000E789 123.456E789 -> 0
comx473 compare 123.4560000000000E-89 123.456E-89 -> 0
comx474 compare 123.456000000000E789 123.456E789 -> 0
comx475 compare 123.45600000000E-89 123.456E-89 -> 0
comx476 compare 123.4560000000E789 123.456E789 -> 0
comx477 compare 123.456000000E-89 123.456E-89 -> 0
comx478 compare 123.45600000E789 123.456E789 -> 0
comx479 compare 123.4560000E-89 123.456E-89 -> 0
comx480 compare 123.456000E789 123.456E789 -> 0
comx481 compare 123.45600E-89 123.456E-89 -> 0
comx482 compare 123.4560E789 123.456E789 -> 0
comx483 compare 123.456E-89 123.456E-89 -> 0
comx484 compare 123.456E-89 123.4560000000000000E-89 -> 0
comx485 compare 123.456E789 123.456000000000000E789 -> 0
comx486 compare 123.456E-89 123.45600000000000E-89 -> 0
comx487 compare 123.456E789 123.4560000000000E789 -> 0
comx488 compare 123.456E-89 123.456000000000E-89 -> 0
comx489 compare 123.456E789 123.45600000000E789 -> 0
comx490 compare 123.456E-89 123.4560000000E-89 -> 0
comx491 compare 123.456E789 123.456000000E789 -> 0
comx492 compare 123.456E-89 123.45600000E-89 -> 0
comx493 compare 123.456E789 123.4560000E789 -> 0
comx494 compare 123.456E-89 123.456000E-89 -> 0
comx495 compare 123.456E789 123.45600E789 -> 0
comx496 compare 123.456E-89 123.4560E-89 -> 0
comx497 compare 123.456E789 123.456E789 -> 0
-- wide-ranging, around precision; signs equal
precision: 9
comx500 compare 1 1E-15 -> 1
comx501 compare 1 1E-14 -> 1
comx502 compare 1 1E-13 -> 1
comx503 compare 1 1E-12 -> 1
comx504 compare 1 1E-11 -> 1
comx505 compare 1 1E-10 -> 1
comx506 compare 1 1E-9 -> 1
comx507 compare 1 1E-8 -> 1
comx508 compare 1 1E-7 -> 1
comx509 compare 1 1E-6 -> 1
comx510 compare 1 1E-5 -> 1
comx511 compare 1 1E-4 -> 1
comx512 compare 1 1E-3 -> 1
comx513 compare 1 1E-2 -> 1
comx514 compare 1 1E-1 -> 1
comx515 compare 1 1E-0 -> 0
comx516 compare 1 1E+1 -> -1
comx517 compare 1 1E+2 -> -1
comx518 compare 1 1E+3 -> -1
comx519 compare 1 1E+4 -> -1
comx521 compare 1 1E+5 -> -1
comx522 compare 1 1E+6 -> -1
comx523 compare 1 1E+7 -> -1
comx524 compare 1 1E+8 -> -1
comx525 compare 1 1E+9 -> -1
comx526 compare 1 1E+10 -> -1
comx527 compare 1 1E+11 -> -1
comx528 compare 1 1E+12 -> -1
comx529 compare 1 1E+13 -> -1
comx530 compare 1 1E+14 -> -1
comx531 compare 1 1E+15 -> -1
-- LR swap
comx540 compare 1E-15 1 -> -1
comx541 compare 1E-14 1 -> -1
comx542 compare 1E-13 1 -> -1
comx543 compare 1E-12 1 -> -1
comx544 compare 1E-11 1 -> -1
comx545 compare 1E-10 1 -> -1
comx546 compare 1E-9 1 -> -1
comx547 compare 1E-8 1 -> -1
comx548 compare 1E-7 1 -> -1
comx549 compare 1E-6 1 -> -1
comx550 compare 1E-5 1 -> -1
comx551 compare 1E-4 1 -> -1
comx552 compare 1E-3 1 -> -1
comx553 compare 1E-2 1 -> -1
comx554 compare 1E-1 1 -> -1
comx555 compare 1E-0 1 -> 0
comx556 compare 1E+1 1 -> 1
comx557 compare 1E+2 1 -> 1
comx558 compare 1E+3 1 -> 1
comx559 compare 1E+4 1 -> 1
comx561 compare 1E+5 1 -> 1
comx562 compare 1E+6 1 -> 1
comx563 compare 1E+7 1 -> 1
comx564 compare 1E+8 1 -> 1
comx565 compare 1E+9 1 -> 1
comx566 compare 1E+10 1 -> 1
comx567 compare 1E+11 1 -> 1
comx568 compare 1E+12 1 -> 1
comx569 compare 1E+13 1 -> 1
comx570 compare 1E+14 1 -> 1
comx571 compare 1E+15 1 -> 1
-- similar with a useful coefficient, one side only
comx580 compare 0.000000987654321 1E-15 -> 1
comx581 compare 0.000000987654321 1E-14 -> 1
comx582 compare 0.000000987654321 1E-13 -> 1
comx583 compare 0.000000987654321 1E-12 -> 1
comx584 compare 0.000000987654321 1E-11 -> 1
comx585 compare 0.000000987654321 1E-10 -> 1
comx586 compare 0.000000987654321 1E-9 -> 1
comx587 compare 0.000000987654321 1E-8 -> 1
comx588 compare 0.000000987654321 1E-7 -> 1
comx589 compare 0.000000987654321 1E-6 -> -1
comx590 compare 0.000000987654321 1E-5 -> -1
comx591 compare 0.000000987654321 1E-4 -> -1
comx592 compare 0.000000987654321 1E-3 -> -1
comx593 compare 0.000000987654321 1E-2 -> -1
comx594 compare 0.000000987654321 1E-1 -> -1
comx595 compare 0.000000987654321 1E-0 -> -1
comx596 compare 0.000000987654321 1E+1 -> -1
comx597 compare 0.000000987654321 1E+2 -> -1
comx598 compare 0.000000987654321 1E+3 -> -1
comx599 compare 0.000000987654321 1E+4 -> -1
-- check some unit-y traps
precision: 20
comx600 compare 12 12.2345 -> -1
comx601 compare 12.0 12.2345 -> -1
comx602 compare 12.00 12.2345 -> -1
comx603 compare 12.000 12.2345 -> -1
comx604 compare 12.0000 12.2345 -> -1
comx605 compare 12.00000 12.2345 -> -1
comx606 compare 12.000000 12.2345 -> -1
comx607 compare 12.0000000 12.2345 -> -1
comx608 compare 12.00000000 12.2345 -> -1
comx609 compare 12.000000000 12.2345 -> -1
comx610 compare 12.1234 12 -> 1
comx611 compare 12.1234 12.0 -> 1
comx612 compare 12.1234 12.00 -> 1
comx613 compare 12.1234 12.000 -> 1
comx614 compare 12.1234 12.0000 -> 1
comx615 compare 12.1234 12.00000 -> 1
comx616 compare 12.1234 12.000000 -> 1
comx617 compare 12.1234 12.0000000 -> 1
comx618 compare 12.1234 12.00000000 -> 1
comx619 compare 12.1234 12.000000000 -> 1
comx620 compare -12 -12.2345 -> 1
comx621 compare -12.0 -12.2345 -> 1
comx622 compare -12.00 -12.2345 -> 1
comx623 compare -12.000 -12.2345 -> 1
comx624 compare -12.0000 -12.2345 -> 1
comx625 compare -12.00000 -12.2345 -> 1
comx626 compare -12.000000 -12.2345 -> 1
comx627 compare -12.0000000 -12.2345 -> 1
comx628 compare -12.00000000 -12.2345 -> 1
comx629 compare -12.000000000 -12.2345 -> 1
comx630 compare -12.1234 -12 -> -1
comx631 compare -12.1234 -12.0 -> -1
comx632 compare -12.1234 -12.00 -> -1
comx633 compare -12.1234 -12.000 -> -1
comx634 compare -12.1234 -12.0000 -> -1
comx635 compare -12.1234 -12.00000 -> -1
comx636 compare -12.1234 -12.000000 -> -1
comx637 compare -12.1234 -12.0000000 -> -1
comx638 compare -12.1234 -12.00000000 -> -1
comx639 compare -12.1234 -12.000000000 -> -1
precision: 9
-- extended zeros
comx640 compare 0 0 -> 0
comx641 compare 0 -0 -> 0
comx642 compare 0 -0.0 -> 0
comx643 compare 0 0.0 -> 0
comx644 compare -0 0 -> 0
comx645 compare -0 -0 -> 0
comx646 compare -0 -0.0 -> 0
comx647 compare -0 0.0 -> 0
comx648 compare 0.0 0 -> 0
comx649 compare 0.0 -0 -> 0
comx650 compare 0.0 -0.0 -> 0
comx651 compare 0.0 0.0 -> 0
comx652 compare -0.0 0 -> 0
comx653 compare -0.0 -0 -> 0
comx654 compare -0.0 -0.0 -> 0
comx655 compare -0.0 0.0 -> 0
comx656 compare -0E1 0.0 -> 0
comx657 compare -0E2 0.0 -> 0
comx658 compare 0E1 0.0 -> 0
comx659 compare 0E2 0.0 -> 0
comx660 compare -0E1 0 -> 0
comx661 compare -0E2 0 -> 0
comx662 compare 0E1 0 -> 0
comx663 compare 0E2 0 -> 0
comx664 compare -0E1 -0E1 -> 0
comx665 compare -0E2 -0E1 -> 0
comx666 compare 0E1 -0E1 -> 0
comx667 compare 0E2 -0E1 -> 0
comx668 compare -0E1 -0E2 -> 0
comx669 compare -0E2 -0E2 -> 0
comx670 compare 0E1 -0E2 -> 0
comx671 compare 0E2 -0E2 -> 0
comx672 compare -0E1 0E1 -> 0
comx673 compare -0E2 0E1 -> 0
comx674 compare 0E1 0E1 -> 0
comx675 compare 0E2 0E1 -> 0
comx676 compare -0E1 0E2 -> 0
comx677 compare -0E2 0E2 -> 0
comx678 compare 0E1 0E2 -> 0
comx679 compare 0E2 0E2 -> 0
-- trailing zeros; unit-y
precision: 20
comx680 compare 12 12 -> 0
comx681 compare 12 12.0 -> 0
comx682 compare 12 12.00 -> 0
comx683 compare 12 12.000 -> 0
comx684 compare 12 12.0000 -> 0
comx685 compare 12 12.00000 -> 0
comx686 compare 12 12.000000 -> 0
comx687 compare 12 12.0000000 -> 0
comx688 compare 12 12.00000000 -> 0
comx689 compare 12 12.000000000 -> 0
comx690 compare 12 12 -> 0
comx691 compare 12.0 12 -> 0
comx692 compare 12.00 12 -> 0
comx693 compare 12.000 12 -> 0
comx694 compare 12.0000 12 -> 0
comx695 compare 12.00000 12 -> 0
comx696 compare 12.000000 12 -> 0
comx697 compare 12.0000000 12 -> 0
comx698 compare 12.00000000 12 -> 0
comx699 compare 12.000000000 12 -> 0
-- long operand checks
maxexponent: 999
minexponent: -999
precision: 9
comx701 compare 12345678000 1 -> 1
comx702 compare 1 12345678000 -> -1
comx703 compare 1234567800 1 -> 1
comx704 compare 1 1234567800 -> -1
comx705 compare 1234567890 1 -> 1
comx706 compare 1 1234567890 -> -1
comx707 compare 1234567891 1 -> 1
comx708 compare 1 1234567891 -> -1
comx709 compare 12345678901 1 -> 1
comx710 compare 1 12345678901 -> -1
comx711 compare 1234567896 1 -> 1
comx712 compare 1 1234567896 -> -1
comx713 compare -1234567891 1 -> -1
comx714 compare 1 -1234567891 -> 1
comx715 compare -12345678901 1 -> -1
comx716 compare 1 -12345678901 -> 1
comx717 compare -1234567896 1 -> -1
comx718 compare 1 -1234567896 -> 1
precision: 15
-- same with plenty of precision
comx721 compare 12345678000 1 -> 1
comx722 compare 1 12345678000 -> -1
comx723 compare 1234567800 1 -> 1
comx724 compare 1 1234567800 -> -1
comx725 compare 1234567890 1 -> 1
comx726 compare 1 1234567890 -> -1
comx727 compare 1234567891 1 -> 1
comx728 compare 1 1234567891 -> -1
comx729 compare 12345678901 1 -> 1
comx730 compare 1 12345678901 -> -1
comx731 compare 1234567896 1 -> 1
comx732 compare 1 1234567896 -> -1
-- residue cases
precision: 5
comx740 compare 1 0.9999999 -> 1
comx741 compare 1 0.999999 -> 1
comx742 compare 1 0.99999 -> 1
comx743 compare 1 1.0000 -> 0
comx744 compare 1 1.00001 -> -1
comx745 compare 1 1.000001 -> -1
comx746 compare 1 1.0000001 -> -1
comx750 compare 0.9999999 1 -> -1
comx751 compare 0.999999 1 -> -1
comx752 compare 0.99999 1 -> -1
comx753 compare 1.0000 1 -> 0
comx754 compare 1.00001 1 -> 1
comx755 compare 1.000001 1 -> 1
comx756 compare 1.0000001 1 -> 1
-- a selection of longies
comx760 compare -36852134.84194296250843579428931 -5830629.8347085025808756560357940 -> -1
comx761 compare -36852134.84194296250843579428931 -36852134.84194296250843579428931 -> 0
comx762 compare -36852134.94194296250843579428931 -36852134.84194296250843579428931 -> -1
comx763 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
-- precisions above or below the difference should have no effect
precision: 11
comx764 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 10
comx765 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 9
comx766 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 8
comx767 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 7
comx768 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 6
comx769 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 5
comx770 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 4
comx771 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 3
comx772 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 2
comx773 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 1
comx774 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
-- Specials
precision: 9
comx780 compare Inf -Inf -> 1
comx781 compare Inf -1000 -> 1
comx782 compare Inf -1 -> 1
comx783 compare Inf -0 -> 1
comx784 compare Inf 0 -> 1
comx785 compare Inf 1 -> 1
comx786 compare Inf 1000 -> 1
comx787 compare Inf Inf -> 0
comx788 compare -1000 Inf -> -1
comx789 compare -Inf Inf -> -1
comx790 compare -1 Inf -> -1
comx791 compare -0 Inf -> -1
comx792 compare 0 Inf -> -1
comx793 compare 1 Inf -> -1
comx794 compare 1000 Inf -> -1
comx795 compare Inf Inf -> 0
comx800 compare -Inf -Inf -> 0
comx801 compare -Inf -1000 -> -1
comx802 compare -Inf -1 -> -1
comx803 compare -Inf -0 -> -1
comx804 compare -Inf 0 -> -1
comx805 compare -Inf 1 -> -1
comx806 compare -Inf 1000 -> -1
comx807 compare -Inf Inf -> -1
comx808 compare -Inf -Inf -> 0
comx809 compare -1000 -Inf -> 1
comx810 compare -1 -Inf -> 1
comx811 compare -0 -Inf -> 1
comx812 compare 0 -Inf -> 1
comx813 compare 1 -Inf -> 1
comx814 compare 1000 -Inf -> 1
comx815 compare Inf -Inf -> 1
comx821 compare NaN -Inf -> NaN
comx822 compare NaN -1000 -> NaN
comx823 compare NaN -1 -> NaN
comx824 compare NaN -0 -> NaN
comx825 compare NaN 0 -> NaN
comx826 compare NaN 1 -> NaN
comx827 compare NaN 1000 -> NaN
comx828 compare NaN Inf -> NaN
comx829 compare NaN NaN -> NaN
comx830 compare -Inf NaN -> NaN
comx831 compare -1000 NaN -> NaN
comx832 compare -1 NaN -> NaN
comx833 compare -0 NaN -> NaN
comx834 compare 0 NaN -> NaN
comx835 compare 1 NaN -> NaN
comx836 compare 1000 NaN -> NaN
comx837 compare Inf NaN -> NaN
comx838 compare -NaN -NaN -> -NaN
comx839 compare +NaN -NaN -> NaN
comx840 compare -NaN +NaN -> -NaN
comx841 compare sNaN -Inf -> NaN Invalid_operation
comx842 compare sNaN -1000 -> NaN Invalid_operation
comx843 compare sNaN -1 -> NaN Invalid_operation
comx844 compare sNaN -0 -> NaN Invalid_operation
comx845 compare sNaN 0 -> NaN Invalid_operation
comx846 compare sNaN 1 -> NaN Invalid_operation
comx847 compare sNaN 1000 -> NaN Invalid_operation
comx848 compare sNaN NaN -> NaN Invalid_operation
comx849 compare sNaN sNaN -> NaN Invalid_operation
comx850 compare NaN sNaN -> NaN Invalid_operation
comx851 compare -Inf sNaN -> NaN Invalid_operation
comx852 compare -1000 sNaN -> NaN Invalid_operation
comx853 compare -1 sNaN -> NaN Invalid_operation
comx854 compare -0 sNaN -> NaN Invalid_operation
comx855 compare 0 sNaN -> NaN Invalid_operation
comx856 compare 1 sNaN -> NaN Invalid_operation
comx857 compare 1000 sNaN -> NaN Invalid_operation
comx858 compare Inf sNaN -> NaN Invalid_operation
comx859 compare NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
comx860 compare NaN9 -Inf -> NaN9
comx861 compare NaN8 999 -> NaN8
comx862 compare NaN77 Inf -> NaN77
comx863 compare -NaN67 NaN5 -> -NaN67
comx864 compare -Inf -NaN4 -> -NaN4
comx865 compare -999 -NaN33 -> -NaN33
comx866 compare Inf NaN2 -> NaN2
comx867 compare -NaN41 -NaN42 -> -NaN41
comx868 compare +NaN41 -NaN42 -> NaN41
comx869 compare -NaN41 +NaN42 -> -NaN41
comx870 compare +NaN41 +NaN42 -> NaN41
comx871 compare -sNaN99 -Inf -> -NaN99 Invalid_operation
comx872 compare sNaN98 -11 -> NaN98 Invalid_operation
comx873 compare sNaN97 NaN -> NaN97 Invalid_operation
comx874 compare sNaN16 sNaN94 -> NaN16 Invalid_operation
comx875 compare NaN85 sNaN83 -> NaN83 Invalid_operation
comx876 compare -Inf sNaN92 -> NaN92 Invalid_operation
comx877 compare 088 sNaN81 -> NaN81 Invalid_operation
comx878 compare Inf sNaN90 -> NaN90 Invalid_operation
comx879 compare NaN -sNaN89 -> -NaN89 Invalid_operation
-- overflow and underflow tests .. subnormal results now allowed
maxExponent: 999999999
minexponent: -999999999
comx880 compare +1.23456789012345E-0 9E+999999999 -> -1
comx881 compare 9E+999999999 +1.23456789012345E-0 -> 1
comx882 compare +0.100 9E-999999999 -> 1
comx883 compare 9E-999999999 +0.100 -> -1
comx885 compare -1.23456789012345E-0 9E+999999999 -> -1
comx886 compare 9E+999999999 -1.23456789012345E-0 -> 1
comx887 compare -0.100 9E-999999999 -> -1
comx888 compare 9E-999999999 -0.100 -> 1
comx889 compare 1e-599999999 1e-400000001 -> -1
comx890 compare 1e-599999999 1e-400000000 -> -1
comx891 compare 1e-600000000 1e-400000000 -> -1
comx892 compare 9e-999999998 0.01 -> -1
comx893 compare 9e-999999998 0.1 -> -1
comx894 compare 0.01 9e-999999998 -> 1
comx895 compare 1e599999999 1e400000001 -> 1
comx896 compare 1e599999999 1e400000000 -> 1
comx897 compare 1e600000000 1e400000000 -> 1
comx898 compare 9e999999998 100 -> 1
comx899 compare 9e999999998 10 -> 1
comx900 compare 100 9e999999998 -> -1
-- signs
comx901 compare 1e+777777777 1e+411111111 -> 1
comx902 compare 1e+777777777 -1e+411111111 -> 1
comx903 compare -1e+777777777 1e+411111111 -> -1
comx904 compare -1e+777777777 -1e+411111111 -> -1
comx905 compare 1e-777777777 1e-411111111 -> -1
comx906 compare 1e-777777777 -1e-411111111 -> 1
comx907 compare -1e-777777777 1e-411111111 -> -1
comx908 compare -1e-777777777 -1e-411111111 -> 1
-- spread zeros
comx910 compare 0E-383 0 -> 0
comx911 compare 0E-383 -0 -> 0
comx912 compare -0E-383 0 -> 0
comx913 compare -0E-383 -0 -> 0
comx914 compare 0E-383 0E+384 -> 0
comx915 compare 0E-383 -0E+384 -> 0
comx916 compare -0E-383 0E+384 -> 0
comx917 compare -0E-383 -0E+384 -> 0
comx918 compare 0 0E+384 -> 0
comx919 compare 0 -0E+384 -> 0
comx920 compare -0 0E+384 -> 0
comx921 compare -0 -0E+384 -> 0
comx930 compare 0E+384 0 -> 0
comx931 compare 0E+384 -0 -> 0
comx932 compare -0E+384 0 -> 0
comx933 compare -0E+384 -0 -> 0
comx934 compare 0E+384 0E-383 -> 0
comx935 compare 0E+384 -0E-383 -> 0
comx936 compare -0E+384 0E-383 -> 0
comx937 compare -0E+384 -0E-383 -> 0
comx938 compare 0 0E-383 -> 0
comx939 compare 0 -0E-383 -> 0
comx940 compare -0 0E-383 -> 0
comx941 compare -0 -0E-383 -> 0
-- Null tests
comx990 compare 10 # -> NaN Invalid_operation
comx991 compare # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,798 @@
------------------------------------------------------------------------
-- comparetotal.decTest -- decimal comparison using total ordering --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Note that we cannot assume add/subtract tests cover paths adequately,
-- here, because the code might be quite different (comparison cannot
-- overflow or underflow, so actual subtractions are not necessary).
-- Similarly, comparetotal will have some radically different paths
-- than compare.
extended: 1
precision: 16
rounding: half_up
maxExponent: 384
minExponent: -383
-- sanity checks
cotx001 comparetotal -2 -2 -> 0
cotx002 comparetotal -2 -1 -> -1
cotx003 comparetotal -2 0 -> -1
cotx004 comparetotal -2 1 -> -1
cotx005 comparetotal -2 2 -> -1
cotx006 comparetotal -1 -2 -> 1
cotx007 comparetotal -1 -1 -> 0
cotx008 comparetotal -1 0 -> -1
cotx009 comparetotal -1 1 -> -1
cotx010 comparetotal -1 2 -> -1
cotx011 comparetotal 0 -2 -> 1
cotx012 comparetotal 0 -1 -> 1
cotx013 comparetotal 0 0 -> 0
cotx014 comparetotal 0 1 -> -1
cotx015 comparetotal 0 2 -> -1
cotx016 comparetotal 1 -2 -> 1
cotx017 comparetotal 1 -1 -> 1
cotx018 comparetotal 1 0 -> 1
cotx019 comparetotal 1 1 -> 0
cotx020 comparetotal 1 2 -> -1
cotx021 comparetotal 2 -2 -> 1
cotx022 comparetotal 2 -1 -> 1
cotx023 comparetotal 2 0 -> 1
cotx025 comparetotal 2 1 -> 1
cotx026 comparetotal 2 2 -> 0
cotx031 comparetotal -20 -20 -> 0
cotx032 comparetotal -20 -10 -> -1
cotx033 comparetotal -20 00 -> -1
cotx034 comparetotal -20 10 -> -1
cotx035 comparetotal -20 20 -> -1
cotx036 comparetotal -10 -20 -> 1
cotx037 comparetotal -10 -10 -> 0
cotx038 comparetotal -10 00 -> -1
cotx039 comparetotal -10 10 -> -1
cotx040 comparetotal -10 20 -> -1
cotx041 comparetotal 00 -20 -> 1
cotx042 comparetotal 00 -10 -> 1
cotx043 comparetotal 00 00 -> 0
cotx044 comparetotal 00 10 -> -1
cotx045 comparetotal 00 20 -> -1
cotx046 comparetotal 10 -20 -> 1
cotx047 comparetotal 10 -10 -> 1
cotx048 comparetotal 10 00 -> 1
cotx049 comparetotal 10 10 -> 0
cotx050 comparetotal 10 20 -> -1
cotx051 comparetotal 20 -20 -> 1
cotx052 comparetotal 20 -10 -> 1
cotx053 comparetotal 20 00 -> 1
cotx055 comparetotal 20 10 -> 1
cotx056 comparetotal 20 20 -> 0
cotx061 comparetotal -2.0 -2.0 -> 0
cotx062 comparetotal -2.0 -1.0 -> -1
cotx063 comparetotal -2.0 0.0 -> -1
cotx064 comparetotal -2.0 1.0 -> -1
cotx065 comparetotal -2.0 2.0 -> -1
cotx066 comparetotal -1.0 -2.0 -> 1
cotx067 comparetotal -1.0 -1.0 -> 0
cotx068 comparetotal -1.0 0.0 -> -1
cotx069 comparetotal -1.0 1.0 -> -1
cotx070 comparetotal -1.0 2.0 -> -1
cotx071 comparetotal 0.0 -2.0 -> 1
cotx072 comparetotal 0.0 -1.0 -> 1
cotx073 comparetotal 0.0 0.0 -> 0
cotx074 comparetotal 0.0 1.0 -> -1
cotx075 comparetotal 0.0 2.0 -> -1
cotx076 comparetotal 1.0 -2.0 -> 1
cotx077 comparetotal 1.0 -1.0 -> 1
cotx078 comparetotal 1.0 0.0 -> 1
cotx079 comparetotal 1.0 1.0 -> 0
cotx080 comparetotal 1.0 2.0 -> -1
cotx081 comparetotal 2.0 -2.0 -> 1
cotx082 comparetotal 2.0 -1.0 -> 1
cotx083 comparetotal 2.0 0.0 -> 1
cotx085 comparetotal 2.0 1.0 -> 1
cotx086 comparetotal 2.0 2.0 -> 0
-- now some cases which might overflow if subtract were used
maxexponent: 999999999
minexponent: -999999999
cotx090 comparetotal 9.99999999E+999999999 9.99999999E+999999999 -> 0
cotx091 comparetotal -9.99999999E+999999999 9.99999999E+999999999 -> -1
cotx092 comparetotal 9.99999999E+999999999 -9.99999999E+999999999 -> 1
cotx093 comparetotal -9.99999999E+999999999 -9.99999999E+999999999 -> 0
-- Examples
cotx094 comparetotal 12.73 127.9 -> -1
cotx095 comparetotal -127 12 -> -1
cotx096 comparetotal 12.30 12.3 -> -1
cotx097 comparetotal 12.30 12.30 -> 0
cotx098 comparetotal 12.3 12.300 -> 1
cotx099 comparetotal 12.3 NaN -> -1
-- some differing length/exponent cases
-- in this first group, compare would compare all equal
cotx100 comparetotal 7.0 7.0 -> 0
cotx101 comparetotal 7.0 7 -> -1
cotx102 comparetotal 7 7.0 -> 1
cotx103 comparetotal 7E+0 7.0 -> 1
cotx104 comparetotal 70E-1 7.0 -> 0
cotx105 comparetotal 0.7E+1 7 -> 0
cotx106 comparetotal 70E-1 7 -> -1
cotx107 comparetotal 7.0 7E+0 -> -1
cotx108 comparetotal 7.0 70E-1 -> 0
cotx109 comparetotal 7 0.7E+1 -> 0
cotx110 comparetotal 7 70E-1 -> 1
cotx120 comparetotal 8.0 7.0 -> 1
cotx121 comparetotal 8.0 7 -> 1
cotx122 comparetotal 8 7.0 -> 1
cotx123 comparetotal 8E+0 7.0 -> 1
cotx124 comparetotal 80E-1 7.0 -> 1
cotx125 comparetotal 0.8E+1 7 -> 1
cotx126 comparetotal 80E-1 7 -> 1
cotx127 comparetotal 8.0 7E+0 -> 1
cotx128 comparetotal 8.0 70E-1 -> 1
cotx129 comparetotal 8 0.7E+1 -> 1
cotx130 comparetotal 8 70E-1 -> 1
cotx140 comparetotal 8.0 9.0 -> -1
cotx141 comparetotal 8.0 9 -> -1
cotx142 comparetotal 8 9.0 -> -1
cotx143 comparetotal 8E+0 9.0 -> -1
cotx144 comparetotal 80E-1 9.0 -> -1
cotx145 comparetotal 0.8E+1 9 -> -1
cotx146 comparetotal 80E-1 9 -> -1
cotx147 comparetotal 8.0 9E+0 -> -1
cotx148 comparetotal 8.0 90E-1 -> -1
cotx149 comparetotal 8 0.9E+1 -> -1
cotx150 comparetotal 8 90E-1 -> -1
-- and again, with sign changes -+ ..
cotx200 comparetotal -7.0 7.0 -> -1
cotx201 comparetotal -7.0 7 -> -1
cotx202 comparetotal -7 7.0 -> -1
cotx203 comparetotal -7E+0 7.0 -> -1
cotx204 comparetotal -70E-1 7.0 -> -1
cotx205 comparetotal -0.7E+1 7 -> -1
cotx206 comparetotal -70E-1 7 -> -1
cotx207 comparetotal -7.0 7E+0 -> -1
cotx208 comparetotal -7.0 70E-1 -> -1
cotx209 comparetotal -7 0.7E+1 -> -1
cotx210 comparetotal -7 70E-1 -> -1
cotx220 comparetotal -8.0 7.0 -> -1
cotx221 comparetotal -8.0 7 -> -1
cotx222 comparetotal -8 7.0 -> -1
cotx223 comparetotal -8E+0 7.0 -> -1
cotx224 comparetotal -80E-1 7.0 -> -1
cotx225 comparetotal -0.8E+1 7 -> -1
cotx226 comparetotal -80E-1 7 -> -1
cotx227 comparetotal -8.0 7E+0 -> -1
cotx228 comparetotal -8.0 70E-1 -> -1
cotx229 comparetotal -8 0.7E+1 -> -1
cotx230 comparetotal -8 70E-1 -> -1
cotx240 comparetotal -8.0 9.0 -> -1
cotx241 comparetotal -8.0 9 -> -1
cotx242 comparetotal -8 9.0 -> -1
cotx243 comparetotal -8E+0 9.0 -> -1
cotx244 comparetotal -80E-1 9.0 -> -1
cotx245 comparetotal -0.8E+1 9 -> -1
cotx246 comparetotal -80E-1 9 -> -1
cotx247 comparetotal -8.0 9E+0 -> -1
cotx248 comparetotal -8.0 90E-1 -> -1
cotx249 comparetotal -8 0.9E+1 -> -1
cotx250 comparetotal -8 90E-1 -> -1
-- and again, with sign changes +- ..
cotx300 comparetotal 7.0 -7.0 -> 1
cotx301 comparetotal 7.0 -7 -> 1
cotx302 comparetotal 7 -7.0 -> 1
cotx303 comparetotal 7E+0 -7.0 -> 1
cotx304 comparetotal 70E-1 -7.0 -> 1
cotx305 comparetotal .7E+1 -7 -> 1
cotx306 comparetotal 70E-1 -7 -> 1
cotx307 comparetotal 7.0 -7E+0 -> 1
cotx308 comparetotal 7.0 -70E-1 -> 1
cotx309 comparetotal 7 -.7E+1 -> 1
cotx310 comparetotal 7 -70E-1 -> 1
cotx320 comparetotal 8.0 -7.0 -> 1
cotx321 comparetotal 8.0 -7 -> 1
cotx322 comparetotal 8 -7.0 -> 1
cotx323 comparetotal 8E+0 -7.0 -> 1
cotx324 comparetotal 80E-1 -7.0 -> 1
cotx325 comparetotal .8E+1 -7 -> 1
cotx326 comparetotal 80E-1 -7 -> 1
cotx327 comparetotal 8.0 -7E+0 -> 1
cotx328 comparetotal 8.0 -70E-1 -> 1
cotx329 comparetotal 8 -.7E+1 -> 1
cotx330 comparetotal 8 -70E-1 -> 1
cotx340 comparetotal 8.0 -9.0 -> 1
cotx341 comparetotal 8.0 -9 -> 1
cotx342 comparetotal 8 -9.0 -> 1
cotx343 comparetotal 8E+0 -9.0 -> 1
cotx344 comparetotal 80E-1 -9.0 -> 1
cotx345 comparetotal .8E+1 -9 -> 1
cotx346 comparetotal 80E-1 -9 -> 1
cotx347 comparetotal 8.0 -9E+0 -> 1
cotx348 comparetotal 8.0 -90E-1 -> 1
cotx349 comparetotal 8 -.9E+1 -> 1
cotx350 comparetotal 8 -90E-1 -> 1
-- and again, with sign changes -- ..
cotx400 comparetotal -7.0 -7.0 -> 0
cotx401 comparetotal -7.0 -7 -> 1
cotx402 comparetotal -7 -7.0 -> -1
cotx403 comparetotal -7E+0 -7.0 -> -1
cotx404 comparetotal -70E-1 -7.0 -> 0
cotx405 comparetotal -.7E+1 -7 -> 0
cotx406 comparetotal -70E-1 -7 -> 1
cotx407 comparetotal -7.0 -7E+0 -> 1
cotx408 comparetotal -7.0 -70E-1 -> 0
cotx409 comparetotal -7 -.7E+1 -> 0
cotx410 comparetotal -7 -70E-1 -> -1
cotx420 comparetotal -8.0 -7.0 -> -1
cotx421 comparetotal -8.0 -7 -> -1
cotx422 comparetotal -8 -7.0 -> -1
cotx423 comparetotal -8E+0 -7.0 -> -1
cotx424 comparetotal -80E-1 -7.0 -> -1
cotx425 comparetotal -.8E+1 -7 -> -1
cotx426 comparetotal -80E-1 -7 -> -1
cotx427 comparetotal -8.0 -7E+0 -> -1
cotx428 comparetotal -8.0 -70E-1 -> -1
cotx429 comparetotal -8 -.7E+1 -> -1
cotx430 comparetotal -8 -70E-1 -> -1
cotx440 comparetotal -8.0 -9.0 -> 1
cotx441 comparetotal -8.0 -9 -> 1
cotx442 comparetotal -8 -9.0 -> 1
cotx443 comparetotal -8E+0 -9.0 -> 1
cotx444 comparetotal -80E-1 -9.0 -> 1
cotx445 comparetotal -.8E+1 -9 -> 1
cotx446 comparetotal -80E-1 -9 -> 1
cotx447 comparetotal -8.0 -9E+0 -> 1
cotx448 comparetotal -8.0 -90E-1 -> 1
cotx449 comparetotal -8 -.9E+1 -> 1
cotx450 comparetotal -8 -90E-1 -> 1
-- testcases that subtract to lots of zeros at boundaries [pgr]
precision: 40
cotx470 comparetotal 123.4560000000000000E789 123.456E789 -> -1
cotx471 comparetotal 123.456000000000000E-89 123.456E-89 -> -1
cotx472 comparetotal 123.45600000000000E789 123.456E789 -> -1
cotx473 comparetotal 123.4560000000000E-89 123.456E-89 -> -1
cotx474 comparetotal 123.456000000000E789 123.456E789 -> -1
cotx475 comparetotal 123.45600000000E-89 123.456E-89 -> -1
cotx476 comparetotal 123.4560000000E789 123.456E789 -> -1
cotx477 comparetotal 123.456000000E-89 123.456E-89 -> -1
cotx478 comparetotal 123.45600000E789 123.456E789 -> -1
cotx479 comparetotal 123.4560000E-89 123.456E-89 -> -1
cotx480 comparetotal 123.456000E789 123.456E789 -> -1
cotx481 comparetotal 123.45600E-89 123.456E-89 -> -1
cotx482 comparetotal 123.4560E789 123.456E789 -> -1
cotx483 comparetotal 123.456E-89 123.456E-89 -> 0
cotx484 comparetotal 123.456E-89 123.4560000000000000E-89 -> 1
cotx485 comparetotal 123.456E789 123.456000000000000E789 -> 1
cotx486 comparetotal 123.456E-89 123.45600000000000E-89 -> 1
cotx487 comparetotal 123.456E789 123.4560000000000E789 -> 1
cotx488 comparetotal 123.456E-89 123.456000000000E-89 -> 1
cotx489 comparetotal 123.456E789 123.45600000000E789 -> 1
cotx490 comparetotal 123.456E-89 123.4560000000E-89 -> 1
cotx491 comparetotal 123.456E789 123.456000000E789 -> 1
cotx492 comparetotal 123.456E-89 123.45600000E-89 -> 1
cotx493 comparetotal 123.456E789 123.4560000E789 -> 1
cotx494 comparetotal 123.456E-89 123.456000E-89 -> 1
cotx495 comparetotal 123.456E789 123.45600E789 -> 1
cotx496 comparetotal 123.456E-89 123.4560E-89 -> 1
cotx497 comparetotal 123.456E789 123.456E789 -> 0
-- wide-ranging, around precision; signs equal
precision: 9
cotx500 comparetotal 1 1E-15 -> 1
cotx501 comparetotal 1 1E-14 -> 1
cotx502 comparetotal 1 1E-13 -> 1
cotx503 comparetotal 1 1E-12 -> 1
cotx504 comparetotal 1 1E-11 -> 1
cotx505 comparetotal 1 1E-10 -> 1
cotx506 comparetotal 1 1E-9 -> 1
cotx507 comparetotal 1 1E-8 -> 1
cotx508 comparetotal 1 1E-7 -> 1
cotx509 comparetotal 1 1E-6 -> 1
cotx510 comparetotal 1 1E-5 -> 1
cotx511 comparetotal 1 1E-4 -> 1
cotx512 comparetotal 1 1E-3 -> 1
cotx513 comparetotal 1 1E-2 -> 1
cotx514 comparetotal 1 1E-1 -> 1
cotx515 comparetotal 1 1E-0 -> 0
cotx516 comparetotal 1 1E+1 -> -1
cotx517 comparetotal 1 1E+2 -> -1
cotx518 comparetotal 1 1E+3 -> -1
cotx519 comparetotal 1 1E+4 -> -1
cotx521 comparetotal 1 1E+5 -> -1
cotx522 comparetotal 1 1E+6 -> -1
cotx523 comparetotal 1 1E+7 -> -1
cotx524 comparetotal 1 1E+8 -> -1
cotx525 comparetotal 1 1E+9 -> -1
cotx526 comparetotal 1 1E+10 -> -1
cotx527 comparetotal 1 1E+11 -> -1
cotx528 comparetotal 1 1E+12 -> -1
cotx529 comparetotal 1 1E+13 -> -1
cotx530 comparetotal 1 1E+14 -> -1
cotx531 comparetotal 1 1E+15 -> -1
-- LR swap
cotx540 comparetotal 1E-15 1 -> -1
cotx541 comparetotal 1E-14 1 -> -1
cotx542 comparetotal 1E-13 1 -> -1
cotx543 comparetotal 1E-12 1 -> -1
cotx544 comparetotal 1E-11 1 -> -1
cotx545 comparetotal 1E-10 1 -> -1
cotx546 comparetotal 1E-9 1 -> -1
cotx547 comparetotal 1E-8 1 -> -1
cotx548 comparetotal 1E-7 1 -> -1
cotx549 comparetotal 1E-6 1 -> -1
cotx550 comparetotal 1E-5 1 -> -1
cotx551 comparetotal 1E-4 1 -> -1
cotx552 comparetotal 1E-3 1 -> -1
cotx553 comparetotal 1E-2 1 -> -1
cotx554 comparetotal 1E-1 1 -> -1
cotx555 comparetotal 1E-0 1 -> 0
cotx556 comparetotal 1E+1 1 -> 1
cotx557 comparetotal 1E+2 1 -> 1
cotx558 comparetotal 1E+3 1 -> 1
cotx559 comparetotal 1E+4 1 -> 1
cotx561 comparetotal 1E+5 1 -> 1
cotx562 comparetotal 1E+6 1 -> 1
cotx563 comparetotal 1E+7 1 -> 1
cotx564 comparetotal 1E+8 1 -> 1
cotx565 comparetotal 1E+9 1 -> 1
cotx566 comparetotal 1E+10 1 -> 1
cotx567 comparetotal 1E+11 1 -> 1
cotx568 comparetotal 1E+12 1 -> 1
cotx569 comparetotal 1E+13 1 -> 1
cotx570 comparetotal 1E+14 1 -> 1
cotx571 comparetotal 1E+15 1 -> 1
-- similar with an useful coefficient, one side only
cotx580 comparetotal 0.000000987654321 1E-15 -> 1
cotx581 comparetotal 0.000000987654321 1E-14 -> 1
cotx582 comparetotal 0.000000987654321 1E-13 -> 1
cotx583 comparetotal 0.000000987654321 1E-12 -> 1
cotx584 comparetotal 0.000000987654321 1E-11 -> 1
cotx585 comparetotal 0.000000987654321 1E-10 -> 1
cotx586 comparetotal 0.000000987654321 1E-9 -> 1
cotx587 comparetotal 0.000000987654321 1E-8 -> 1
cotx588 comparetotal 0.000000987654321 1E-7 -> 1
cotx589 comparetotal 0.000000987654321 1E-6 -> -1
cotx590 comparetotal 0.000000987654321 1E-5 -> -1
cotx591 comparetotal 0.000000987654321 1E-4 -> -1
cotx592 comparetotal 0.000000987654321 1E-3 -> -1
cotx593 comparetotal 0.000000987654321 1E-2 -> -1
cotx594 comparetotal 0.000000987654321 1E-1 -> -1
cotx595 comparetotal 0.000000987654321 1E-0 -> -1
cotx596 comparetotal 0.000000987654321 1E+1 -> -1
cotx597 comparetotal 0.000000987654321 1E+2 -> -1
cotx598 comparetotal 0.000000987654321 1E+3 -> -1
cotx599 comparetotal 0.000000987654321 1E+4 -> -1
-- check some unit-y traps
precision: 20
cotx600 comparetotal 12 12.2345 -> -1
cotx601 comparetotal 12.0 12.2345 -> -1
cotx602 comparetotal 12.00 12.2345 -> -1
cotx603 comparetotal 12.000 12.2345 -> -1
cotx604 comparetotal 12.0000 12.2345 -> -1
cotx605 comparetotal 12.00000 12.2345 -> -1
cotx606 comparetotal 12.000000 12.2345 -> -1
cotx607 comparetotal 12.0000000 12.2345 -> -1
cotx608 comparetotal 12.00000000 12.2345 -> -1
cotx609 comparetotal 12.000000000 12.2345 -> -1
cotx610 comparetotal 12.1234 12 -> 1
cotx611 comparetotal 12.1234 12.0 -> 1
cotx612 comparetotal 12.1234 12.00 -> 1
cotx613 comparetotal 12.1234 12.000 -> 1
cotx614 comparetotal 12.1234 12.0000 -> 1
cotx615 comparetotal 12.1234 12.00000 -> 1
cotx616 comparetotal 12.1234 12.000000 -> 1
cotx617 comparetotal 12.1234 12.0000000 -> 1
cotx618 comparetotal 12.1234 12.00000000 -> 1
cotx619 comparetotal 12.1234 12.000000000 -> 1
cotx620 comparetotal -12 -12.2345 -> 1
cotx621 comparetotal -12.0 -12.2345 -> 1
cotx622 comparetotal -12.00 -12.2345 -> 1
cotx623 comparetotal -12.000 -12.2345 -> 1
cotx624 comparetotal -12.0000 -12.2345 -> 1
cotx625 comparetotal -12.00000 -12.2345 -> 1
cotx626 comparetotal -12.000000 -12.2345 -> 1
cotx627 comparetotal -12.0000000 -12.2345 -> 1
cotx628 comparetotal -12.00000000 -12.2345 -> 1
cotx629 comparetotal -12.000000000 -12.2345 -> 1
cotx630 comparetotal -12.1234 -12 -> -1
cotx631 comparetotal -12.1234 -12.0 -> -1
cotx632 comparetotal -12.1234 -12.00 -> -1
cotx633 comparetotal -12.1234 -12.000 -> -1
cotx634 comparetotal -12.1234 -12.0000 -> -1
cotx635 comparetotal -12.1234 -12.00000 -> -1
cotx636 comparetotal -12.1234 -12.000000 -> -1
cotx637 comparetotal -12.1234 -12.0000000 -> -1
cotx638 comparetotal -12.1234 -12.00000000 -> -1
cotx639 comparetotal -12.1234 -12.000000000 -> -1
precision: 9
-- extended zeros
cotx640 comparetotal 0 0 -> 0
cotx641 comparetotal 0 -0 -> 1
cotx642 comparetotal 0 -0.0 -> 1
cotx643 comparetotal 0 0.0 -> 1
cotx644 comparetotal -0 0 -> -1
cotx645 comparetotal -0 -0 -> 0
cotx646 comparetotal -0 -0.0 -> -1
cotx647 comparetotal -0 0.0 -> -1
cotx648 comparetotal 0.0 0 -> -1
cotx649 comparetotal 0.0 -0 -> 1
cotx650 comparetotal 0.0 -0.0 -> 1
cotx651 comparetotal 0.0 0.0 -> 0
cotx652 comparetotal -0.0 0 -> -1
cotx653 comparetotal -0.0 -0 -> 1
cotx654 comparetotal -0.0 -0.0 -> 0
cotx655 comparetotal -0.0 0.0 -> -1
cotx656 comparetotal -0E1 0.0 -> -1
cotx657 comparetotal -0E2 0.0 -> -1
cotx658 comparetotal 0E1 0.0 -> 1
cotx659 comparetotal 0E2 0.0 -> 1
cotx660 comparetotal -0E1 0 -> -1
cotx661 comparetotal -0E2 0 -> -1
cotx662 comparetotal 0E1 0 -> 1
cotx663 comparetotal 0E2 0 -> 1
cotx664 comparetotal -0E1 -0E1 -> 0
cotx665 comparetotal -0E2 -0E1 -> -1
cotx666 comparetotal 0E1 -0E1 -> 1
cotx667 comparetotal 0E2 -0E1 -> 1
cotx668 comparetotal -0E1 -0E2 -> 1
cotx669 comparetotal -0E2 -0E2 -> 0
cotx670 comparetotal 0E1 -0E2 -> 1
cotx671 comparetotal 0E2 -0E2 -> 1
cotx672 comparetotal -0E1 0E1 -> -1
cotx673 comparetotal -0E2 0E1 -> -1
cotx674 comparetotal 0E1 0E1 -> 0
cotx675 comparetotal 0E2 0E1 -> 1
cotx676 comparetotal -0E1 0E2 -> -1
cotx677 comparetotal -0E2 0E2 -> -1
cotx678 comparetotal 0E1 0E2 -> -1
cotx679 comparetotal 0E2 0E2 -> 0
-- trailing zeros; unit-y
precision: 20
cotx680 comparetotal 12 12 -> 0
cotx681 comparetotal 12 12.0 -> 1
cotx682 comparetotal 12 12.00 -> 1
cotx683 comparetotal 12 12.000 -> 1
cotx684 comparetotal 12 12.0000 -> 1
cotx685 comparetotal 12 12.00000 -> 1
cotx686 comparetotal 12 12.000000 -> 1
cotx687 comparetotal 12 12.0000000 -> 1
cotx688 comparetotal 12 12.00000000 -> 1
cotx689 comparetotal 12 12.000000000 -> 1
cotx690 comparetotal 12 12 -> 0
cotx691 comparetotal 12.0 12 -> -1
cotx692 comparetotal 12.00 12 -> -1
cotx693 comparetotal 12.000 12 -> -1
cotx694 comparetotal 12.0000 12 -> -1
cotx695 comparetotal 12.00000 12 -> -1
cotx696 comparetotal 12.000000 12 -> -1
cotx697 comparetotal 12.0000000 12 -> -1
cotx698 comparetotal 12.00000000 12 -> -1
cotx699 comparetotal 12.000000000 12 -> -1
-- long operand checks
maxexponent: 999
minexponent: -999
precision: 9
cotx701 comparetotal 12345678000 1 -> 1
cotx702 comparetotal 1 12345678000 -> -1
cotx703 comparetotal 1234567800 1 -> 1
cotx704 comparetotal 1 1234567800 -> -1
cotx705 comparetotal 1234567890 1 -> 1
cotx706 comparetotal 1 1234567890 -> -1
cotx707 comparetotal 1234567891 1 -> 1
cotx708 comparetotal 1 1234567891 -> -1
cotx709 comparetotal 12345678901 1 -> 1
cotx710 comparetotal 1 12345678901 -> -1
cotx711 comparetotal 1234567896 1 -> 1
cotx712 comparetotal 1 1234567896 -> -1
cotx713 comparetotal -1234567891 1 -> -1
cotx714 comparetotal 1 -1234567891 -> 1
cotx715 comparetotal -12345678901 1 -> -1
cotx716 comparetotal 1 -12345678901 -> 1
cotx717 comparetotal -1234567896 1 -> -1
cotx718 comparetotal 1 -1234567896 -> 1
precision: 15
-- same with plenty of precision
cotx721 comparetotal 12345678000 1 -> 1
cotx722 comparetotal 1 12345678000 -> -1
cotx723 comparetotal 1234567800 1 -> 1
cotx724 comparetotal 1 1234567800 -> -1
cotx725 comparetotal 1234567890 1 -> 1
cotx726 comparetotal 1 1234567890 -> -1
cotx727 comparetotal 1234567891 1 -> 1
cotx728 comparetotal 1 1234567891 -> -1
cotx729 comparetotal 12345678901 1 -> 1
cotx730 comparetotal 1 12345678901 -> -1
cotx731 comparetotal 1234567896 1 -> 1
cotx732 comparetotal 1 1234567896 -> -1
-- residue cases
precision: 5
cotx740 comparetotal 1 0.9999999 -> 1
cotx741 comparetotal 1 0.999999 -> 1
cotx742 comparetotal 1 0.99999 -> 1
cotx743 comparetotal 1 1.0000 -> 1
cotx744 comparetotal 1 1.00001 -> -1
cotx745 comparetotal 1 1.000001 -> -1
cotx746 comparetotal 1 1.0000001 -> -1
cotx750 comparetotal 0.9999999 1 -> -1
cotx751 comparetotal 0.999999 1 -> -1
cotx752 comparetotal 0.99999 1 -> -1
cotx753 comparetotal 1.0000 1 -> -1
cotx754 comparetotal 1.00001 1 -> 1
cotx755 comparetotal 1.000001 1 -> 1
cotx756 comparetotal 1.0000001 1 -> 1
-- a selection of longies
cotx760 comparetotal -36852134.84194296250843579428931 -5830629.8347085025808756560357940 -> -1
cotx761 comparetotal -36852134.84194296250843579428931 -36852134.84194296250843579428931 -> 0
cotx762 comparetotal -36852134.94194296250843579428931 -36852134.84194296250843579428931 -> -1
cotx763 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
-- precisions above or below the difference should have no effect
precision: 11
cotx764 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 10
cotx765 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 9
cotx766 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 8
cotx767 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 7
cotx768 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 6
cotx769 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 5
cotx770 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 4
cotx771 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 3
cotx772 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 2
cotx773 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 1
cotx774 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
-- Specials
precision: 9
cotx780 comparetotal Inf -Inf -> 1
cotx781 comparetotal Inf -1000 -> 1
cotx782 comparetotal Inf -1 -> 1
cotx783 comparetotal Inf -0 -> 1
cotx784 comparetotal Inf 0 -> 1
cotx785 comparetotal Inf 1 -> 1
cotx786 comparetotal Inf 1000 -> 1
cotx787 comparetotal Inf Inf -> 0
cotx788 comparetotal -1000 Inf -> -1
cotx789 comparetotal -Inf Inf -> -1
cotx790 comparetotal -1 Inf -> -1
cotx791 comparetotal -0 Inf -> -1
cotx792 comparetotal 0 Inf -> -1
cotx793 comparetotal 1 Inf -> -1
cotx794 comparetotal 1000 Inf -> -1
cotx795 comparetotal Inf Inf -> 0
cotx800 comparetotal -Inf -Inf -> 0
cotx801 comparetotal -Inf -1000 -> -1
cotx802 comparetotal -Inf -1 -> -1
cotx803 comparetotal -Inf -0 -> -1
cotx804 comparetotal -Inf 0 -> -1
cotx805 comparetotal -Inf 1 -> -1
cotx806 comparetotal -Inf 1000 -> -1
cotx807 comparetotal -Inf Inf -> -1
cotx808 comparetotal -Inf -Inf -> 0
cotx809 comparetotal -1000 -Inf -> 1
cotx810 comparetotal -1 -Inf -> 1
cotx811 comparetotal -0 -Inf -> 1
cotx812 comparetotal 0 -Inf -> 1
cotx813 comparetotal 1 -Inf -> 1
cotx814 comparetotal 1000 -Inf -> 1
cotx815 comparetotal Inf -Inf -> 1
cotx821 comparetotal NaN -Inf -> 1
cotx822 comparetotal NaN -1000 -> 1
cotx823 comparetotal NaN -1 -> 1
cotx824 comparetotal NaN -0 -> 1
cotx825 comparetotal NaN 0 -> 1
cotx826 comparetotal NaN 1 -> 1
cotx827 comparetotal NaN 1000 -> 1
cotx828 comparetotal NaN Inf -> 1
cotx829 comparetotal NaN NaN -> 0
cotx830 comparetotal -Inf NaN -> -1
cotx831 comparetotal -1000 NaN -> -1
cotx832 comparetotal -1 NaN -> -1
cotx833 comparetotal -0 NaN -> -1
cotx834 comparetotal 0 NaN -> -1
cotx835 comparetotal 1 NaN -> -1
cotx836 comparetotal 1000 NaN -> -1
cotx837 comparetotal Inf NaN -> -1
cotx838 comparetotal -NaN -NaN -> 0
cotx839 comparetotal +NaN -NaN -> 1
cotx840 comparetotal -NaN +NaN -> -1
cotx841 comparetotal sNaN -sNaN -> 1
cotx842 comparetotal sNaN -NaN -> 1
cotx843 comparetotal sNaN -Inf -> 1
cotx844 comparetotal sNaN -1000 -> 1
cotx845 comparetotal sNaN -1 -> 1
cotx846 comparetotal sNaN -0 -> 1
cotx847 comparetotal sNaN 0 -> 1
cotx848 comparetotal sNaN 1 -> 1
cotx849 comparetotal sNaN 1000 -> 1
cotx850 comparetotal sNaN NaN -> -1
cotx851 comparetotal sNaN sNaN -> 0
cotx852 comparetotal -sNaN sNaN -> -1
cotx853 comparetotal -NaN sNaN -> -1
cotx854 comparetotal -Inf sNaN -> -1
cotx855 comparetotal -1000 sNaN -> -1
cotx856 comparetotal -1 sNaN -> -1
cotx857 comparetotal -0 sNaN -> -1
cotx858 comparetotal 0 sNaN -> -1
cotx859 comparetotal 1 sNaN -> -1
cotx860 comparetotal 1000 sNaN -> -1
cotx861 comparetotal Inf sNaN -> -1
cotx862 comparetotal NaN sNaN -> 1
cotx863 comparetotal sNaN sNaN -> 0
cotx871 comparetotal -sNaN -sNaN -> 0
cotx872 comparetotal -sNaN -NaN -> 1
cotx873 comparetotal -sNaN -Inf -> -1
cotx874 comparetotal -sNaN -1000 -> -1
cotx875 comparetotal -sNaN -1 -> -1
cotx876 comparetotal -sNaN -0 -> -1
cotx877 comparetotal -sNaN 0 -> -1
cotx878 comparetotal -sNaN 1 -> -1
cotx879 comparetotal -sNaN 1000 -> -1
cotx880 comparetotal -sNaN NaN -> -1
cotx881 comparetotal -sNaN sNaN -> -1
cotx882 comparetotal -sNaN -sNaN -> 0
cotx883 comparetotal -NaN -sNaN -> -1
cotx884 comparetotal -Inf -sNaN -> 1
cotx885 comparetotal -1000 -sNaN -> 1
cotx886 comparetotal -1 -sNaN -> 1
cotx887 comparetotal -0 -sNaN -> 1
cotx888 comparetotal 0 -sNaN -> 1
cotx889 comparetotal 1 -sNaN -> 1
cotx890 comparetotal 1000 -sNaN -> 1
cotx891 comparetotal Inf -sNaN -> 1
cotx892 comparetotal NaN -sNaN -> 1
cotx893 comparetotal sNaN -sNaN -> 1
-- NaNs with payload
cotx960 comparetotal NaN9 -Inf -> 1
cotx961 comparetotal NaN8 999 -> 1
cotx962 comparetotal NaN77 Inf -> 1
cotx963 comparetotal -NaN67 NaN5 -> -1
cotx964 comparetotal -Inf -NaN4 -> 1
cotx965 comparetotal -999 -NaN33 -> 1
cotx966 comparetotal Inf NaN2 -> -1
cotx970 comparetotal -NaN41 -NaN42 -> 1
cotx971 comparetotal +NaN41 -NaN42 -> 1
cotx972 comparetotal -NaN41 +NaN42 -> -1
cotx973 comparetotal +NaN41 +NaN42 -> -1
cotx974 comparetotal -NaN42 -NaN01 -> -1
cotx975 comparetotal +NaN42 -NaN01 -> 1
cotx976 comparetotal -NaN42 +NaN01 -> -1
cotx977 comparetotal +NaN42 +NaN01 -> 1
cotx980 comparetotal -sNaN771 -sNaN772 -> 1
cotx981 comparetotal +sNaN771 -sNaN772 -> 1
cotx982 comparetotal -sNaN771 +sNaN772 -> -1
cotx983 comparetotal +sNaN771 +sNaN772 -> -1
cotx984 comparetotal -sNaN772 -sNaN771 -> -1
cotx985 comparetotal +sNaN772 -sNaN771 -> 1
cotx986 comparetotal -sNaN772 +sNaN771 -> -1
cotx987 comparetotal +sNaN772 +sNaN771 -> 1
cotx991 comparetotal -sNaN99 -Inf -> -1
cotx992 comparetotal sNaN98 -11 -> 1
cotx993 comparetotal sNaN97 NaN -> -1
cotx994 comparetotal sNaN16 sNaN94 -> -1
cotx995 comparetotal NaN85 sNaN83 -> 1
cotx996 comparetotal -Inf sNaN92 -> -1
cotx997 comparetotal 088 sNaN81 -> -1
cotx998 comparetotal Inf sNaN90 -> -1
cotx999 comparetotal NaN -sNaN89 -> 1
-- overflow and underflow tests .. subnormal results now allowed
maxExponent: 999999999
minexponent: -999999999
cotx1080 comparetotal +1.23456789012345E-0 9E+999999999 -> -1
cotx1081 comparetotal 9E+999999999 +1.23456789012345E-0 -> 1
cotx1082 comparetotal +0.100 9E-999999999 -> 1
cotx1083 comparetotal 9E-999999999 +0.100 -> -1
cotx1085 comparetotal -1.23456789012345E-0 9E+999999999 -> -1
cotx1086 comparetotal 9E+999999999 -1.23456789012345E-0 -> 1
cotx1087 comparetotal -0.100 9E-999999999 -> -1
cotx1088 comparetotal 9E-999999999 -0.100 -> 1
cotx1089 comparetotal 1e-599999999 1e-400000001 -> -1
cotx1090 comparetotal 1e-599999999 1e-400000000 -> -1
cotx1091 comparetotal 1e-600000000 1e-400000000 -> -1
cotx1092 comparetotal 9e-999999998 0.01 -> -1
cotx1093 comparetotal 9e-999999998 0.1 -> -1
cotx1094 comparetotal 0.01 9e-999999998 -> 1
cotx1095 comparetotal 1e599999999 1e400000001 -> 1
cotx1096 comparetotal 1e599999999 1e400000000 -> 1
cotx1097 comparetotal 1e600000000 1e400000000 -> 1
cotx1098 comparetotal 9e999999998 100 -> 1
cotx1099 comparetotal 9e999999998 10 -> 1
cotx1100 comparetotal 100 9e999999998 -> -1
-- signs
cotx1101 comparetotal 1e+777777777 1e+411111111 -> 1
cotx1102 comparetotal 1e+777777777 -1e+411111111 -> 1
cotx1103 comparetotal -1e+777777777 1e+411111111 -> -1
cotx1104 comparetotal -1e+777777777 -1e+411111111 -> -1
cotx1105 comparetotal 1e-777777777 1e-411111111 -> -1
cotx1106 comparetotal 1e-777777777 -1e-411111111 -> 1
cotx1107 comparetotal -1e-777777777 1e-411111111 -> -1
cotx1108 comparetotal -1e-777777777 -1e-411111111 -> 1
-- spread zeros
cotx1110 comparetotal 0E-383 0 -> -1
cotx1111 comparetotal 0E-383 -0 -> 1
cotx1112 comparetotal -0E-383 0 -> -1
cotx1113 comparetotal -0E-383 -0 -> 1
cotx1114 comparetotal 0E-383 0E+384 -> -1
cotx1115 comparetotal 0E-383 -0E+384 -> 1
cotx1116 comparetotal -0E-383 0E+384 -> -1
cotx1117 comparetotal -0E-383 -0E+384 -> 1
cotx1118 comparetotal 0 0E+384 -> -1
cotx1119 comparetotal 0 -0E+384 -> 1
cotx1120 comparetotal -0 0E+384 -> -1
cotx1121 comparetotal -0 -0E+384 -> 1
cotx1130 comparetotal 0E+384 0 -> 1
cotx1131 comparetotal 0E+384 -0 -> 1
cotx1132 comparetotal -0E+384 0 -> -1
cotx1133 comparetotal -0E+384 -0 -> -1
cotx1134 comparetotal 0E+384 0E-383 -> 1
cotx1135 comparetotal 0E+384 -0E-383 -> 1
cotx1136 comparetotal -0E+384 0E-383 -> -1
cotx1137 comparetotal -0E+384 -0E-383 -> -1
cotx1138 comparetotal 0 0E-383 -> 1
cotx1139 comparetotal 0 -0E-383 -> 1
cotx1140 comparetotal -0 0E-383 -> -1
cotx1141 comparetotal -0 -0E-383 -> -1
-- Null tests
cotx9990 comparetotal 10 # -> NaN Invalid_operation
cotx9991 comparetotal # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,790 @@
------------------------------------------------------------------------
-- comparetotmag.decTest -- decimal comparison, abs. total ordering --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Note that it cannot be assumed that add/subtract tests cover paths
-- for this operation adequately, here, because the code might be
-- quite different (comparison cannot overflow or underflow, so
-- actual subtractions are not necessary). Similarly, comparetotal
-- will have some radically different paths than compare.
extended: 1
precision: 16
rounding: half_up
maxExponent: 384
minExponent: -383
-- sanity checks
ctmx001 comparetotmag -2 -2 -> 0
ctmx002 comparetotmag -2 -1 -> 1
ctmx003 comparetotmag -2 0 -> 1
ctmx004 comparetotmag -2 1 -> 1
ctmx005 comparetotmag -2 2 -> 0
ctmx006 comparetotmag -1 -2 -> -1
ctmx007 comparetotmag -1 -1 -> 0
ctmx008 comparetotmag -1 0 -> 1
ctmx009 comparetotmag -1 1 -> 0
ctmx010 comparetotmag -1 2 -> -1
ctmx011 comparetotmag 0 -2 -> -1
ctmx012 comparetotmag 0 -1 -> -1
ctmx013 comparetotmag 0 0 -> 0
ctmx014 comparetotmag 0 1 -> -1
ctmx015 comparetotmag 0 2 -> -1
ctmx016 comparetotmag 1 -2 -> -1
ctmx017 comparetotmag 1 -1 -> 0
ctmx018 comparetotmag 1 0 -> 1
ctmx019 comparetotmag 1 1 -> 0
ctmx020 comparetotmag 1 2 -> -1
ctmx021 comparetotmag 2 -2 -> 0
ctmx022 comparetotmag 2 -1 -> 1
ctmx023 comparetotmag 2 0 -> 1
ctmx025 comparetotmag 2 1 -> 1
ctmx026 comparetotmag 2 2 -> 0
ctmx031 comparetotmag -20 -20 -> 0
ctmx032 comparetotmag -20 -10 -> 1
ctmx033 comparetotmag -20 00 -> 1
ctmx034 comparetotmag -20 10 -> 1
ctmx035 comparetotmag -20 20 -> 0
ctmx036 comparetotmag -10 -20 -> -1
ctmx037 comparetotmag -10 -10 -> 0
ctmx038 comparetotmag -10 00 -> 1
ctmx039 comparetotmag -10 10 -> 0
ctmx040 comparetotmag -10 20 -> -1
ctmx041 comparetotmag 00 -20 -> -1
ctmx042 comparetotmag 00 -10 -> -1
ctmx043 comparetotmag 00 00 -> 0
ctmx044 comparetotmag 00 10 -> -1
ctmx045 comparetotmag 00 20 -> -1
ctmx046 comparetotmag 10 -20 -> -1
ctmx047 comparetotmag 10 -10 -> 0
ctmx048 comparetotmag 10 00 -> 1
ctmx049 comparetotmag 10 10 -> 0
ctmx050 comparetotmag 10 20 -> -1
ctmx051 comparetotmag 20 -20 -> 0
ctmx052 comparetotmag 20 -10 -> 1
ctmx053 comparetotmag 20 00 -> 1
ctmx055 comparetotmag 20 10 -> 1
ctmx056 comparetotmag 20 20 -> 0
ctmx061 comparetotmag -2.0 -2.0 -> 0
ctmx062 comparetotmag -2.0 -1.0 -> 1
ctmx063 comparetotmag -2.0 0.0 -> 1
ctmx064 comparetotmag -2.0 1.0 -> 1
ctmx065 comparetotmag -2.0 2.0 -> 0
ctmx066 comparetotmag -1.0 -2.0 -> -1
ctmx067 comparetotmag -1.0 -1.0 -> 0
ctmx068 comparetotmag -1.0 0.0 -> 1
ctmx069 comparetotmag -1.0 1.0 -> 0
ctmx070 comparetotmag -1.0 2.0 -> -1
ctmx071 comparetotmag 0.0 -2.0 -> -1
ctmx072 comparetotmag 0.0 -1.0 -> -1
ctmx073 comparetotmag 0.0 0.0 -> 0
ctmx074 comparetotmag 0.0 1.0 -> -1
ctmx075 comparetotmag 0.0 2.0 -> -1
ctmx076 comparetotmag 1.0 -2.0 -> -1
ctmx077 comparetotmag 1.0 -1.0 -> 0
ctmx078 comparetotmag 1.0 0.0 -> 1
ctmx079 comparetotmag 1.0 1.0 -> 0
ctmx080 comparetotmag 1.0 2.0 -> -1
ctmx081 comparetotmag 2.0 -2.0 -> 0
ctmx082 comparetotmag 2.0 -1.0 -> 1
ctmx083 comparetotmag 2.0 0.0 -> 1
ctmx085 comparetotmag 2.0 1.0 -> 1
ctmx086 comparetotmag 2.0 2.0 -> 0
-- now some cases which might overflow if subtract were used
maxexponent: 999999999
minexponent: -999999999
ctmx090 comparetotmag 9.99999999E+999999999 9.99999999E+999999999 -> 0
ctmx091 comparetotmag -9.99999999E+999999999 9.99999999E+999999999 -> 0
ctmx092 comparetotmag 9.99999999E+999999999 -9.99999999E+999999999 -> 0
ctmx093 comparetotmag -9.99999999E+999999999 -9.99999999E+999999999 -> 0
-- some differing length/exponent cases
-- in this first group, compare would compare all equal
ctmx100 comparetotmag 7.0 7.0 -> 0
ctmx101 comparetotmag 7.0 7 -> -1
ctmx102 comparetotmag 7 7.0 -> 1
ctmx103 comparetotmag 7E+0 7.0 -> 1
ctmx104 comparetotmag 70E-1 7.0 -> 0
ctmx105 comparetotmag 0.7E+1 7 -> 0
ctmx106 comparetotmag 70E-1 7 -> -1
ctmx107 comparetotmag 7.0 7E+0 -> -1
ctmx108 comparetotmag 7.0 70E-1 -> 0
ctmx109 comparetotmag 7 0.7E+1 -> 0
ctmx110 comparetotmag 7 70E-1 -> 1
ctmx120 comparetotmag 8.0 7.0 -> 1
ctmx121 comparetotmag 8.0 7 -> 1
ctmx122 comparetotmag 8 7.0 -> 1
ctmx123 comparetotmag 8E+0 7.0 -> 1
ctmx124 comparetotmag 80E-1 7.0 -> 1
ctmx125 comparetotmag 0.8E+1 7 -> 1
ctmx126 comparetotmag 80E-1 7 -> 1
ctmx127 comparetotmag 8.0 7E+0 -> 1
ctmx128 comparetotmag 8.0 70E-1 -> 1
ctmx129 comparetotmag 8 0.7E+1 -> 1
ctmx130 comparetotmag 8 70E-1 -> 1
ctmx140 comparetotmag 8.0 9.0 -> -1
ctmx141 comparetotmag 8.0 9 -> -1
ctmx142 comparetotmag 8 9.0 -> -1
ctmx143 comparetotmag 8E+0 9.0 -> -1
ctmx144 comparetotmag 80E-1 9.0 -> -1
ctmx145 comparetotmag 0.8E+1 9 -> -1
ctmx146 comparetotmag 80E-1 9 -> -1
ctmx147 comparetotmag 8.0 9E+0 -> -1
ctmx148 comparetotmag 8.0 90E-1 -> -1
ctmx149 comparetotmag 8 0.9E+1 -> -1
ctmx150 comparetotmag 8 90E-1 -> -1
-- and again, with sign changes -+ ..
ctmx200 comparetotmag -7.0 7.0 -> 0
ctmx201 comparetotmag -7.0 7 -> -1
ctmx202 comparetotmag -7 7.0 -> 1
ctmx203 comparetotmag -7E+0 7.0 -> 1
ctmx204 comparetotmag -70E-1 7.0 -> 0
ctmx205 comparetotmag -0.7E+1 7 -> 0
ctmx206 comparetotmag -70E-1 7 -> -1
ctmx207 comparetotmag -7.0 7E+0 -> -1
ctmx208 comparetotmag -7.0 70E-1 -> 0
ctmx209 comparetotmag -7 0.7E+1 -> 0
ctmx210 comparetotmag -7 70E-1 -> 1
ctmx220 comparetotmag -8.0 7.0 -> 1
ctmx221 comparetotmag -8.0 7 -> 1
ctmx222 comparetotmag -8 7.0 -> 1
ctmx223 comparetotmag -8E+0 7.0 -> 1
ctmx224 comparetotmag -80E-1 7.0 -> 1
ctmx225 comparetotmag -0.8E+1 7 -> 1
ctmx226 comparetotmag -80E-1 7 -> 1
ctmx227 comparetotmag -8.0 7E+0 -> 1
ctmx228 comparetotmag -8.0 70E-1 -> 1
ctmx229 comparetotmag -8 0.7E+1 -> 1
ctmx230 comparetotmag -8 70E-1 -> 1
ctmx240 comparetotmag -8.0 9.0 -> -1
ctmx241 comparetotmag -8.0 9 -> -1
ctmx242 comparetotmag -8 9.0 -> -1
ctmx243 comparetotmag -8E+0 9.0 -> -1
ctmx244 comparetotmag -80E-1 9.0 -> -1
ctmx245 comparetotmag -0.8E+1 9 -> -1
ctmx246 comparetotmag -80E-1 9 -> -1
ctmx247 comparetotmag -8.0 9E+0 -> -1
ctmx248 comparetotmag -8.0 90E-1 -> -1
ctmx249 comparetotmag -8 0.9E+1 -> -1
ctmx250 comparetotmag -8 90E-1 -> -1
-- and again, with sign changes +- ..
ctmx300 comparetotmag 7.0 -7.0 -> 0
ctmx301 comparetotmag 7.0 -7 -> -1
ctmx302 comparetotmag 7 -7.0 -> 1
ctmx303 comparetotmag 7E+0 -7.0 -> 1
ctmx304 comparetotmag 70E-1 -7.0 -> 0
ctmx305 comparetotmag .7E+1 -7 -> 0
ctmx306 comparetotmag 70E-1 -7 -> -1
ctmx307 comparetotmag 7.0 -7E+0 -> -1
ctmx308 comparetotmag 7.0 -70E-1 -> 0
ctmx309 comparetotmag 7 -.7E+1 -> 0
ctmx310 comparetotmag 7 -70E-1 -> 1
ctmx320 comparetotmag 8.0 -7.0 -> 1
ctmx321 comparetotmag 8.0 -7 -> 1
ctmx322 comparetotmag 8 -7.0 -> 1
ctmx323 comparetotmag 8E+0 -7.0 -> 1
ctmx324 comparetotmag 80E-1 -7.0 -> 1
ctmx325 comparetotmag .8E+1 -7 -> 1
ctmx326 comparetotmag 80E-1 -7 -> 1
ctmx327 comparetotmag 8.0 -7E+0 -> 1
ctmx328 comparetotmag 8.0 -70E-1 -> 1
ctmx329 comparetotmag 8 -.7E+1 -> 1
ctmx330 comparetotmag 8 -70E-1 -> 1
ctmx340 comparetotmag 8.0 -9.0 -> -1
ctmx341 comparetotmag 8.0 -9 -> -1
ctmx342 comparetotmag 8 -9.0 -> -1
ctmx343 comparetotmag 8E+0 -9.0 -> -1
ctmx344 comparetotmag 80E-1 -9.0 -> -1
ctmx345 comparetotmag .8E+1 -9 -> -1
ctmx346 comparetotmag 80E-1 -9 -> -1
ctmx347 comparetotmag 8.0 -9E+0 -> -1
ctmx348 comparetotmag 8.0 -90E-1 -> -1
ctmx349 comparetotmag 8 -.9E+1 -> -1
ctmx350 comparetotmag 8 -90E-1 -> -1
-- and again, with sign changes -- ..
ctmx400 comparetotmag -7.0 -7.0 -> 0
ctmx401 comparetotmag -7.0 -7 -> -1
ctmx402 comparetotmag -7 -7.0 -> 1
ctmx403 comparetotmag -7E+0 -7.0 -> 1
ctmx404 comparetotmag -70E-1 -7.0 -> 0
ctmx405 comparetotmag -.7E+1 -7 -> 0
ctmx406 comparetotmag -70E-1 -7 -> -1
ctmx407 comparetotmag -7.0 -7E+0 -> -1
ctmx408 comparetotmag -7.0 -70E-1 -> 0
ctmx409 comparetotmag -7 -.7E+1 -> 0
ctmx410 comparetotmag -7 -70E-1 -> 1
ctmx420 comparetotmag -8.0 -7.0 -> 1
ctmx421 comparetotmag -8.0 -7 -> 1
ctmx422 comparetotmag -8 -7.0 -> 1
ctmx423 comparetotmag -8E+0 -7.0 -> 1
ctmx424 comparetotmag -80E-1 -7.0 -> 1
ctmx425 comparetotmag -.8E+1 -7 -> 1
ctmx426 comparetotmag -80E-1 -7 -> 1
ctmx427 comparetotmag -8.0 -7E+0 -> 1
ctmx428 comparetotmag -8.0 -70E-1 -> 1
ctmx429 comparetotmag -8 -.7E+1 -> 1
ctmx430 comparetotmag -8 -70E-1 -> 1
ctmx440 comparetotmag -8.0 -9.0 -> -1
ctmx441 comparetotmag -8.0 -9 -> -1
ctmx442 comparetotmag -8 -9.0 -> -1
ctmx443 comparetotmag -8E+0 -9.0 -> -1
ctmx444 comparetotmag -80E-1 -9.0 -> -1
ctmx445 comparetotmag -.8E+1 -9 -> -1
ctmx446 comparetotmag -80E-1 -9 -> -1
ctmx447 comparetotmag -8.0 -9E+0 -> -1
ctmx448 comparetotmag -8.0 -90E-1 -> -1
ctmx449 comparetotmag -8 -.9E+1 -> -1
ctmx450 comparetotmag -8 -90E-1 -> -1
-- testcases that subtract to lots of zeros at boundaries [pgr]
precision: 40
ctmx470 comparetotmag 123.4560000000000000E789 123.456E789 -> -1
ctmx471 comparetotmag 123.456000000000000E-89 123.456E-89 -> -1
ctmx472 comparetotmag 123.45600000000000E789 123.456E789 -> -1
ctmx473 comparetotmag 123.4560000000000E-89 123.456E-89 -> -1
ctmx474 comparetotmag 123.456000000000E789 123.456E789 -> -1
ctmx475 comparetotmag 123.45600000000E-89 123.456E-89 -> -1
ctmx476 comparetotmag 123.4560000000E789 123.456E789 -> -1
ctmx477 comparetotmag 123.456000000E-89 123.456E-89 -> -1
ctmx478 comparetotmag 123.45600000E789 123.456E789 -> -1
ctmx479 comparetotmag 123.4560000E-89 123.456E-89 -> -1
ctmx480 comparetotmag 123.456000E789 123.456E789 -> -1
ctmx481 comparetotmag 123.45600E-89 123.456E-89 -> -1
ctmx482 comparetotmag 123.4560E789 123.456E789 -> -1
ctmx483 comparetotmag 123.456E-89 123.456E-89 -> 0
ctmx484 comparetotmag 123.456E-89 123.4560000000000000E-89 -> 1
ctmx485 comparetotmag 123.456E789 123.456000000000000E789 -> 1
ctmx486 comparetotmag 123.456E-89 123.45600000000000E-89 -> 1
ctmx487 comparetotmag 123.456E789 123.4560000000000E789 -> 1
ctmx488 comparetotmag 123.456E-89 123.456000000000E-89 -> 1
ctmx489 comparetotmag 123.456E789 123.45600000000E789 -> 1
ctmx490 comparetotmag 123.456E-89 123.4560000000E-89 -> 1
ctmx491 comparetotmag 123.456E789 123.456000000E789 -> 1
ctmx492 comparetotmag 123.456E-89 123.45600000E-89 -> 1
ctmx493 comparetotmag 123.456E789 123.4560000E789 -> 1
ctmx494 comparetotmag 123.456E-89 123.456000E-89 -> 1
ctmx495 comparetotmag 123.456E789 123.45600E789 -> 1
ctmx496 comparetotmag 123.456E-89 123.4560E-89 -> 1
ctmx497 comparetotmag 123.456E789 123.456E789 -> 0
-- wide-ranging, around precision; signs equal
precision: 9
ctmx500 comparetotmag 1 1E-15 -> 1
ctmx501 comparetotmag 1 1E-14 -> 1
ctmx502 comparetotmag 1 1E-13 -> 1
ctmx503 comparetotmag 1 1E-12 -> 1
ctmx504 comparetotmag 1 1E-11 -> 1
ctmx505 comparetotmag 1 1E-10 -> 1
ctmx506 comparetotmag 1 1E-9 -> 1
ctmx507 comparetotmag 1 1E-8 -> 1
ctmx508 comparetotmag 1 1E-7 -> 1
ctmx509 comparetotmag 1 1E-6 -> 1
ctmx510 comparetotmag 1 1E-5 -> 1
ctmx511 comparetotmag 1 1E-4 -> 1
ctmx512 comparetotmag 1 1E-3 -> 1
ctmx513 comparetotmag 1 1E-2 -> 1
ctmx514 comparetotmag 1 1E-1 -> 1
ctmx515 comparetotmag 1 1E-0 -> 0
ctmx516 comparetotmag 1 1E+1 -> -1
ctmx517 comparetotmag 1 1E+2 -> -1
ctmx518 comparetotmag 1 1E+3 -> -1
ctmx519 comparetotmag 1 1E+4 -> -1
ctmx521 comparetotmag 1 1E+5 -> -1
ctmx522 comparetotmag 1 1E+6 -> -1
ctmx523 comparetotmag 1 1E+7 -> -1
ctmx524 comparetotmag 1 1E+8 -> -1
ctmx525 comparetotmag 1 1E+9 -> -1
ctmx526 comparetotmag 1 1E+10 -> -1
ctmx527 comparetotmag 1 1E+11 -> -1
ctmx528 comparetotmag 1 1E+12 -> -1
ctmx529 comparetotmag 1 1E+13 -> -1
ctmx530 comparetotmag 1 1E+14 -> -1
ctmx531 comparetotmag 1 1E+15 -> -1
-- LR swap
ctmx540 comparetotmag 1E-15 1 -> -1
ctmx541 comparetotmag 1E-14 1 -> -1
ctmx542 comparetotmag 1E-13 1 -> -1
ctmx543 comparetotmag 1E-12 1 -> -1
ctmx544 comparetotmag 1E-11 1 -> -1
ctmx545 comparetotmag 1E-10 1 -> -1
ctmx546 comparetotmag 1E-9 1 -> -1
ctmx547 comparetotmag 1E-8 1 -> -1
ctmx548 comparetotmag 1E-7 1 -> -1
ctmx549 comparetotmag 1E-6 1 -> -1
ctmx550 comparetotmag 1E-5 1 -> -1
ctmx551 comparetotmag 1E-4 1 -> -1
ctmx552 comparetotmag 1E-3 1 -> -1
ctmx553 comparetotmag 1E-2 1 -> -1
ctmx554 comparetotmag 1E-1 1 -> -1
ctmx555 comparetotmag 1E-0 1 -> 0
ctmx556 comparetotmag 1E+1 1 -> 1
ctmx557 comparetotmag 1E+2 1 -> 1
ctmx558 comparetotmag 1E+3 1 -> 1
ctmx559 comparetotmag 1E+4 1 -> 1
ctmx561 comparetotmag 1E+5 1 -> 1
ctmx562 comparetotmag 1E+6 1 -> 1
ctmx563 comparetotmag 1E+7 1 -> 1
ctmx564 comparetotmag 1E+8 1 -> 1
ctmx565 comparetotmag 1E+9 1 -> 1
ctmx566 comparetotmag 1E+10 1 -> 1
ctmx567 comparetotmag 1E+11 1 -> 1
ctmx568 comparetotmag 1E+12 1 -> 1
ctmx569 comparetotmag 1E+13 1 -> 1
ctmx570 comparetotmag 1E+14 1 -> 1
ctmx571 comparetotmag 1E+15 1 -> 1
-- similar with an useful coefficient, one side only
ctmx580 comparetotmag 0.000000987654321 1E-15 -> 1
ctmx581 comparetotmag 0.000000987654321 1E-14 -> 1
ctmx582 comparetotmag 0.000000987654321 1E-13 -> 1
ctmx583 comparetotmag 0.000000987654321 1E-12 -> 1
ctmx584 comparetotmag 0.000000987654321 1E-11 -> 1
ctmx585 comparetotmag 0.000000987654321 1E-10 -> 1
ctmx586 comparetotmag 0.000000987654321 1E-9 -> 1
ctmx587 comparetotmag 0.000000987654321 1E-8 -> 1
ctmx588 comparetotmag 0.000000987654321 1E-7 -> 1
ctmx589 comparetotmag 0.000000987654321 1E-6 -> -1
ctmx590 comparetotmag 0.000000987654321 1E-5 -> -1
ctmx591 comparetotmag 0.000000987654321 1E-4 -> -1
ctmx592 comparetotmag 0.000000987654321 1E-3 -> -1
ctmx593 comparetotmag 0.000000987654321 1E-2 -> -1
ctmx594 comparetotmag 0.000000987654321 1E-1 -> -1
ctmx595 comparetotmag 0.000000987654321 1E-0 -> -1
ctmx596 comparetotmag 0.000000987654321 1E+1 -> -1
ctmx597 comparetotmag 0.000000987654321 1E+2 -> -1
ctmx598 comparetotmag 0.000000987654321 1E+3 -> -1
ctmx599 comparetotmag 0.000000987654321 1E+4 -> -1
-- check some unit-y traps
precision: 20
ctmx600 comparetotmag 12 12.2345 -> -1
ctmx601 comparetotmag 12.0 12.2345 -> -1
ctmx602 comparetotmag 12.00 12.2345 -> -1
ctmx603 comparetotmag 12.000 12.2345 -> -1
ctmx604 comparetotmag 12.0000 12.2345 -> -1
ctmx605 comparetotmag 12.00000 12.2345 -> -1
ctmx606 comparetotmag 12.000000 12.2345 -> -1
ctmx607 comparetotmag 12.0000000 12.2345 -> -1
ctmx608 comparetotmag 12.00000000 12.2345 -> -1
ctmx609 comparetotmag 12.000000000 12.2345 -> -1
ctmx610 comparetotmag 12.1234 12 -> 1
ctmx611 comparetotmag 12.1234 12.0 -> 1
ctmx612 comparetotmag 12.1234 12.00 -> 1
ctmx613 comparetotmag 12.1234 12.000 -> 1
ctmx614 comparetotmag 12.1234 12.0000 -> 1
ctmx615 comparetotmag 12.1234 12.00000 -> 1
ctmx616 comparetotmag 12.1234 12.000000 -> 1
ctmx617 comparetotmag 12.1234 12.0000000 -> 1
ctmx618 comparetotmag 12.1234 12.00000000 -> 1
ctmx619 comparetotmag 12.1234 12.000000000 -> 1
ctmx620 comparetotmag -12 -12.2345 -> -1
ctmx621 comparetotmag -12.0 -12.2345 -> -1
ctmx622 comparetotmag -12.00 -12.2345 -> -1
ctmx623 comparetotmag -12.000 -12.2345 -> -1
ctmx624 comparetotmag -12.0000 -12.2345 -> -1
ctmx625 comparetotmag -12.00000 -12.2345 -> -1
ctmx626 comparetotmag -12.000000 -12.2345 -> -1
ctmx627 comparetotmag -12.0000000 -12.2345 -> -1
ctmx628 comparetotmag -12.00000000 -12.2345 -> -1
ctmx629 comparetotmag -12.000000000 -12.2345 -> -1
ctmx630 comparetotmag -12.1234 -12 -> 1
ctmx631 comparetotmag -12.1234 -12.0 -> 1
ctmx632 comparetotmag -12.1234 -12.00 -> 1
ctmx633 comparetotmag -12.1234 -12.000 -> 1
ctmx634 comparetotmag -12.1234 -12.0000 -> 1
ctmx635 comparetotmag -12.1234 -12.00000 -> 1
ctmx636 comparetotmag -12.1234 -12.000000 -> 1
ctmx637 comparetotmag -12.1234 -12.0000000 -> 1
ctmx638 comparetotmag -12.1234 -12.00000000 -> 1
ctmx639 comparetotmag -12.1234 -12.000000000 -> 1
precision: 9
-- extended zeros
ctmx640 comparetotmag 0 0 -> 0
ctmx641 comparetotmag 0 -0 -> 0
ctmx642 comparetotmag 0 -0.0 -> 1
ctmx643 comparetotmag 0 0.0 -> 1
ctmx644 comparetotmag -0 0 -> 0
ctmx645 comparetotmag -0 -0 -> 0
ctmx646 comparetotmag -0 -0.0 -> 1
ctmx647 comparetotmag -0 0.0 -> 1
ctmx648 comparetotmag 0.0 0 -> -1
ctmx649 comparetotmag 0.0 -0 -> -1
ctmx650 comparetotmag 0.0 -0.0 -> 0
ctmx651 comparetotmag 0.0 0.0 -> 0
ctmx652 comparetotmag -0.0 0 -> -1
ctmx653 comparetotmag -0.0 -0 -> -1
ctmx654 comparetotmag -0.0 -0.0 -> 0
ctmx655 comparetotmag -0.0 0.0 -> 0
ctmx656 comparetotmag -0E1 0.0 -> 1
ctmx657 comparetotmag -0E2 0.0 -> 1
ctmx658 comparetotmag 0E1 0.0 -> 1
ctmx659 comparetotmag 0E2 0.0 -> 1
ctmx660 comparetotmag -0E1 0 -> 1
ctmx661 comparetotmag -0E2 0 -> 1
ctmx662 comparetotmag 0E1 0 -> 1
ctmx663 comparetotmag 0E2 0 -> 1
ctmx664 comparetotmag -0E1 -0E1 -> 0
ctmx665 comparetotmag -0E2 -0E1 -> 1
ctmx666 comparetotmag 0E1 -0E1 -> 0
ctmx667 comparetotmag 0E2 -0E1 -> 1
ctmx668 comparetotmag -0E1 -0E2 -> -1
ctmx669 comparetotmag -0E2 -0E2 -> 0
ctmx670 comparetotmag 0E1 -0E2 -> -1
ctmx671 comparetotmag 0E2 -0E2 -> 0
ctmx672 comparetotmag -0E1 0E1 -> 0
ctmx673 comparetotmag -0E2 0E1 -> 1
ctmx674 comparetotmag 0E1 0E1 -> 0
ctmx675 comparetotmag 0E2 0E1 -> 1
ctmx676 comparetotmag -0E1 0E2 -> -1
ctmx677 comparetotmag -0E2 0E2 -> 0
ctmx678 comparetotmag 0E1 0E2 -> -1
ctmx679 comparetotmag 0E2 0E2 -> 0
-- trailing zeros; unit-y
precision: 20
ctmx680 comparetotmag 12 12 -> 0
ctmx681 comparetotmag 12 12.0 -> 1
ctmx682 comparetotmag 12 12.00 -> 1
ctmx683 comparetotmag 12 12.000 -> 1
ctmx684 comparetotmag 12 12.0000 -> 1
ctmx685 comparetotmag 12 12.00000 -> 1
ctmx686 comparetotmag 12 12.000000 -> 1
ctmx687 comparetotmag 12 12.0000000 -> 1
ctmx688 comparetotmag 12 12.00000000 -> 1
ctmx689 comparetotmag 12 12.000000000 -> 1
ctmx690 comparetotmag 12 12 -> 0
ctmx691 comparetotmag 12.0 12 -> -1
ctmx692 comparetotmag 12.00 12 -> -1
ctmx693 comparetotmag 12.000 12 -> -1
ctmx694 comparetotmag 12.0000 12 -> -1
ctmx695 comparetotmag 12.00000 12 -> -1
ctmx696 comparetotmag 12.000000 12 -> -1
ctmx697 comparetotmag 12.0000000 12 -> -1
ctmx698 comparetotmag 12.00000000 12 -> -1
ctmx699 comparetotmag 12.000000000 12 -> -1
-- long operand checks
maxexponent: 999
minexponent: -999
precision: 9
ctmx701 comparetotmag 12345678000 1 -> 1
ctmx702 comparetotmag 1 12345678000 -> -1
ctmx703 comparetotmag 1234567800 1 -> 1
ctmx704 comparetotmag 1 1234567800 -> -1
ctmx705 comparetotmag 1234567890 1 -> 1
ctmx706 comparetotmag 1 1234567890 -> -1
ctmx707 comparetotmag 1234567891 1 -> 1
ctmx708 comparetotmag 1 1234567891 -> -1
ctmx709 comparetotmag 12345678901 1 -> 1
ctmx710 comparetotmag 1 12345678901 -> -1
ctmx711 comparetotmag 1234567896 1 -> 1
ctmx712 comparetotmag 1 1234567896 -> -1
ctmx713 comparetotmag -1234567891 1 -> 1
ctmx714 comparetotmag 1 -1234567891 -> -1
ctmx715 comparetotmag -12345678901 1 -> 1
ctmx716 comparetotmag 1 -12345678901 -> -1
ctmx717 comparetotmag -1234567896 1 -> 1
ctmx718 comparetotmag 1 -1234567896 -> -1
precision: 15
-- same with plenty of precision
ctmx721 comparetotmag 12345678000 1 -> 1
ctmx722 comparetotmag 1 12345678000 -> -1
ctmx723 comparetotmag 1234567800 1 -> 1
ctmx724 comparetotmag 1 1234567800 -> -1
ctmx725 comparetotmag 1234567890 1 -> 1
ctmx726 comparetotmag 1 1234567890 -> -1
ctmx727 comparetotmag 1234567891 1 -> 1
ctmx728 comparetotmag 1 1234567891 -> -1
ctmx729 comparetotmag 12345678901 1 -> 1
ctmx730 comparetotmag 1 12345678901 -> -1
ctmx731 comparetotmag 1234567896 1 -> 1
ctmx732 comparetotmag 1 1234567896 -> -1
-- residue cases
precision: 5
ctmx740 comparetotmag 1 0.9999999 -> 1
ctmx741 comparetotmag 1 0.999999 -> 1
ctmx742 comparetotmag 1 0.99999 -> 1
ctmx743 comparetotmag 1 1.0000 -> 1
ctmx744 comparetotmag 1 1.00001 -> -1
ctmx745 comparetotmag 1 1.000001 -> -1
ctmx746 comparetotmag 1 1.0000001 -> -1
ctmx750 comparetotmag 0.9999999 1 -> -1
ctmx751 comparetotmag 0.999999 1 -> -1
ctmx752 comparetotmag 0.99999 1 -> -1
ctmx753 comparetotmag 1.0000 1 -> -1
ctmx754 comparetotmag 1.00001 1 -> 1
ctmx755 comparetotmag 1.000001 1 -> 1
ctmx756 comparetotmag 1.0000001 1 -> 1
-- a selection of longies
ctmx760 comparetotmag -36852134.84194296250843579428931 -5830629.8347085025808756560357940 -> 1
ctmx761 comparetotmag -36852134.84194296250843579428931 -36852134.84194296250843579428931 -> 0
ctmx762 comparetotmag -36852134.94194296250843579428931 -36852134.84194296250843579428931 -> 1
ctmx763 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
-- precisions above or below the difference should have no effect
precision: 11
ctmx764 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
precision: 10
ctmx765 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
precision: 9
ctmx766 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
precision: 8
ctmx767 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
precision: 7
ctmx768 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
precision: 6
ctmx769 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
precision: 5
ctmx770 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
precision: 4
ctmx771 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
precision: 3
ctmx772 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
precision: 2
ctmx773 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
precision: 1
ctmx774 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
-- Specials
precision: 9
ctmx780 comparetotmag Inf -Inf -> 0
ctmx781 comparetotmag Inf -1000 -> 1
ctmx782 comparetotmag Inf -1 -> 1
ctmx783 comparetotmag Inf -0 -> 1
ctmx784 comparetotmag Inf 0 -> 1
ctmx785 comparetotmag Inf 1 -> 1
ctmx786 comparetotmag Inf 1000 -> 1
ctmx787 comparetotmag Inf Inf -> 0
ctmx788 comparetotmag -1000 Inf -> -1
ctmx789 comparetotmag -Inf Inf -> 0
ctmx790 comparetotmag -1 Inf -> -1
ctmx791 comparetotmag -0 Inf -> -1
ctmx792 comparetotmag 0 Inf -> -1
ctmx793 comparetotmag 1 Inf -> -1
ctmx794 comparetotmag 1000 Inf -> -1
ctmx795 comparetotmag Inf Inf -> 0
ctmx800 comparetotmag -Inf -Inf -> 0
ctmx801 comparetotmag -Inf -1000 -> 1
ctmx802 comparetotmag -Inf -1 -> 1
ctmx803 comparetotmag -Inf -0 -> 1
ctmx804 comparetotmag -Inf 0 -> 1
ctmx805 comparetotmag -Inf 1 -> 1
ctmx806 comparetotmag -Inf 1000 -> 1
ctmx807 comparetotmag -Inf Inf -> 0
ctmx808 comparetotmag -Inf -Inf -> 0
ctmx809 comparetotmag -1000 -Inf -> -1
ctmx810 comparetotmag -1 -Inf -> -1
ctmx811 comparetotmag -0 -Inf -> -1
ctmx812 comparetotmag 0 -Inf -> -1
ctmx813 comparetotmag 1 -Inf -> -1
ctmx814 comparetotmag 1000 -Inf -> -1
ctmx815 comparetotmag Inf -Inf -> 0
ctmx821 comparetotmag NaN -Inf -> 1
ctmx822 comparetotmag NaN -1000 -> 1
ctmx823 comparetotmag NaN -1 -> 1
ctmx824 comparetotmag NaN -0 -> 1
ctmx825 comparetotmag NaN 0 -> 1
ctmx826 comparetotmag NaN 1 -> 1
ctmx827 comparetotmag NaN 1000 -> 1
ctmx828 comparetotmag NaN Inf -> 1
ctmx829 comparetotmag NaN NaN -> 0
ctmx830 comparetotmag -Inf NaN -> -1
ctmx831 comparetotmag -1000 NaN -> -1
ctmx832 comparetotmag -1 NaN -> -1
ctmx833 comparetotmag -0 NaN -> -1
ctmx834 comparetotmag 0 NaN -> -1
ctmx835 comparetotmag 1 NaN -> -1
ctmx836 comparetotmag 1000 NaN -> -1
ctmx837 comparetotmag Inf NaN -> -1
ctmx838 comparetotmag -NaN -NaN -> 0
ctmx839 comparetotmag +NaN -NaN -> 0
ctmx840 comparetotmag -NaN +NaN -> 0
ctmx841 comparetotmag sNaN -sNaN -> 0
ctmx842 comparetotmag sNaN -NaN -> -1
ctmx843 comparetotmag sNaN -Inf -> 1
ctmx844 comparetotmag sNaN -1000 -> 1
ctmx845 comparetotmag sNaN -1 -> 1
ctmx846 comparetotmag sNaN -0 -> 1
ctmx847 comparetotmag sNaN 0 -> 1
ctmx848 comparetotmag sNaN 1 -> 1
ctmx849 comparetotmag sNaN 1000 -> 1
ctmx850 comparetotmag sNaN NaN -> -1
ctmx851 comparetotmag sNaN sNaN -> 0
ctmx852 comparetotmag -sNaN sNaN -> 0
ctmx853 comparetotmag -NaN sNaN -> 1
ctmx854 comparetotmag -Inf sNaN -> -1
ctmx855 comparetotmag -1000 sNaN -> -1
ctmx856 comparetotmag -1 sNaN -> -1
ctmx857 comparetotmag -0 sNaN -> -1
ctmx858 comparetotmag 0 sNaN -> -1
ctmx859 comparetotmag 1 sNaN -> -1
ctmx860 comparetotmag 1000 sNaN -> -1
ctmx861 comparetotmag Inf sNaN -> -1
ctmx862 comparetotmag NaN sNaN -> 1
ctmx863 comparetotmag sNaN sNaN -> 0
ctmx871 comparetotmag -sNaN -sNaN -> 0
ctmx872 comparetotmag -sNaN -NaN -> -1
ctmx873 comparetotmag -sNaN -Inf -> 1
ctmx874 comparetotmag -sNaN -1000 -> 1
ctmx875 comparetotmag -sNaN -1 -> 1
ctmx876 comparetotmag -sNaN -0 -> 1
ctmx877 comparetotmag -sNaN 0 -> 1
ctmx878 comparetotmag -sNaN 1 -> 1
ctmx879 comparetotmag -sNaN 1000 -> 1
ctmx880 comparetotmag -sNaN NaN -> -1
ctmx881 comparetotmag -sNaN sNaN -> 0
ctmx882 comparetotmag -sNaN -sNaN -> 0
ctmx883 comparetotmag -NaN -sNaN -> 1
ctmx884 comparetotmag -Inf -sNaN -> -1
ctmx885 comparetotmag -1000 -sNaN -> -1
ctmx886 comparetotmag -1 -sNaN -> -1
ctmx887 comparetotmag -0 -sNaN -> -1
ctmx888 comparetotmag 0 -sNaN -> -1
ctmx889 comparetotmag 1 -sNaN -> -1
ctmx890 comparetotmag 1000 -sNaN -> -1
ctmx891 comparetotmag Inf -sNaN -> -1
ctmx892 comparetotmag NaN -sNaN -> 1
ctmx893 comparetotmag sNaN -sNaN -> 0
-- NaNs with payload
ctmx960 comparetotmag NaN9 -Inf -> 1
ctmx961 comparetotmag NaN8 999 -> 1
ctmx962 comparetotmag NaN77 Inf -> 1
ctmx963 comparetotmag -NaN67 NaN5 -> 1
ctmx964 comparetotmag -Inf -NaN4 -> -1
ctmx965 comparetotmag -999 -NaN33 -> -1
ctmx966 comparetotmag Inf NaN2 -> -1
ctmx970 comparetotmag -NaN41 -NaN42 -> -1
ctmx971 comparetotmag +NaN41 -NaN42 -> -1
ctmx972 comparetotmag -NaN41 +NaN42 -> -1
ctmx973 comparetotmag +NaN41 +NaN42 -> -1
ctmx974 comparetotmag -NaN42 -NaN01 -> 1
ctmx975 comparetotmag +NaN42 -NaN01 -> 1
ctmx976 comparetotmag -NaN42 +NaN01 -> 1
ctmx977 comparetotmag +NaN42 +NaN01 -> 1
ctmx980 comparetotmag -sNaN771 -sNaN772 -> -1
ctmx981 comparetotmag +sNaN771 -sNaN772 -> -1
ctmx982 comparetotmag -sNaN771 +sNaN772 -> -1
ctmx983 comparetotmag +sNaN771 +sNaN772 -> -1
ctmx984 comparetotmag -sNaN772 -sNaN771 -> 1
ctmx985 comparetotmag +sNaN772 -sNaN771 -> 1
ctmx986 comparetotmag -sNaN772 +sNaN771 -> 1
ctmx987 comparetotmag +sNaN772 +sNaN771 -> 1
ctmx991 comparetotmag -sNaN99 -Inf -> 1
ctmx992 comparetotmag sNaN98 -11 -> 1
ctmx993 comparetotmag sNaN97 NaN -> -1
ctmx994 comparetotmag sNaN16 sNaN94 -> -1
ctmx995 comparetotmag NaN85 sNaN83 -> 1
ctmx996 comparetotmag -Inf sNaN92 -> -1
ctmx997 comparetotmag 088 sNaN81 -> -1
ctmx998 comparetotmag Inf sNaN90 -> -1
ctmx999 comparetotmag NaN -sNaN89 -> 1
-- overflow and underflow tests .. subnormal results now allowed
maxExponent: 999999999
minexponent: -999999999
ctmx1080 comparetotmag +1.23456789012345E-0 9E+999999999 -> -1
ctmx1081 comparetotmag 9E+999999999 +1.23456789012345E-0 -> 1
ctmx1082 comparetotmag +0.100 9E-999999999 -> 1
ctmx1083 comparetotmag 9E-999999999 +0.100 -> -1
ctmx1085 comparetotmag -1.23456789012345E-0 9E+999999999 -> -1
ctmx1086 comparetotmag 9E+999999999 -1.23456789012345E-0 -> 1
ctmx1087 comparetotmag -0.100 9E-999999999 -> 1
ctmx1088 comparetotmag 9E-999999999 -0.100 -> -1
ctmx1089 comparetotmag 1e-599999999 1e-400000001 -> -1
ctmx1090 comparetotmag 1e-599999999 1e-400000000 -> -1
ctmx1091 comparetotmag 1e-600000000 1e-400000000 -> -1
ctmx1092 comparetotmag 9e-999999998 0.01 -> -1
ctmx1093 comparetotmag 9e-999999998 0.1 -> -1
ctmx1094 comparetotmag 0.01 9e-999999998 -> 1
ctmx1095 comparetotmag 1e599999999 1e400000001 -> 1
ctmx1096 comparetotmag 1e599999999 1e400000000 -> 1
ctmx1097 comparetotmag 1e600000000 1e400000000 -> 1
ctmx1098 comparetotmag 9e999999998 100 -> 1
ctmx1099 comparetotmag 9e999999998 10 -> 1
ctmx1100 comparetotmag 100 9e999999998 -> -1
-- signs
ctmx1101 comparetotmag 1e+777777777 1e+411111111 -> 1
ctmx1102 comparetotmag 1e+777777777 -1e+411111111 -> 1
ctmx1103 comparetotmag -1e+777777777 1e+411111111 -> 1
ctmx1104 comparetotmag -1e+777777777 -1e+411111111 -> 1
ctmx1105 comparetotmag 1e-777777777 1e-411111111 -> -1
ctmx1106 comparetotmag 1e-777777777 -1e-411111111 -> -1
ctmx1107 comparetotmag -1e-777777777 1e-411111111 -> -1
ctmx1108 comparetotmag -1e-777777777 -1e-411111111 -> -1
-- spread zeros
ctmx1110 comparetotmag 0E-383 0 -> -1
ctmx1111 comparetotmag 0E-383 -0 -> -1
ctmx1112 comparetotmag -0E-383 0 -> -1
ctmx1113 comparetotmag -0E-383 -0 -> -1
ctmx1114 comparetotmag 0E-383 0E+384 -> -1
ctmx1115 comparetotmag 0E-383 -0E+384 -> -1
ctmx1116 comparetotmag -0E-383 0E+384 -> -1
ctmx1117 comparetotmag -0E-383 -0E+384 -> -1
ctmx1118 comparetotmag 0 0E+384 -> -1
ctmx1119 comparetotmag 0 -0E+384 -> -1
ctmx1120 comparetotmag -0 0E+384 -> -1
ctmx1121 comparetotmag -0 -0E+384 -> -1
ctmx1130 comparetotmag 0E+384 0 -> 1
ctmx1131 comparetotmag 0E+384 -0 -> 1
ctmx1132 comparetotmag -0E+384 0 -> 1
ctmx1133 comparetotmag -0E+384 -0 -> 1
ctmx1134 comparetotmag 0E+384 0E-383 -> 1
ctmx1135 comparetotmag 0E+384 -0E-383 -> 1
ctmx1136 comparetotmag -0E+384 0E-383 -> 1
ctmx1137 comparetotmag -0E+384 -0E-383 -> 1
ctmx1138 comparetotmag 0 0E-383 -> 1
ctmx1139 comparetotmag 0 -0E-383 -> 1
ctmx1140 comparetotmag -0 0E-383 -> 1
ctmx1141 comparetotmag -0 -0E-383 -> 1
-- Null tests
ctmx9990 comparetotmag 10 # -> NaN Invalid_operation
ctmx9991 comparetotmag # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,86 @@
------------------------------------------------------------------------
-- copy.decTest -- quiet copy --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
precision: 9
rounding: half_up
maxExponent: 999
minExponent: -999
-- Sanity check
cpyx001 copy +7.50 -> 7.50
-- Infinities
cpyx011 copy Infinity -> Infinity
cpyx012 copy -Infinity -> -Infinity
-- NaNs, 0 payload
cpyx021 copy NaN -> NaN
cpyx022 copy -NaN -> -NaN
cpyx023 copy sNaN -> sNaN
cpyx024 copy -sNaN -> -sNaN
-- NaNs, non-0 payload
cpyx031 copy NaN10 -> NaN10
cpyx032 copy -NaN10 -> -NaN10
cpyx033 copy sNaN10 -> sNaN10
cpyx034 copy -sNaN10 -> -sNaN10
cpyx035 copy NaN7 -> NaN7
cpyx036 copy -NaN7 -> -NaN7
cpyx037 copy sNaN101 -> sNaN101
cpyx038 copy -sNaN101 -> -sNaN101
-- finites
cpyx101 copy 7 -> 7
cpyx102 copy -7 -> -7
cpyx103 copy 75 -> 75
cpyx104 copy -75 -> -75
cpyx105 copy 7.50 -> 7.50
cpyx106 copy -7.50 -> -7.50
cpyx107 copy 7.500 -> 7.500
cpyx108 copy -7.500 -> -7.500
-- zeros
cpyx111 copy 0 -> 0
cpyx112 copy -0 -> -0
cpyx113 copy 0E+4 -> 0E+4
cpyx114 copy -0E+4 -> -0E+4
cpyx115 copy 0.0000 -> 0.0000
cpyx116 copy -0.0000 -> -0.0000
cpyx117 copy 0E-141 -> 0E-141
cpyx118 copy -0E-141 -> -0E-141
-- full coefficients, alternating bits
cpyx121 copy 268268268 -> 268268268
cpyx122 copy -268268268 -> -268268268
cpyx123 copy 134134134 -> 134134134
cpyx124 copy -134134134 -> -134134134
-- Nmax, Nmin, Ntiny
cpyx131 copy 9.99999999E+999 -> 9.99999999E+999
cpyx132 copy 1E-999 -> 1E-999
cpyx133 copy 1.00000000E-999 -> 1.00000000E-999
cpyx134 copy 1E-1007 -> 1E-1007
cpyx135 copy -1E-1007 -> -1E-1007
cpyx136 copy -1.00000000E-999 -> -1.00000000E-999
cpyx137 copy -1E-999 -> -1E-999
cpyx138 copy -9.99999999E+999 -> -9.99999999E+999

View File

@@ -0,0 +1,86 @@
------------------------------------------------------------------------
-- copyAbs.decTest -- quiet copy and set sign to zero --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
precision: 9
rounding: half_up
maxExponent: 999
minExponent: -999
-- Sanity check
cpax001 copyabs +7.50 -> 7.50
-- Infinities
cpax011 copyabs Infinity -> Infinity
cpax012 copyabs -Infinity -> Infinity
-- NaNs, 0 payload
cpax021 copyabs NaN -> NaN
cpax022 copyabs -NaN -> NaN
cpax023 copyabs sNaN -> sNaN
cpax024 copyabs -sNaN -> sNaN
-- NaNs, non-0 payload
cpax031 copyabs NaN10 -> NaN10
cpax032 copyabs -NaN15 -> NaN15
cpax033 copyabs sNaN15 -> sNaN15
cpax034 copyabs -sNaN10 -> sNaN10
cpax035 copyabs NaN7 -> NaN7
cpax036 copyabs -NaN7 -> NaN7
cpax037 copyabs sNaN101 -> sNaN101
cpax038 copyabs -sNaN101 -> sNaN101
-- finites
cpax101 copyabs 7 -> 7
cpax102 copyabs -7 -> 7
cpax103 copyabs 75 -> 75
cpax104 copyabs -75 -> 75
cpax105 copyabs 7.10 -> 7.10
cpax106 copyabs -7.10 -> 7.10
cpax107 copyabs 7.500 -> 7.500
cpax108 copyabs -7.500 -> 7.500
-- zeros
cpax111 copyabs 0 -> 0
cpax112 copyabs -0 -> 0
cpax113 copyabs 0E+6 -> 0E+6
cpax114 copyabs -0E+6 -> 0E+6
cpax115 copyabs 0.0000 -> 0.0000
cpax116 copyabs -0.0000 -> 0.0000
cpax117 copyabs 0E-141 -> 0E-141
cpax118 copyabs -0E-141 -> 0E-141
-- full coefficients, alternating bits
cpax121 copyabs 268268268 -> 268268268
cpax122 copyabs -268268268 -> 268268268
cpax123 copyabs 134134134 -> 134134134
cpax124 copyabs -134134134 -> 134134134
-- Nmax, Nmin, Ntiny
cpax131 copyabs 9.99999999E+999 -> 9.99999999E+999
cpax132 copyabs 1E-999 -> 1E-999
cpax133 copyabs 1.00000000E-999 -> 1.00000000E-999
cpax134 copyabs 1E-1007 -> 1E-1007
cpax135 copyabs -1E-1007 -> 1E-1007
cpax136 copyabs -1.00000000E-999 -> 1.00000000E-999
cpax137 copyabs -1E-999 -> 1E-999
cpax199 copyabs -9.99999999E+999 -> 9.99999999E+999

View File

@@ -0,0 +1,177 @@
------------------------------------------------------------------------
-- copysign.decTest -- quiet copy with sign from rhs --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
precision: 9
rounding: half_up
maxExponent: 999
minExponent: -999
-- Sanity check, and examples from decArith
cpsx001 copysign +7.50 11 -> 7.50
cpsx002 copysign '1.50' '7.33' -> 1.50
cpsx003 copysign '-1.50' '7.33' -> 1.50
cpsx004 copysign '1.50' '-7.33' -> -1.50
cpsx005 copysign '-1.50' '-7.33' -> -1.50
-- Infinities
cpsx011 copysign Infinity 11 -> Infinity
cpsx012 copysign -Infinity 11 -> Infinity
-- NaNs, 0 payload
cpsx021 copysign NaN 11 -> NaN
cpsx022 copysign -NaN 11 -> NaN
cpsx023 copysign sNaN 11 -> sNaN
cpsx024 copysign -sNaN 11 -> sNaN
-- NaNs, non-0 payload
cpsx031 copysign NaN10 11 -> NaN10
cpsx032 copysign -NaN10 11 -> NaN10
cpsx033 copysign sNaN10 11 -> sNaN10
cpsx034 copysign -sNaN10 11 -> sNaN10
cpsx035 copysign NaN7 11 -> NaN7
cpsx036 copysign -NaN7 11 -> NaN7
cpsx037 copysign sNaN101 11 -> sNaN101
cpsx038 copysign -sNaN101 11 -> sNaN101
-- finites
cpsx101 copysign 7 11 -> 7
cpsx102 copysign -7 11 -> 7
cpsx103 copysign 75 11 -> 75
cpsx104 copysign -75 11 -> 75
cpsx105 copysign 7.50 11 -> 7.50
cpsx106 copysign -7.50 11 -> 7.50
cpsx107 copysign 7.500 11 -> 7.500
cpsx108 copysign -7.500 11 -> 7.500
-- zeros
cpsx111 copysign 0 11 -> 0
cpsx112 copysign -0 11 -> 0
cpsx113 copysign 0E+4 11 -> 0E+4
cpsx114 copysign -0E+4 11 -> 0E+4
cpsx115 copysign 0.0000 11 -> 0.0000
cpsx116 copysign -0.0000 11 -> 0.0000
cpsx117 copysign 0E-141 11 -> 0E-141
cpsx118 copysign -0E-141 11 -> 0E-141
-- full coefficients, alternating bits
cpsx121 copysign 268268268 11 -> 268268268
cpsx122 copysign -268268268 11 -> 268268268
cpsx123 copysign 134134134 11 -> 134134134
cpsx124 copysign -134134134 11 -> 134134134
-- Nmax, Nmin, Ntiny
cpsx131 copysign 9.99999999E+999 11 -> 9.99999999E+999
cpsx132 copysign 1E-999 11 -> 1E-999
cpsx133 copysign 1.00000000E-999 11 -> 1.00000000E-999
cpsx134 copysign 1E-1007 11 -> 1E-1007
cpsx135 copysign -1E-1007 11 -> 1E-1007
cpsx136 copysign -1.00000000E-999 11 -> 1.00000000E-999
cpsx137 copysign -1E-999 11 -> 1E-999
cpsx138 copysign -9.99999999E+999 11 -> 9.99999999E+999
-- repeat with negative RHS
-- Infinities
cpsx211 copysign Infinity -34 -> -Infinity
cpsx212 copysign -Infinity -34 -> -Infinity
-- NaNs, 0 payload
cpsx221 copysign NaN -34 -> -NaN
cpsx222 copysign -NaN -34 -> -NaN
cpsx223 copysign sNaN -34 -> -sNaN
cpsx224 copysign -sNaN -34 -> -sNaN
-- NaNs, non-0 payload
cpsx231 copysign NaN10 -34 -> -NaN10
cpsx232 copysign -NaN10 -34 -> -NaN10
cpsx233 copysign sNaN10 -34 -> -sNaN10
cpsx234 copysign -sNaN10 -34 -> -sNaN10
cpsx235 copysign NaN7 -34 -> -NaN7
cpsx236 copysign -NaN7 -34 -> -NaN7
cpsx237 copysign sNaN101 -34 -> -sNaN101
cpsx238 copysign -sNaN101 -34 -> -sNaN101
-- finites
cpsx301 copysign 7 -34 -> -7
cpsx302 copysign -7 -34 -> -7
cpsx303 copysign 75 -34 -> -75
cpsx304 copysign -75 -34 -> -75
cpsx305 copysign 7.50 -34 -> -7.50
cpsx306 copysign -7.50 -34 -> -7.50
cpsx307 copysign 7.500 -34 -> -7.500
cpsx308 copysign -7.500 -34 -> -7.500
-- zeros
cpsx311 copysign 0 -34 -> -0
cpsx312 copysign -0 -34 -> -0
cpsx313 copysign 0E+4 -34 -> -0E+4
cpsx314 copysign -0E+4 -34 -> -0E+4
cpsx315 copysign 0.0000 -34 -> -0.0000
cpsx316 copysign -0.0000 -34 -> -0.0000
cpsx317 copysign 0E-141 -34 -> -0E-141
cpsx318 copysign -0E-141 -34 -> -0E-141
-- full coefficients, alternating bits
cpsx321 copysign 268268268 -18 -> -268268268
cpsx322 copysign -268268268 -18 -> -268268268
cpsx323 copysign 134134134 -18 -> -134134134
cpsx324 copysign -134134134 -18 -> -134134134
-- Nmax, Nmin, Ntiny
cpsx331 copysign 9.99999999E+999 -18 -> -9.99999999E+999
cpsx332 copysign 1E-999 -18 -> -1E-999
cpsx333 copysign 1.00000000E-999 -18 -> -1.00000000E-999
cpsx334 copysign 1E-1007 -18 -> -1E-1007
cpsx335 copysign -1E-1007 -18 -> -1E-1007
cpsx336 copysign -1.00000000E-999 -18 -> -1.00000000E-999
cpsx337 copysign -1E-999 -18 -> -1E-999
cpsx338 copysign -9.99999999E+999 -18 -> -9.99999999E+999
-- Other kinds of RHS
cpsx401 copysign 701 -34 -> -701
cpsx402 copysign -720 -34 -> -720
cpsx403 copysign 701 -0 -> -701
cpsx404 copysign -720 -0 -> -720
cpsx405 copysign 701 +0 -> 701
cpsx406 copysign -720 +0 -> 720
cpsx407 copysign 701 +34 -> 701
cpsx408 copysign -720 +34 -> 720
cpsx413 copysign 701 -Inf -> -701
cpsx414 copysign -720 -Inf -> -720
cpsx415 copysign 701 +Inf -> 701
cpsx416 copysign -720 +Inf -> 720
cpsx420 copysign 701 -NaN -> -701
cpsx421 copysign -720 -NaN -> -720
cpsx422 copysign 701 +NaN -> 701
cpsx423 copysign -720 +NaN -> 720
cpsx425 copysign -720 +NaN8 -> 720
cpsx426 copysign 701 -sNaN -> -701
cpsx427 copysign -720 -sNaN -> -720
cpsx428 copysign 701 +sNaN -> 701
cpsx429 copysign -720 +sNaN -> 720
cpsx430 copysign -720 +sNaN3 -> 720

View File

@@ -0,0 +1,126 @@
------------------------------------------------------------------------
-- ddAbs.decTest -- decDouble absolute value, heeding sNaN --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
ddabs001 abs '1' -> '1'
ddabs002 abs '-1' -> '1'
ddabs003 abs '1.00' -> '1.00'
ddabs004 abs '-1.00' -> '1.00'
ddabs005 abs '0' -> '0'
ddabs006 abs '0.00' -> '0.00'
ddabs007 abs '00.0' -> '0.0'
ddabs008 abs '00.00' -> '0.00'
ddabs009 abs '00' -> '0'
ddabs010 abs '-2' -> '2'
ddabs011 abs '2' -> '2'
ddabs012 abs '-2.00' -> '2.00'
ddabs013 abs '2.00' -> '2.00'
ddabs014 abs '-0' -> '0'
ddabs015 abs '-0.00' -> '0.00'
ddabs016 abs '-00.0' -> '0.0'
ddabs017 abs '-00.00' -> '0.00'
ddabs018 abs '-00' -> '0'
ddabs020 abs '-2000000' -> '2000000'
ddabs021 abs '2000000' -> '2000000'
ddabs030 abs '+0.1' -> '0.1'
ddabs031 abs '-0.1' -> '0.1'
ddabs032 abs '+0.01' -> '0.01'
ddabs033 abs '-0.01' -> '0.01'
ddabs034 abs '+0.001' -> '0.001'
ddabs035 abs '-0.001' -> '0.001'
ddabs036 abs '+0.000001' -> '0.000001'
ddabs037 abs '-0.000001' -> '0.000001'
ddabs038 abs '+0.000000000001' -> '1E-12'
ddabs039 abs '-0.000000000001' -> '1E-12'
-- examples from decArith
ddabs040 abs '2.1' -> '2.1'
ddabs041 abs '-100' -> '100'
ddabs042 abs '101.5' -> '101.5'
ddabs043 abs '-101.5' -> '101.5'
-- more fixed, potential LHS swaps/overlays if done by subtract 0
ddabs060 abs '-56267E-10' -> '0.0000056267'
ddabs061 abs '-56267E-5' -> '0.56267'
ddabs062 abs '-56267E-2' -> '562.67'
ddabs063 abs '-56267E-1' -> '5626.7'
ddabs065 abs '-56267E-0' -> '56267'
-- subnormals and underflow
-- long operand tests
ddabs321 abs 1234567890123456 -> 1234567890123456
ddabs322 abs 12345678000 -> 12345678000
ddabs323 abs 1234567800 -> 1234567800
ddabs324 abs 1234567890 -> 1234567890
ddabs325 abs 1234567891 -> 1234567891
ddabs326 abs 12345678901 -> 12345678901
ddabs327 abs 1234567896 -> 1234567896
-- zeros
ddabs111 abs 0 -> 0
ddabs112 abs -0 -> 0
ddabs113 abs 0E+6 -> 0E+6
ddabs114 abs -0E+6 -> 0E+6
ddabs115 abs 0.0000 -> 0.0000
ddabs116 abs -0.0000 -> 0.0000
ddabs117 abs 0E-141 -> 0E-141
ddabs118 abs -0E-141 -> 0E-141
-- full coefficients, alternating bits
ddabs121 abs 2682682682682682 -> 2682682682682682
ddabs122 abs -2682682682682682 -> 2682682682682682
ddabs123 abs 1341341341341341 -> 1341341341341341
ddabs124 abs -1341341341341341 -> 1341341341341341
-- Nmax, Nmin, Ntiny
ddabs131 abs 9.999999999999999E+384 -> 9.999999999999999E+384
ddabs132 abs 1E-383 -> 1E-383
ddabs133 abs 1.000000000000000E-383 -> 1.000000000000000E-383
ddabs134 abs 1E-398 -> 1E-398 Subnormal
ddabs135 abs -1E-398 -> 1E-398 Subnormal
ddabs136 abs -1.000000000000000E-383 -> 1.000000000000000E-383
ddabs137 abs -1E-383 -> 1E-383
ddabs138 abs -9.999999999999999E+384 -> 9.999999999999999E+384
-- specials
ddabs520 abs 'Inf' -> 'Infinity'
ddabs521 abs '-Inf' -> 'Infinity'
ddabs522 abs NaN -> NaN
ddabs523 abs sNaN -> NaN Invalid_operation
ddabs524 abs NaN22 -> NaN22
ddabs525 abs sNaN33 -> NaN33 Invalid_operation
ddabs526 abs -NaN22 -> -NaN22
ddabs527 abs -sNaN33 -> -NaN33 Invalid_operation
-- Null tests
ddabs900 abs # -> NaN Invalid_operation

View File

@@ -0,0 +1,347 @@
------------------------------------------------------------------------
-- ddAnd.decTest -- digitwise logical AND for decDoubles --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check (truth table)
ddand001 and 0 0 -> 0
ddand002 and 0 1 -> 0
ddand003 and 1 0 -> 0
ddand004 and 1 1 -> 1
ddand005 and 1100 1010 -> 1000
-- and at msd and msd-1
-- 1234567890123456 1234567890123456 1234567890123456
ddand006 and 0000000000000000 0000000000000000 -> 0
ddand007 and 0000000000000000 1000000000000000 -> 0
ddand008 and 1000000000000000 0000000000000000 -> 0
ddand009 and 1000000000000000 1000000000000000 -> 1000000000000000
ddand010 and 0000000000000000 0000000000000000 -> 0
ddand011 and 0000000000000000 0100000000000000 -> 0
ddand012 and 0100000000000000 0000000000000000 -> 0
ddand013 and 0100000000000000 0100000000000000 -> 100000000000000
-- Various lengths
-- 1234567890123456 1234567890123456 1234567890123456
ddand021 and 1111111111111111 1111111111111111 -> 1111111111111111
ddand024 and 1111111111111111 111111111111111 -> 111111111111111
ddand025 and 1111111111111111 11111111111111 -> 11111111111111
ddand026 and 1111111111111111 1111111111111 -> 1111111111111
ddand027 and 1111111111111111 111111111111 -> 111111111111
ddand028 and 1111111111111111 11111111111 -> 11111111111
ddand029 and 1111111111111111 1111111111 -> 1111111111
ddand030 and 1111111111111111 111111111 -> 111111111
ddand031 and 1111111111111111 11111111 -> 11111111
ddand032 and 1111111111111111 1111111 -> 1111111
ddand033 and 1111111111111111 111111 -> 111111
ddand034 and 1111111111111111 11111 -> 11111
ddand035 and 1111111111111111 1111 -> 1111
ddand036 and 1111111111111111 111 -> 111
ddand037 and 1111111111111111 11 -> 11
ddand038 and 1111111111111111 1 -> 1
ddand039 and 1111111111111111 0 -> 0
ddand040 and 1111111111111111 1111111111111111 -> 1111111111111111
ddand041 and 111111111111111 1111111111111111 -> 111111111111111
ddand042 and 111111111111111 1111111111111111 -> 111111111111111
ddand043 and 11111111111111 1111111111111111 -> 11111111111111
ddand044 and 1111111111111 1111111111111111 -> 1111111111111
ddand045 and 111111111111 1111111111111111 -> 111111111111
ddand046 and 11111111111 1111111111111111 -> 11111111111
ddand047 and 1111111111 1111111111111111 -> 1111111111
ddand048 and 111111111 1111111111111111 -> 111111111
ddand049 and 11111111 1111111111111111 -> 11111111
ddand050 and 1111111 1111111111111111 -> 1111111
ddand051 and 111111 1111111111111111 -> 111111
ddand052 and 11111 1111111111111111 -> 11111
ddand053 and 1111 1111111111111111 -> 1111
ddand054 and 111 1111111111111111 -> 111
ddand055 and 11 1111111111111111 -> 11
ddand056 and 1 1111111111111111 -> 1
ddand057 and 0 1111111111111111 -> 0
ddand150 and 1111111111 1 -> 1
ddand151 and 111111111 1 -> 1
ddand152 and 11111111 1 -> 1
ddand153 and 1111111 1 -> 1
ddand154 and 111111 1 -> 1
ddand155 and 11111 1 -> 1
ddand156 and 1111 1 -> 1
ddand157 and 111 1 -> 1
ddand158 and 11 1 -> 1
ddand159 and 1 1 -> 1
ddand160 and 1111111111 0 -> 0
ddand161 and 111111111 0 -> 0
ddand162 and 11111111 0 -> 0
ddand163 and 1111111 0 -> 0
ddand164 and 111111 0 -> 0
ddand165 and 11111 0 -> 0
ddand166 and 1111 0 -> 0
ddand167 and 111 0 -> 0
ddand168 and 11 0 -> 0
ddand169 and 1 0 -> 0
ddand170 and 1 1111111111 -> 1
ddand171 and 1 111111111 -> 1
ddand172 and 1 11111111 -> 1
ddand173 and 1 1111111 -> 1
ddand174 and 1 111111 -> 1
ddand175 and 1 11111 -> 1
ddand176 and 1 1111 -> 1
ddand177 and 1 111 -> 1
ddand178 and 1 11 -> 1
ddand179 and 1 1 -> 1
ddand180 and 0 1111111111 -> 0
ddand181 and 0 111111111 -> 0
ddand182 and 0 11111111 -> 0
ddand183 and 0 1111111 -> 0
ddand184 and 0 111111 -> 0
ddand185 and 0 11111 -> 0
ddand186 and 0 1111 -> 0
ddand187 and 0 111 -> 0
ddand188 and 0 11 -> 0
ddand189 and 0 1 -> 0
ddand090 and 011111111 111111111 -> 11111111
ddand091 and 101111111 111111111 -> 101111111
ddand092 and 110111111 111111111 -> 110111111
ddand093 and 111011111 111111111 -> 111011111
ddand094 and 111101111 111111111 -> 111101111
ddand095 and 111110111 111111111 -> 111110111
ddand096 and 111111011 111111111 -> 111111011
ddand097 and 111111101 111111111 -> 111111101
ddand098 and 111111110 111111111 -> 111111110
ddand100 and 111111111 011111111 -> 11111111
ddand101 and 111111111 101111111 -> 101111111
ddand102 and 111111111 110111111 -> 110111111
ddand103 and 111111111 111011111 -> 111011111
ddand104 and 111111111 111101111 -> 111101111
ddand105 and 111111111 111110111 -> 111110111
ddand106 and 111111111 111111011 -> 111111011
ddand107 and 111111111 111111101 -> 111111101
ddand108 and 111111111 111111110 -> 111111110
-- non-0/1 should not be accepted, nor should signs
ddand220 and 111111112 111111111 -> NaN Invalid_operation
ddand221 and 333333333 333333333 -> NaN Invalid_operation
ddand222 and 555555555 555555555 -> NaN Invalid_operation
ddand223 and 777777777 777777777 -> NaN Invalid_operation
ddand224 and 999999999 999999999 -> NaN Invalid_operation
ddand225 and 222222222 999999999 -> NaN Invalid_operation
ddand226 and 444444444 999999999 -> NaN Invalid_operation
ddand227 and 666666666 999999999 -> NaN Invalid_operation
ddand228 and 888888888 999999999 -> NaN Invalid_operation
ddand229 and 999999999 222222222 -> NaN Invalid_operation
ddand230 and 999999999 444444444 -> NaN Invalid_operation
ddand231 and 999999999 666666666 -> NaN Invalid_operation
ddand232 and 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
ddand240 and 567468689 -934981942 -> NaN Invalid_operation
ddand241 and 567367689 934981942 -> NaN Invalid_operation
ddand242 and -631917772 -706014634 -> NaN Invalid_operation
ddand243 and -756253257 138579234 -> NaN Invalid_operation
ddand244 and 835590149 567435400 -> NaN Invalid_operation
-- test MSD
ddand250 and 2000000000000000 1000000000000000 -> NaN Invalid_operation
ddand251 and 7000000000000000 1000000000000000 -> NaN Invalid_operation
ddand252 and 8000000000000000 1000000000000000 -> NaN Invalid_operation
ddand253 and 9000000000000000 1000000000000000 -> NaN Invalid_operation
ddand254 and 2000000000000000 0000000000000000 -> NaN Invalid_operation
ddand255 and 7000000000000000 0000000000000000 -> NaN Invalid_operation
ddand256 and 8000000000000000 0000000000000000 -> NaN Invalid_operation
ddand257 and 9000000000000000 0000000000000000 -> NaN Invalid_operation
ddand258 and 1000000000000000 2000000000000000 -> NaN Invalid_operation
ddand259 and 1000000000000000 7000000000000000 -> NaN Invalid_operation
ddand260 and 1000000000000000 8000000000000000 -> NaN Invalid_operation
ddand261 and 1000000000000000 9000000000000000 -> NaN Invalid_operation
ddand262 and 0000000000000000 2000000000000000 -> NaN Invalid_operation
ddand263 and 0000000000000000 7000000000000000 -> NaN Invalid_operation
ddand264 and 0000000000000000 8000000000000000 -> NaN Invalid_operation
ddand265 and 0000000000000000 9000000000000000 -> NaN Invalid_operation
-- test MSD-1
ddand270 and 0200001000000000 1000100000000010 -> NaN Invalid_operation
ddand271 and 0700000100000000 1000010000000100 -> NaN Invalid_operation
ddand272 and 0800000010000000 1000001000001000 -> NaN Invalid_operation
ddand273 and 0900000001000000 1000000100010000 -> NaN Invalid_operation
ddand274 and 1000000000100000 0200000010100000 -> NaN Invalid_operation
ddand275 and 1000000000010000 0700000001000000 -> NaN Invalid_operation
ddand276 and 1000000000001000 0800000010100000 -> NaN Invalid_operation
ddand277 and 1000000000000100 0900000000010000 -> NaN Invalid_operation
-- test LSD
ddand280 and 0010000000000002 1000000100000001 -> NaN Invalid_operation
ddand281 and 0001000000000007 1000001000000011 -> NaN Invalid_operation
ddand282 and 0000100000000008 1000010000000001 -> NaN Invalid_operation
ddand283 and 0000010000000009 1000100000000001 -> NaN Invalid_operation
ddand284 and 1000001000000000 0001000000000002 -> NaN Invalid_operation
ddand285 and 1000000100000000 0010000000000007 -> NaN Invalid_operation
ddand286 and 1000000010000000 0100000000000008 -> NaN Invalid_operation
ddand287 and 1000000001000000 1000000000000009 -> NaN Invalid_operation
-- test Middie
ddand288 and 0010000020000000 1000001000000000 -> NaN Invalid_operation
ddand289 and 0001000070000001 1000000100000000 -> NaN Invalid_operation
ddand290 and 0000100080000010 1000000010000000 -> NaN Invalid_operation
ddand291 and 0000010090000100 1000000001000000 -> NaN Invalid_operation
ddand292 and 1000001000001000 0000000020100000 -> NaN Invalid_operation
ddand293 and 1000000100010000 0000000070010000 -> NaN Invalid_operation
ddand294 and 1000000010100000 0000000080001000 -> NaN Invalid_operation
ddand295 and 1000000001000000 0000000090000100 -> NaN Invalid_operation
-- signs
ddand296 and -1000000001000000 -0000010000000100 -> NaN Invalid_operation
ddand297 and -1000000001000000 0000000010000100 -> NaN Invalid_operation
ddand298 and 1000000001000000 -0000001000000100 -> NaN Invalid_operation
ddand299 and 1000000001000000 0000000011000100 -> 1000000
-- Nmax, Nmin, Ntiny-like
ddand331 and 2 9.99999999E+199 -> NaN Invalid_operation
ddand332 and 3 1E-199 -> NaN Invalid_operation
ddand333 and 4 1.00000000E-199 -> NaN Invalid_operation
ddand334 and 5 1E-100 -> NaN Invalid_operation
ddand335 and 6 -1E-100 -> NaN Invalid_operation
ddand336 and 7 -1.00000000E-199 -> NaN Invalid_operation
ddand337 and 8 -1E-199 -> NaN Invalid_operation
ddand338 and 9 -9.99999999E+199 -> NaN Invalid_operation
ddand341 and 9.99999999E+199 -18 -> NaN Invalid_operation
ddand342 and 1E-199 01 -> NaN Invalid_operation
ddand343 and 1.00000000E-199 -18 -> NaN Invalid_operation
ddand344 and 1E-100 18 -> NaN Invalid_operation
ddand345 and -1E-100 -10 -> NaN Invalid_operation
ddand346 and -1.00000000E-199 18 -> NaN Invalid_operation
ddand347 and -1E-199 10 -> NaN Invalid_operation
ddand348 and -9.99999999E+199 -18 -> NaN Invalid_operation
-- A few other non-integers
ddand361 and 1.0 1 -> NaN Invalid_operation
ddand362 and 1E+1 1 -> NaN Invalid_operation
ddand363 and 0.0 1 -> NaN Invalid_operation
ddand364 and 0E+1 1 -> NaN Invalid_operation
ddand365 and 9.9 1 -> NaN Invalid_operation
ddand366 and 9E+1 1 -> NaN Invalid_operation
ddand371 and 0 1.0 -> NaN Invalid_operation
ddand372 and 0 1E+1 -> NaN Invalid_operation
ddand373 and 0 0.0 -> NaN Invalid_operation
ddand374 and 0 0E+1 -> NaN Invalid_operation
ddand375 and 0 9.9 -> NaN Invalid_operation
ddand376 and 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
ddand780 and -Inf -Inf -> NaN Invalid_operation
ddand781 and -Inf -1000 -> NaN Invalid_operation
ddand782 and -Inf -1 -> NaN Invalid_operation
ddand783 and -Inf -0 -> NaN Invalid_operation
ddand784 and -Inf 0 -> NaN Invalid_operation
ddand785 and -Inf 1 -> NaN Invalid_operation
ddand786 and -Inf 1000 -> NaN Invalid_operation
ddand787 and -1000 -Inf -> NaN Invalid_operation
ddand788 and -Inf -Inf -> NaN Invalid_operation
ddand789 and -1 -Inf -> NaN Invalid_operation
ddand790 and -0 -Inf -> NaN Invalid_operation
ddand791 and 0 -Inf -> NaN Invalid_operation
ddand792 and 1 -Inf -> NaN Invalid_operation
ddand793 and 1000 -Inf -> NaN Invalid_operation
ddand794 and Inf -Inf -> NaN Invalid_operation
ddand800 and Inf -Inf -> NaN Invalid_operation
ddand801 and Inf -1000 -> NaN Invalid_operation
ddand802 and Inf -1 -> NaN Invalid_operation
ddand803 and Inf -0 -> NaN Invalid_operation
ddand804 and Inf 0 -> NaN Invalid_operation
ddand805 and Inf 1 -> NaN Invalid_operation
ddand806 and Inf 1000 -> NaN Invalid_operation
ddand807 and Inf Inf -> NaN Invalid_operation
ddand808 and -1000 Inf -> NaN Invalid_operation
ddand809 and -Inf Inf -> NaN Invalid_operation
ddand810 and -1 Inf -> NaN Invalid_operation
ddand811 and -0 Inf -> NaN Invalid_operation
ddand812 and 0 Inf -> NaN Invalid_operation
ddand813 and 1 Inf -> NaN Invalid_operation
ddand814 and 1000 Inf -> NaN Invalid_operation
ddand815 and Inf Inf -> NaN Invalid_operation
ddand821 and NaN -Inf -> NaN Invalid_operation
ddand822 and NaN -1000 -> NaN Invalid_operation
ddand823 and NaN -1 -> NaN Invalid_operation
ddand824 and NaN -0 -> NaN Invalid_operation
ddand825 and NaN 0 -> NaN Invalid_operation
ddand826 and NaN 1 -> NaN Invalid_operation
ddand827 and NaN 1000 -> NaN Invalid_operation
ddand828 and NaN Inf -> NaN Invalid_operation
ddand829 and NaN NaN -> NaN Invalid_operation
ddand830 and -Inf NaN -> NaN Invalid_operation
ddand831 and -1000 NaN -> NaN Invalid_operation
ddand832 and -1 NaN -> NaN Invalid_operation
ddand833 and -0 NaN -> NaN Invalid_operation
ddand834 and 0 NaN -> NaN Invalid_operation
ddand835 and 1 NaN -> NaN Invalid_operation
ddand836 and 1000 NaN -> NaN Invalid_operation
ddand837 and Inf NaN -> NaN Invalid_operation
ddand841 and sNaN -Inf -> NaN Invalid_operation
ddand842 and sNaN -1000 -> NaN Invalid_operation
ddand843 and sNaN -1 -> NaN Invalid_operation
ddand844 and sNaN -0 -> NaN Invalid_operation
ddand845 and sNaN 0 -> NaN Invalid_operation
ddand846 and sNaN 1 -> NaN Invalid_operation
ddand847 and sNaN 1000 -> NaN Invalid_operation
ddand848 and sNaN NaN -> NaN Invalid_operation
ddand849 and sNaN sNaN -> NaN Invalid_operation
ddand850 and NaN sNaN -> NaN Invalid_operation
ddand851 and -Inf sNaN -> NaN Invalid_operation
ddand852 and -1000 sNaN -> NaN Invalid_operation
ddand853 and -1 sNaN -> NaN Invalid_operation
ddand854 and -0 sNaN -> NaN Invalid_operation
ddand855 and 0 sNaN -> NaN Invalid_operation
ddand856 and 1 sNaN -> NaN Invalid_operation
ddand857 and 1000 sNaN -> NaN Invalid_operation
ddand858 and Inf sNaN -> NaN Invalid_operation
ddand859 and NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddand861 and NaN1 -Inf -> NaN Invalid_operation
ddand862 and +NaN2 -1000 -> NaN Invalid_operation
ddand863 and NaN3 1000 -> NaN Invalid_operation
ddand864 and NaN4 Inf -> NaN Invalid_operation
ddand865 and NaN5 +NaN6 -> NaN Invalid_operation
ddand866 and -Inf NaN7 -> NaN Invalid_operation
ddand867 and -1000 NaN8 -> NaN Invalid_operation
ddand868 and 1000 NaN9 -> NaN Invalid_operation
ddand869 and Inf +NaN10 -> NaN Invalid_operation
ddand871 and sNaN11 -Inf -> NaN Invalid_operation
ddand872 and sNaN12 -1000 -> NaN Invalid_operation
ddand873 and sNaN13 1000 -> NaN Invalid_operation
ddand874 and sNaN14 NaN17 -> NaN Invalid_operation
ddand875 and sNaN15 sNaN18 -> NaN Invalid_operation
ddand876 and NaN16 sNaN19 -> NaN Invalid_operation
ddand877 and -Inf +sNaN20 -> NaN Invalid_operation
ddand878 and -1000 sNaN21 -> NaN Invalid_operation
ddand879 and 1000 sNaN22 -> NaN Invalid_operation
ddand880 and Inf sNaN23 -> NaN Invalid_operation
ddand881 and +NaN25 +sNaN24 -> NaN Invalid_operation
ddand882 and -NaN26 NaN28 -> NaN Invalid_operation
ddand883 and -sNaN27 sNaN29 -> NaN Invalid_operation
ddand884 and 1000 -NaN30 -> NaN Invalid_operation
ddand885 and 1000 -sNaN31 -> NaN Invalid_operation

View File

@@ -0,0 +1,357 @@
------------------------------------------------------------------------
-- ddCanonical.decTest -- test decDouble canonical results --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- This file tests that copy operations leave uncanonical operands
-- unchanged, and vice versa
-- All operands and results are decDoubles.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Uncanonical declets are: abc, where:
-- a=1,2,3
-- b=6,7,e,f
-- c=e,f
-- assert some standard (canonical) values; this tests that FromString
-- produces canonical results (many more in decimalNN)
ddcan001 apply 9.999999999999999E+384 -> #77fcff3fcff3fcff
ddcan002 apply 0 -> #2238000000000000
ddcan003 apply 1 -> #2238000000000001
ddcan004 apply -1 -> #a238000000000001
ddcan005 apply Infinity -> #7800000000000000
ddcan006 apply -Infinity -> #f800000000000000
ddcan007 apply -NaN -> #fc00000000000000
ddcan008 apply -sNaN -> #fe00000000000000
ddcan009 apply NaN999999999999999 -> #7c00ff3fcff3fcff
ddcan010 apply sNaN999999999999999 -> #7e00ff3fcff3fcff
decan011 apply 9999999999999999 -> #6e38ff3fcff3fcff
ddcan012 apply 7.50 -> #22300000000003d0
ddcan013 apply 9.99 -> #22300000000000ff
-- Base tests for canonical encodings (individual operator
-- propagation is tested later)
-- Finites: declets in coefficient
ddcan021 canonical #77fcff3fcff3fcff -> #77fcff3fcff3fcff
ddcan022 canonical #77fcff3fcff3fcff -> #77fcff3fcff3fcff
ddcan023 canonical #77ffff3fcff3fcff -> #77fcff3fcff3fcff
ddcan024 canonical #77ffff3fcff3fcff -> #77fcff3fcff3fcff
ddcan025 canonical #77fcffffcff3fcff -> #77fcff3fcff3fcff
ddcan026 canonical #77fcffffcff3fcff -> #77fcff3fcff3fcff
ddcan027 canonical #77fcff3ffff3fcff -> #77fcff3fcff3fcff
ddcan028 canonical #77fcff3ffff3fcff -> #77fcff3fcff3fcff
ddcan030 canonical #77fcff3fcffffcff -> #77fcff3fcff3fcff
ddcan031 canonical #77fcff3fcffffcff -> #77fcff3fcff3fcff
ddcan032 canonical #77fcff3fcff3ffff -> #77fcff3fcff3fcff
ddcan033 canonical #77fcff3fcff3ffff -> #77fcff3fcff3fcff
ddcan035 canonical #77fcff3fdff3fcff -> #77fcff3fcff3fcff
ddcan036 canonical #77fcff3feff3fcff -> #77fcff3fcff3fcff
-- NaN: declets in payload
ddcan100 canonical NaN999999999999999 -> #7c00ff3fcff3fcff
ddcan101 canonical #7c00ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan102 canonical #7c03ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan103 canonical #7c00ffffcff3fcff -> #7c00ff3fcff3fcff
ddcan104 canonical #7c00ff3ffff3fcff -> #7c00ff3fcff3fcff
ddcan105 canonical #7c00ff3fcffffcff -> #7c00ff3fcff3fcff
ddcan106 canonical #7c00ff3fcff3ffff -> #7c00ff3fcff3fcff
ddcan107 canonical #7c00ff3fcff3ffff -> #7c00ff3fcff3fcff
-- NaN: exponent continuation bits [excluding sNaN selector]
ddcan110 canonical #7c00ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan112 canonical #7d00ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan113 canonical #7c80ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan114 canonical #7c40ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan115 canonical #7c20ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan116 canonical #7c10ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan117 canonical #7c08ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan118 canonical #7c04ff3fcff3fcff -> #7c00ff3fcff3fcff
-- sNaN: declets in payload
ddcan120 canonical sNaN999999999999999 -> #7e00ff3fcff3fcff
ddcan121 canonical #7e00ff3fcff3fcff -> #7e00ff3fcff3fcff
ddcan122 canonical #7e03ff3fcff3fcff -> #7e00ff3fcff3fcff
ddcan123 canonical #7e00ffffcff3fcff -> #7e00ff3fcff3fcff
ddcan124 canonical #7e00ff3ffff3fcff -> #7e00ff3fcff3fcff
ddcan125 canonical #7e00ff3fcffffcff -> #7e00ff3fcff3fcff
ddcan126 canonical #7e00ff3fcff3ffff -> #7e00ff3fcff3fcff
ddcan127 canonical #7e00ff3fcff3ffff -> #7e00ff3fcff3fcff
-- sNaN: exponent continuation bits [excluding sNaN selector]
ddcan130 canonical #7e00ff3fcff3fcff -> #7e00ff3fcff3fcff
ddcan132 canonical #7f00ff3fcff3fcff -> #7e00ff3fcff3fcff
ddcan133 canonical #7e80ff3fcff3fcff -> #7e00ff3fcff3fcff
ddcan134 canonical #7e40ff3fcff3fcff -> #7e00ff3fcff3fcff
ddcan135 canonical #7e20ff3fcff3fcff -> #7e00ff3fcff3fcff
ddcan136 canonical #7e10ff3fcff3fcff -> #7e00ff3fcff3fcff
ddcan137 canonical #7e08ff3fcff3fcff -> #7e00ff3fcff3fcff
ddcan138 canonical #7e04ff3fcff3fcff -> #7e00ff3fcff3fcff
-- Inf: exponent continuation bits
ddcan140 canonical #7800000000000000 -> #7800000000000000
ddcan141 canonical #7900000000000000 -> #7800000000000000
ddcan142 canonical #7a00000000000000 -> #7800000000000000
ddcan143 canonical #7880000000000000 -> #7800000000000000
ddcan144 canonical #7840000000000000 -> #7800000000000000
ddcan145 canonical #7820000000000000 -> #7800000000000000
ddcan146 canonical #7810000000000000 -> #7800000000000000
ddcan147 canonical #7808000000000000 -> #7800000000000000
ddcan148 canonical #7804000000000000 -> #7800000000000000
-- Inf: coefficient continuation bits (first, last, and a few others)
ddcan150 canonical #7800000000000000 -> #7800000000000000
ddcan151 canonical #7802000000000000 -> #7800000000000000
ddcan152 canonical #7800000000000001 -> #7800000000000000
ddcan153 canonical #7801000000000000 -> #7800000000000000
ddcan154 canonical #7800200000000000 -> #7800000000000000
ddcan155 canonical #7800080000000000 -> #7800000000000000
ddcan156 canonical #7800002000000000 -> #7800000000000000
ddcan157 canonical #7800000400000000 -> #7800000000000000
ddcan158 canonical #7800000040000000 -> #7800000000000000
ddcan159 canonical #7800000008000000 -> #7800000000000000
ddcan160 canonical #7800000000400000 -> #7800000000000000
ddcan161 canonical #7800000000020000 -> #7800000000000000
ddcan162 canonical #7800000000008000 -> #7800000000000000
ddcan163 canonical #7800000000000200 -> #7800000000000000
ddcan164 canonical #7800000000000040 -> #7800000000000000
ddcan165 canonical #7800000000000008 -> #7800000000000000
-- Now the operators -- trying to check paths that might fail to
-- canonicalize propagated operands
----- Add:
-- Finites: neutral 0
ddcan202 add 0E+384 #77ffff3fcff3fcff -> #77fcff3fcff3fcff
ddcan203 add #77fcffffcff3fcff 0E+384 -> #77fcff3fcff3fcff
-- tiny zero
ddcan204 add 0E-398 #77ffff3fcff3fcff -> #77fcff3fcff3fcff Rounded
ddcan205 add #77fcffffcff3fcff 0E-398 -> #77fcff3fcff3fcff Rounded
-- tiny non zero
ddcan206 add -1E-398 #77ffff3fcff3fcff -> #77fcff3fcff3fcff Inexact Rounded
ddcan207 add #77ffff3fcff3fcff -1E-398 -> #77fcff3fcff3fcff Inexact Rounded
-- NaN: declets in payload
ddcan211 add 0 #7c03ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan212 add #7c03ff3fcff3fcff 0 -> #7c00ff3fcff3fcff
-- NaN: exponent continuation bits [excluding sNaN selector]
ddcan213 add 0 #7c40ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan214 add #7c40ff3fcff3fcff 0 -> #7c00ff3fcff3fcff
-- sNaN: declets in payload
ddcan215 add 0 #7e00ffffcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
ddcan216 add #7e00ffffcff3fcff 0 -> #7c00ff3fcff3fcff Invalid_operation
-- sNaN: exponent continuation bits [excluding sNaN selector]
ddcan217 add 0 #7e80ff3fcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
ddcan218 add #7e80ff3fcff3fcff 0 -> #7c00ff3fcff3fcff Invalid_operation
-- Inf: exponent continuation bits
ddcan220 add 0 #7880000000000000 -> #7800000000000000
ddcan221 add #7880000000000000 0 -> #7800000000000000
-- Inf: coefficient continuation bits
ddcan222 add 0 #7802000000000000 -> #7800000000000000
ddcan223 add #7802000000000000 0 -> #7800000000000000
ddcan224 add 0 #7800000000000001 -> #7800000000000000
ddcan225 add #7800000000000001 0 -> #7800000000000000
ddcan226 add 0 #7800002000000000 -> #7800000000000000
ddcan227 add #7800002000000000 0 -> #7800000000000000
----- Class: [does not return encoded]
----- Compare:
ddcan231 compare -Inf 1 -> #a238000000000001
ddcan232 compare -Inf -Inf -> #2238000000000000
ddcan233 compare 1 -Inf -> #2238000000000001
ddcan234 compare #7c00ff3ffff3fcff -1000 -> #7c00ff3fcff3fcff
ddcan235 compare #7e00ff3ffff3fcff -1000 -> #7c00ff3fcff3fcff Invalid_operation
----- CompareSig:
ddcan241 comparesig -Inf 1 -> #a238000000000001
ddcan242 comparesig -Inf -Inf -> #2238000000000000
ddcan243 comparesig 1 -Inf -> #2238000000000001
ddcan244 comparesig #7c00ff3ffff3fcff -1000 -> #7c00ff3fcff3fcff Invalid_operation
ddcan245 comparesig #7e00ff3ffff3fcff -1000 -> #7c00ff3fcff3fcff Invalid_operation
----- Copy: [does not usually canonicalize]
-- finites
ddcan250 copy #77ffff3fcff3fcff -> #77ffff3fcff3fcff
ddcan251 copy #77fcff3fdff3fcff -> #77fcff3fdff3fcff
-- NaNs
ddcan252 copy #7c03ff3fcff3fcff -> #7c03ff3fcff3fcff
ddcan253 copy #7c00ff3fcff3ffff -> #7c00ff3fcff3ffff
ddcan254 copy #7d00ff3fcff3fcff -> #7d00ff3fcff3fcff
ddcan255 copy #7c04ff3fcff3fcff -> #7c04ff3fcff3fcff
-- sNaN
ddcan256 copy #7e00ff3fcffffcff -> #7e00ff3fcffffcff
ddcan257 copy #7e40ff3fcff3fcff -> #7e40ff3fcff3fcff
-- Inf
ddcan258 copy #7a00000000000000 -> #7a00000000000000
ddcan259 copy #7800200000000000 -> #7800200000000000
----- CopyAbs: [does not usually canonicalize]
-- finites
ddcan260 copyabs #f7ffff3fcff3fcff -> #77ffff3fcff3fcff
ddcan261 copyabs #f7fcff3fdff3fcff -> #77fcff3fdff3fcff
-- NaNs
ddcan262 copyabs #fc03ff3fcff3fcff -> #7c03ff3fcff3fcff
ddcan263 copyabs #fc00ff3fcff3ffff -> #7c00ff3fcff3ffff
ddcan264 copyabs #fd00ff3fcff3fcff -> #7d00ff3fcff3fcff
ddcan265 copyabs #fc04ff3fcff3fcff -> #7c04ff3fcff3fcff
-- sNaN
ddcan266 copyabs #fe00ff3fcffffcff -> #7e00ff3fcffffcff
ddcan267 copyabs #fe40ff3fcff3fcff -> #7e40ff3fcff3fcff
-- Inf
ddcan268 copyabs #fa00000000000000 -> #7a00000000000000
ddcan269 copyabs #f800200000000000 -> #7800200000000000
----- CopyNegate: [does not usually canonicalize]
-- finites
ddcan270 copynegate #77ffff3fcff3fcff -> #f7ffff3fcff3fcff
ddcan271 copynegate #77fcff3fdff3fcff -> #f7fcff3fdff3fcff
-- NaNs
ddcan272 copynegate #7c03ff3fcff3fcff -> #fc03ff3fcff3fcff
ddcan273 copynegate #7c00ff3fcff3ffff -> #fc00ff3fcff3ffff
ddcan274 copynegate #7d00ff3fcff3fcff -> #fd00ff3fcff3fcff
ddcan275 copynegate #7c04ff3fcff3fcff -> #fc04ff3fcff3fcff
-- sNaN
ddcan276 copynegate #7e00ff3fcffffcff -> #fe00ff3fcffffcff
ddcan277 copynegate #7e40ff3fcff3fcff -> #fe40ff3fcff3fcff
-- Inf
ddcan278 copynegate #7a00000000000000 -> #fa00000000000000
ddcan279 copynegate #7800200000000000 -> #f800200000000000
----- CopySign: [does not usually canonicalize]
-- finites
ddcan280 copysign #77ffff3fcff3fcff -1 -> #f7ffff3fcff3fcff
ddcan281 copysign #77fcff3fdff3fcff 1 -> #77fcff3fdff3fcff
-- NaNs
ddcan282 copysign #7c03ff3fcff3fcff -1 -> #fc03ff3fcff3fcff
ddcan283 copysign #7c00ff3fcff3ffff 1 -> #7c00ff3fcff3ffff
ddcan284 copysign #7d00ff3fcff3fcff -1 -> #fd00ff3fcff3fcff
ddcan285 copysign #7c04ff3fcff3fcff 1 -> #7c04ff3fcff3fcff
-- sNaN
ddcan286 copysign #7e00ff3fcffffcff -1 -> #fe00ff3fcffffcff
ddcan287 copysign #7e40ff3fcff3fcff 1 -> #7e40ff3fcff3fcff
-- Inf
ddcan288 copysign #7a00000000000000 -1 -> #fa00000000000000
ddcan289 copysign #7800200000000000 1 -> #7800200000000000
----- Multiply:
-- Finites: neutral 0
ddcan302 multiply 1 #77ffff3fcff3fcff -> #77fcff3fcff3fcff
ddcan303 multiply #77fcffffcff3fcff 1 -> #77fcff3fcff3fcff
-- negative
ddcan306 multiply -1 #77ffff3fcff3fcff -> #f7fcff3fcff3fcff
ddcan307 multiply #77fcffffcff3fcff -1 -> #f7fcff3fcff3fcff
-- NaN: declets in payload
ddcan311 multiply 1 #7c03ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan312 multiply #7c03ff3fcff3fcff 1 -> #7c00ff3fcff3fcff
-- NaN: exponent continuation bits [excluding sNaN selector]
ddcan313 multiply 1 #7c40ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan314 multiply #7c40ff3fcff3fcff 1 -> #7c00ff3fcff3fcff
-- sNaN: declets in payload
ddcan315 multiply 1 #7e00ffffcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
ddcan316 multiply #7e00ffffcff3fcff 1 -> #7c00ff3fcff3fcff Invalid_operation
-- sNaN: exponent continuation bits [excluding sNaN selector]
ddcan317 multiply 1 #7e80ff3fcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
ddcan318 multiply #7e80ff3fcff3fcff 1 -> #7c00ff3fcff3fcff Invalid_operation
-- Inf: exponent continuation bits
ddcan320 multiply 1 #7880000000000000 -> #7800000000000000
ddcan321 multiply #7880000000000000 1 -> #7800000000000000
-- Inf: coefficient continuation bits
ddcan322 multiply 1 #7802000000000000 -> #7800000000000000
ddcan323 multiply #7802000000000000 1 -> #7800000000000000
ddcan324 multiply 1 #7800000000000001 -> #7800000000000000
ddcan325 multiply #7800000000000001 1 -> #7800000000000000
ddcan326 multiply 1 #7800002000000000 -> #7800000000000000
ddcan327 multiply #7800002000000000 1 -> #7800000000000000
----- Quantize:
ddcan401 quantize #6e38ff3ffff3fcff 1 -> #6e38ff3fcff3fcff
ddcan402 quantize #6e38ff3fcff3fdff 0 -> #6e38ff3fcff3fcff
ddcan403 quantize #7880000000000000 Inf -> #7800000000000000
ddcan404 quantize #7802000000000000 -Inf -> #7800000000000000
ddcan410 quantize #7c03ff3fcff3fcff 1 -> #7c00ff3fcff3fcff
ddcan411 quantize #7c03ff3fcff3fcff 1 -> #7c00ff3fcff3fcff
ddcan412 quantize #7c40ff3fcff3fcff 1 -> #7c00ff3fcff3fcff
ddcan413 quantize #7c40ff3fcff3fcff 1 -> #7c00ff3fcff3fcff
ddcan414 quantize #7e00ffffcff3fcff 1 -> #7c00ff3fcff3fcff Invalid_operation
ddcan415 quantize #7e00ffffcff3fcff 1 -> #7c00ff3fcff3fcff Invalid_operation
ddcan416 quantize #7e80ff3fcff3fcff 1 -> #7c00ff3fcff3fcff Invalid_operation
ddcan417 quantize #7e80ff3fcff3fcff 1 -> #7c00ff3fcff3fcff Invalid_operation
----- Subtract:
-- Finites: neutral 0
ddcan502 subtract 0E+384 #77ffff3fcff3fcff -> #f7fcff3fcff3fcff
ddcan503 subtract #77fcffffcff3fcff 0E+384 -> #77fcff3fcff3fcff
-- tiny zero
ddcan504 subtract 0E-398 #77ffff3fcff3fcff -> #f7fcff3fcff3fcff Rounded
ddcan505 subtract #77fcffffcff3fcff 0E-398 -> #77fcff3fcff3fcff Rounded
-- tiny non zero
ddcan506 subtract -1E-398 #77ffff3fcff3fcff -> #f7fcff3fcff3fcff Inexact Rounded
ddcan507 subtract #77ffff3fcff3fcff -1E-398 -> #77fcff3fcff3fcff Inexact Rounded
-- NaN: declets in payload
ddcan511 subtract 0 #7c03ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan512 subtract #7c03ff3fcff3fcff 0 -> #7c00ff3fcff3fcff
-- NaN: exponent continuation bits [excluding sNaN selector]
ddcan513 subtract 0 #7c40ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan514 subtract #7c40ff3fcff3fcff 0 -> #7c00ff3fcff3fcff
-- sNaN: declets in payload
ddcan515 subtract 0 #7e00ffffcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
ddcan516 subtract #7e00ffffcff3fcff 0 -> #7c00ff3fcff3fcff Invalid_operation
-- sNaN: exponent continuation bits [excluding sNaN selector]
ddcan517 subtract 0 #7e80ff3fcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
ddcan518 subtract #7e80ff3fcff3fcff 0 -> #7c00ff3fcff3fcff Invalid_operation
-- Inf: exponent continuation bits
ddcan520 subtract 0 #7880000000000000 -> #f800000000000000
ddcan521 subtract #7880000000000000 0 -> #7800000000000000
-- Inf: coefficient continuation bits
ddcan522 subtract 0 #7802000000000000 -> #f800000000000000
ddcan523 subtract #7802000000000000 0 -> #7800000000000000
ddcan524 subtract 0 #7800000000000001 -> #f800000000000000
ddcan525 subtract #7800000000000001 0 -> #7800000000000000
ddcan526 subtract 0 #7800002000000000 -> #f800000000000000
ddcan527 subtract #7800002000000000 0 -> #7800000000000000
----- ToIntegral:
ddcan601 tointegralx #6e38ff3ffff3fcff -> #6e38ff3fcff3fcff
ddcan602 tointegralx #6e38ff3fcff3fdff -> #6e38ff3fcff3fcff
ddcan603 tointegralx #7880000000000000 -> #7800000000000000
ddcan604 tointegralx #7802000000000000 -> #7800000000000000
ddcan610 tointegralx #7c03ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan611 tointegralx #7c03ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan612 tointegralx #7c40ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan613 tointegralx #7c40ff3fcff3fcff -> #7c00ff3fcff3fcff
ddcan614 tointegralx #7e00ffffcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
ddcan615 tointegralx #7e00ffffcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
ddcan616 tointegralx #7e80ff3fcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
ddcan617 tointegralx #7e80ff3fcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
-- uncanonical 3999, 39.99, 3.99, 0.399, and negatives
ddcan618 tointegralx #2238000000000fff -> #2238000000000cff
ddcan619 tointegralx #2230000000000fff -> #2238000000000040 Inexact Rounded
ddcan620 tointegralx #222c000000000fff -> #2238000000000004 Inexact Rounded
ddcan621 tointegralx #2228000000000fff -> #2238000000000000 Inexact Rounded
ddcan622 tointegralx #a238000000000fff -> #a238000000000cff
ddcan623 tointegralx #a230000000000fff -> #a238000000000040 Inexact Rounded
ddcan624 tointegralx #a22c000000000fff -> #a238000000000004 Inexact Rounded
ddcan625 tointegralx #a228000000000fff -> #a238000000000000 Inexact Rounded

View File

@@ -0,0 +1,76 @@
------------------------------------------------------------------------
-- ddClass.decTest -- decDouble Class operations --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- [New 2006.11.27]
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
ddcla001 class 0 -> +Zero
ddcla002 class 0.00 -> +Zero
ddcla003 class 0E+5 -> +Zero
ddcla004 class 1E-396 -> +Subnormal
ddcla005 class 0.1E-383 -> +Subnormal
ddcla006 class 0.999999999999999E-383 -> +Subnormal
ddcla007 class 1.000000000000000E-383 -> +Normal
ddcla008 class 1E-383 -> +Normal
ddcla009 class 1E-100 -> +Normal
ddcla010 class 1E-10 -> +Normal
ddcla012 class 1E-1 -> +Normal
ddcla013 class 1 -> +Normal
ddcla014 class 2.50 -> +Normal
ddcla015 class 100.100 -> +Normal
ddcla016 class 1E+30 -> +Normal
ddcla017 class 1E+384 -> +Normal
ddcla018 class 9.999999999999999E+384 -> +Normal
ddcla019 class Inf -> +Infinity
ddcla021 class -0 -> -Zero
ddcla022 class -0.00 -> -Zero
ddcla023 class -0E+5 -> -Zero
ddcla024 class -1E-396 -> -Subnormal
ddcla025 class -0.1E-383 -> -Subnormal
ddcla026 class -0.999999999999999E-383 -> -Subnormal
ddcla027 class -1.000000000000000E-383 -> -Normal
ddcla028 class -1E-383 -> -Normal
ddcla029 class -1E-100 -> -Normal
ddcla030 class -1E-10 -> -Normal
ddcla032 class -1E-1 -> -Normal
ddcla033 class -1 -> -Normal
ddcla034 class -2.50 -> -Normal
ddcla035 class -100.100 -> -Normal
ddcla036 class -1E+30 -> -Normal
ddcla037 class -1E+384 -> -Normal
ddcla038 class -9.999999999999999E+384 -> -Normal
ddcla039 class -Inf -> -Infinity
ddcla041 class NaN -> NaN
ddcla042 class -NaN -> NaN
ddcla043 class +NaN12345 -> NaN
ddcla044 class sNaN -> sNaN
ddcla045 class -sNaN -> sNaN
ddcla046 class +sNaN12345 -> sNaN

View File

@@ -0,0 +1,744 @@
------------------------------------------------------------------------
-- ddCompare.decTest -- decDouble comparison that allows quiet NaNs --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Note that we cannot assume add/subtract tests cover paths adequately,
-- here, because the code might be quite different (comparison cannot
-- overflow or underflow, so actual subtractions are not necessary).
-- All operands and results are decDoubles.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- sanity checks
ddcom001 compare -2 -2 -> 0
ddcom002 compare -2 -1 -> -1
ddcom003 compare -2 0 -> -1
ddcom004 compare -2 1 -> -1
ddcom005 compare -2 2 -> -1
ddcom006 compare -1 -2 -> 1
ddcom007 compare -1 -1 -> 0
ddcom008 compare -1 0 -> -1
ddcom009 compare -1 1 -> -1
ddcom010 compare -1 2 -> -1
ddcom011 compare 0 -2 -> 1
ddcom012 compare 0 -1 -> 1
ddcom013 compare 0 0 -> 0
ddcom014 compare 0 1 -> -1
ddcom015 compare 0 2 -> -1
ddcom016 compare 1 -2 -> 1
ddcom017 compare 1 -1 -> 1
ddcom018 compare 1 0 -> 1
ddcom019 compare 1 1 -> 0
ddcom020 compare 1 2 -> -1
ddcom021 compare 2 -2 -> 1
ddcom022 compare 2 -1 -> 1
ddcom023 compare 2 0 -> 1
ddcom025 compare 2 1 -> 1
ddcom026 compare 2 2 -> 0
ddcom031 compare -20 -20 -> 0
ddcom032 compare -20 -10 -> -1
ddcom033 compare -20 00 -> -1
ddcom034 compare -20 10 -> -1
ddcom035 compare -20 20 -> -1
ddcom036 compare -10 -20 -> 1
ddcom037 compare -10 -10 -> 0
ddcom038 compare -10 00 -> -1
ddcom039 compare -10 10 -> -1
ddcom040 compare -10 20 -> -1
ddcom041 compare 00 -20 -> 1
ddcom042 compare 00 -10 -> 1
ddcom043 compare 00 00 -> 0
ddcom044 compare 00 10 -> -1
ddcom045 compare 00 20 -> -1
ddcom046 compare 10 -20 -> 1
ddcom047 compare 10 -10 -> 1
ddcom048 compare 10 00 -> 1
ddcom049 compare 10 10 -> 0
ddcom050 compare 10 20 -> -1
ddcom051 compare 20 -20 -> 1
ddcom052 compare 20 -10 -> 1
ddcom053 compare 20 00 -> 1
ddcom055 compare 20 10 -> 1
ddcom056 compare 20 20 -> 0
ddcom061 compare -2.0 -2.0 -> 0
ddcom062 compare -2.0 -1.0 -> -1
ddcom063 compare -2.0 0.0 -> -1
ddcom064 compare -2.0 1.0 -> -1
ddcom065 compare -2.0 2.0 -> -1
ddcom066 compare -1.0 -2.0 -> 1
ddcom067 compare -1.0 -1.0 -> 0
ddcom068 compare -1.0 0.0 -> -1
ddcom069 compare -1.0 1.0 -> -1
ddcom070 compare -1.0 2.0 -> -1
ddcom071 compare 0.0 -2.0 -> 1
ddcom072 compare 0.0 -1.0 -> 1
ddcom073 compare 0.0 0.0 -> 0
ddcom074 compare 0.0 1.0 -> -1
ddcom075 compare 0.0 2.0 -> -1
ddcom076 compare 1.0 -2.0 -> 1
ddcom077 compare 1.0 -1.0 -> 1
ddcom078 compare 1.0 0.0 -> 1
ddcom079 compare 1.0 1.0 -> 0
ddcom080 compare 1.0 2.0 -> -1
ddcom081 compare 2.0 -2.0 -> 1
ddcom082 compare 2.0 -1.0 -> 1
ddcom083 compare 2.0 0.0 -> 1
ddcom085 compare 2.0 1.0 -> 1
ddcom086 compare 2.0 2.0 -> 0
ddcom087 compare 1.0 0.1 -> 1
ddcom088 compare 0.1 1.0 -> -1
-- now some cases which might overflow if subtract were used
ddcom095 compare 9.999999999999999E+384 9.999999999999999E+384 -> 0
ddcom096 compare -9.999999999999999E+384 9.999999999999999E+384 -> -1
ddcom097 compare 9.999999999999999E+384 -9.999999999999999E+384 -> 1
ddcom098 compare -9.999999999999999E+384 -9.999999999999999E+384 -> 0
-- some differing length/exponent cases
ddcom100 compare 7.0 7.0 -> 0
ddcom101 compare 7.0 7 -> 0
ddcom102 compare 7 7.0 -> 0
ddcom103 compare 7E+0 7.0 -> 0
ddcom104 compare 70E-1 7.0 -> 0
ddcom105 compare 0.7E+1 7 -> 0
ddcom106 compare 70E-1 7 -> 0
ddcom107 compare 7.0 7E+0 -> 0
ddcom108 compare 7.0 70E-1 -> 0
ddcom109 compare 7 0.7E+1 -> 0
ddcom110 compare 7 70E-1 -> 0
ddcom120 compare 8.0 7.0 -> 1
ddcom121 compare 8.0 7 -> 1
ddcom122 compare 8 7.0 -> 1
ddcom123 compare 8E+0 7.0 -> 1
ddcom124 compare 80E-1 7.0 -> 1
ddcom125 compare 0.8E+1 7 -> 1
ddcom126 compare 80E-1 7 -> 1
ddcom127 compare 8.0 7E+0 -> 1
ddcom128 compare 8.0 70E-1 -> 1
ddcom129 compare 8 0.7E+1 -> 1
ddcom130 compare 8 70E-1 -> 1
ddcom140 compare 8.0 9.0 -> -1
ddcom141 compare 8.0 9 -> -1
ddcom142 compare 8 9.0 -> -1
ddcom143 compare 8E+0 9.0 -> -1
ddcom144 compare 80E-1 9.0 -> -1
ddcom145 compare 0.8E+1 9 -> -1
ddcom146 compare 80E-1 9 -> -1
ddcom147 compare 8.0 9E+0 -> -1
ddcom148 compare 8.0 90E-1 -> -1
ddcom149 compare 8 0.9E+1 -> -1
ddcom150 compare 8 90E-1 -> -1
-- and again, with sign changes -+ ..
ddcom200 compare -7.0 7.0 -> -1
ddcom201 compare -7.0 7 -> -1
ddcom202 compare -7 7.0 -> -1
ddcom203 compare -7E+0 7.0 -> -1
ddcom204 compare -70E-1 7.0 -> -1
ddcom205 compare -0.7E+1 7 -> -1
ddcom206 compare -70E-1 7 -> -1
ddcom207 compare -7.0 7E+0 -> -1
ddcom208 compare -7.0 70E-1 -> -1
ddcom209 compare -7 0.7E+1 -> -1
ddcom210 compare -7 70E-1 -> -1
ddcom220 compare -8.0 7.0 -> -1
ddcom221 compare -8.0 7 -> -1
ddcom222 compare -8 7.0 -> -1
ddcom223 compare -8E+0 7.0 -> -1
ddcom224 compare -80E-1 7.0 -> -1
ddcom225 compare -0.8E+1 7 -> -1
ddcom226 compare -80E-1 7 -> -1
ddcom227 compare -8.0 7E+0 -> -1
ddcom228 compare -8.0 70E-1 -> -1
ddcom229 compare -8 0.7E+1 -> -1
ddcom230 compare -8 70E-1 -> -1
ddcom240 compare -8.0 9.0 -> -1
ddcom241 compare -8.0 9 -> -1
ddcom242 compare -8 9.0 -> -1
ddcom243 compare -8E+0 9.0 -> -1
ddcom244 compare -80E-1 9.0 -> -1
ddcom245 compare -0.8E+1 9 -> -1
ddcom246 compare -80E-1 9 -> -1
ddcom247 compare -8.0 9E+0 -> -1
ddcom248 compare -8.0 90E-1 -> -1
ddcom249 compare -8 0.9E+1 -> -1
ddcom250 compare -8 90E-1 -> -1
-- and again, with sign changes +- ..
ddcom300 compare 7.0 -7.0 -> 1
ddcom301 compare 7.0 -7 -> 1
ddcom302 compare 7 -7.0 -> 1
ddcom303 compare 7E+0 -7.0 -> 1
ddcom304 compare 70E-1 -7.0 -> 1
ddcom305 compare .7E+1 -7 -> 1
ddcom306 compare 70E-1 -7 -> 1
ddcom307 compare 7.0 -7E+0 -> 1
ddcom308 compare 7.0 -70E-1 -> 1
ddcom309 compare 7 -.7E+1 -> 1
ddcom310 compare 7 -70E-1 -> 1
ddcom320 compare 8.0 -7.0 -> 1
ddcom321 compare 8.0 -7 -> 1
ddcom322 compare 8 -7.0 -> 1
ddcom323 compare 8E+0 -7.0 -> 1
ddcom324 compare 80E-1 -7.0 -> 1
ddcom325 compare .8E+1 -7 -> 1
ddcom326 compare 80E-1 -7 -> 1
ddcom327 compare 8.0 -7E+0 -> 1
ddcom328 compare 8.0 -70E-1 -> 1
ddcom329 compare 8 -.7E+1 -> 1
ddcom330 compare 8 -70E-1 -> 1
ddcom340 compare 8.0 -9.0 -> 1
ddcom341 compare 8.0 -9 -> 1
ddcom342 compare 8 -9.0 -> 1
ddcom343 compare 8E+0 -9.0 -> 1
ddcom344 compare 80E-1 -9.0 -> 1
ddcom345 compare .8E+1 -9 -> 1
ddcom346 compare 80E-1 -9 -> 1
ddcom347 compare 8.0 -9E+0 -> 1
ddcom348 compare 8.0 -90E-1 -> 1
ddcom349 compare 8 -.9E+1 -> 1
ddcom350 compare 8 -90E-1 -> 1
-- and again, with sign changes -- ..
ddcom400 compare -7.0 -7.0 -> 0
ddcom401 compare -7.0 -7 -> 0
ddcom402 compare -7 -7.0 -> 0
ddcom403 compare -7E+0 -7.0 -> 0
ddcom404 compare -70E-1 -7.0 -> 0
ddcom405 compare -.7E+1 -7 -> 0
ddcom406 compare -70E-1 -7 -> 0
ddcom407 compare -7.0 -7E+0 -> 0
ddcom408 compare -7.0 -70E-1 -> 0
ddcom409 compare -7 -.7E+1 -> 0
ddcom410 compare -7 -70E-1 -> 0
ddcom420 compare -8.0 -7.0 -> -1
ddcom421 compare -8.0 -7 -> -1
ddcom422 compare -8 -7.0 -> -1
ddcom423 compare -8E+0 -7.0 -> -1
ddcom424 compare -80E-1 -7.0 -> -1
ddcom425 compare -.8E+1 -7 -> -1
ddcom426 compare -80E-1 -7 -> -1
ddcom427 compare -8.0 -7E+0 -> -1
ddcom428 compare -8.0 -70E-1 -> -1
ddcom429 compare -8 -.7E+1 -> -1
ddcom430 compare -8 -70E-1 -> -1
ddcom440 compare -8.0 -9.0 -> 1
ddcom441 compare -8.0 -9 -> 1
ddcom442 compare -8 -9.0 -> 1
ddcom443 compare -8E+0 -9.0 -> 1
ddcom444 compare -80E-1 -9.0 -> 1
ddcom445 compare -.8E+1 -9 -> 1
ddcom446 compare -80E-1 -9 -> 1
ddcom447 compare -8.0 -9E+0 -> 1
ddcom448 compare -8.0 -90E-1 -> 1
ddcom449 compare -8 -.9E+1 -> 1
ddcom450 compare -8 -90E-1 -> 1
-- misalignment traps for little-endian
ddcom451 compare 1.0 0.1 -> 1
ddcom452 compare 0.1 1.0 -> -1
ddcom453 compare 10.0 0.1 -> 1
ddcom454 compare 0.1 10.0 -> -1
ddcom455 compare 100 1.0 -> 1
ddcom456 compare 1.0 100 -> -1
ddcom457 compare 1000 10.0 -> 1
ddcom458 compare 10.0 1000 -> -1
ddcom459 compare 10000 100.0 -> 1
ddcom460 compare 100.0 10000 -> -1
ddcom461 compare 100000 1000.0 -> 1
ddcom462 compare 1000.0 100000 -> -1
ddcom463 compare 1000000 10000.0 -> 1
ddcom464 compare 10000.0 1000000 -> -1
-- testcases that subtract to lots of zeros at boundaries [pgr]
ddcom473 compare 123.4560000000000E-89 123.456E-89 -> 0
ddcom474 compare 123.456000000000E+89 123.456E+89 -> 0
ddcom475 compare 123.45600000000E-89 123.456E-89 -> 0
ddcom476 compare 123.4560000000E+89 123.456E+89 -> 0
ddcom477 compare 123.456000000E-89 123.456E-89 -> 0
ddcom478 compare 123.45600000E+89 123.456E+89 -> 0
ddcom479 compare 123.4560000E-89 123.456E-89 -> 0
ddcom480 compare 123.456000E+89 123.456E+89 -> 0
ddcom481 compare 123.45600E-89 123.456E-89 -> 0
ddcom482 compare 123.4560E+89 123.456E+89 -> 0
ddcom483 compare 123.456E-89 123.456E-89 -> 0
ddcom487 compare 123.456E+89 123.4560000000000E+89 -> 0
ddcom488 compare 123.456E-89 123.456000000000E-89 -> 0
ddcom489 compare 123.456E+89 123.45600000000E+89 -> 0
ddcom490 compare 123.456E-89 123.4560000000E-89 -> 0
ddcom491 compare 123.456E+89 123.456000000E+89 -> 0
ddcom492 compare 123.456E-89 123.45600000E-89 -> 0
ddcom493 compare 123.456E+89 123.4560000E+89 -> 0
ddcom494 compare 123.456E-89 123.456000E-89 -> 0
ddcom495 compare 123.456E+89 123.45600E+89 -> 0
ddcom496 compare 123.456E-89 123.4560E-89 -> 0
ddcom497 compare 123.456E+89 123.456E+89 -> 0
-- wide-ranging, around precision; signs equal
ddcom500 compare 1 1E-15 -> 1
ddcom501 compare 1 1E-14 -> 1
ddcom502 compare 1 1E-13 -> 1
ddcom503 compare 1 1E-12 -> 1
ddcom504 compare 1 1E-11 -> 1
ddcom505 compare 1 1E-10 -> 1
ddcom506 compare 1 1E-9 -> 1
ddcom507 compare 1 1E-8 -> 1
ddcom508 compare 1 1E-7 -> 1
ddcom509 compare 1 1E-6 -> 1
ddcom510 compare 1 1E-5 -> 1
ddcom511 compare 1 1E-4 -> 1
ddcom512 compare 1 1E-3 -> 1
ddcom513 compare 1 1E-2 -> 1
ddcom514 compare 1 1E-1 -> 1
ddcom515 compare 1 1E-0 -> 0
ddcom516 compare 1 1E+1 -> -1
ddcom517 compare 1 1E+2 -> -1
ddcom518 compare 1 1E+3 -> -1
ddcom519 compare 1 1E+4 -> -1
ddcom521 compare 1 1E+5 -> -1
ddcom522 compare 1 1E+6 -> -1
ddcom523 compare 1 1E+7 -> -1
ddcom524 compare 1 1E+8 -> -1
ddcom525 compare 1 1E+9 -> -1
ddcom526 compare 1 1E+10 -> -1
ddcom527 compare 1 1E+11 -> -1
ddcom528 compare 1 1E+12 -> -1
ddcom529 compare 1 1E+13 -> -1
ddcom530 compare 1 1E+14 -> -1
ddcom531 compare 1 1E+15 -> -1
-- LR swap
ddcom540 compare 1E-15 1 -> -1
ddcom541 compare 1E-14 1 -> -1
ddcom542 compare 1E-13 1 -> -1
ddcom543 compare 1E-12 1 -> -1
ddcom544 compare 1E-11 1 -> -1
ddcom545 compare 1E-10 1 -> -1
ddcom546 compare 1E-9 1 -> -1
ddcom547 compare 1E-8 1 -> -1
ddcom548 compare 1E-7 1 -> -1
ddcom549 compare 1E-6 1 -> -1
ddcom550 compare 1E-5 1 -> -1
ddcom551 compare 1E-4 1 -> -1
ddcom552 compare 1E-3 1 -> -1
ddcom553 compare 1E-2 1 -> -1
ddcom554 compare 1E-1 1 -> -1
ddcom555 compare 1E-0 1 -> 0
ddcom556 compare 1E+1 1 -> 1
ddcom557 compare 1E+2 1 -> 1
ddcom558 compare 1E+3 1 -> 1
ddcom559 compare 1E+4 1 -> 1
ddcom561 compare 1E+5 1 -> 1
ddcom562 compare 1E+6 1 -> 1
ddcom563 compare 1E+7 1 -> 1
ddcom564 compare 1E+8 1 -> 1
ddcom565 compare 1E+9 1 -> 1
ddcom566 compare 1E+10 1 -> 1
ddcom567 compare 1E+11 1 -> 1
ddcom568 compare 1E+12 1 -> 1
ddcom569 compare 1E+13 1 -> 1
ddcom570 compare 1E+14 1 -> 1
ddcom571 compare 1E+15 1 -> 1
-- similar with a useful coefficient, one side only
ddcom580 compare 0.000000987654321 1E-15 -> 1
ddcom581 compare 0.000000987654321 1E-14 -> 1
ddcom582 compare 0.000000987654321 1E-13 -> 1
ddcom583 compare 0.000000987654321 1E-12 -> 1
ddcom584 compare 0.000000987654321 1E-11 -> 1
ddcom585 compare 0.000000987654321 1E-10 -> 1
ddcom586 compare 0.000000987654321 1E-9 -> 1
ddcom587 compare 0.000000987654321 1E-8 -> 1
ddcom588 compare 0.000000987654321 1E-7 -> 1
ddcom589 compare 0.000000987654321 1E-6 -> -1
ddcom590 compare 0.000000987654321 1E-5 -> -1
ddcom591 compare 0.000000987654321 1E-4 -> -1
ddcom592 compare 0.000000987654321 1E-3 -> -1
ddcom593 compare 0.000000987654321 1E-2 -> -1
ddcom594 compare 0.000000987654321 1E-1 -> -1
ddcom595 compare 0.000000987654321 1E-0 -> -1
ddcom596 compare 0.000000987654321 1E+1 -> -1
ddcom597 compare 0.000000987654321 1E+2 -> -1
ddcom598 compare 0.000000987654321 1E+3 -> -1
ddcom599 compare 0.000000987654321 1E+4 -> -1
-- check some unit-y traps
ddcom600 compare 12 12.2345 -> -1
ddcom601 compare 12.0 12.2345 -> -1
ddcom602 compare 12.00 12.2345 -> -1
ddcom603 compare 12.000 12.2345 -> -1
ddcom604 compare 12.0000 12.2345 -> -1
ddcom605 compare 12.00000 12.2345 -> -1
ddcom606 compare 12.000000 12.2345 -> -1
ddcom607 compare 12.0000000 12.2345 -> -1
ddcom608 compare 12.00000000 12.2345 -> -1
ddcom609 compare 12.000000000 12.2345 -> -1
ddcom610 compare 12.1234 12 -> 1
ddcom611 compare 12.1234 12.0 -> 1
ddcom612 compare 12.1234 12.00 -> 1
ddcom613 compare 12.1234 12.000 -> 1
ddcom614 compare 12.1234 12.0000 -> 1
ddcom615 compare 12.1234 12.00000 -> 1
ddcom616 compare 12.1234 12.000000 -> 1
ddcom617 compare 12.1234 12.0000000 -> 1
ddcom618 compare 12.1234 12.00000000 -> 1
ddcom619 compare 12.1234 12.000000000 -> 1
ddcom620 compare -12 -12.2345 -> 1
ddcom621 compare -12.0 -12.2345 -> 1
ddcom622 compare -12.00 -12.2345 -> 1
ddcom623 compare -12.000 -12.2345 -> 1
ddcom624 compare -12.0000 -12.2345 -> 1
ddcom625 compare -12.00000 -12.2345 -> 1
ddcom626 compare -12.000000 -12.2345 -> 1
ddcom627 compare -12.0000000 -12.2345 -> 1
ddcom628 compare -12.00000000 -12.2345 -> 1
ddcom629 compare -12.000000000 -12.2345 -> 1
ddcom630 compare -12.1234 -12 -> -1
ddcom631 compare -12.1234 -12.0 -> -1
ddcom632 compare -12.1234 -12.00 -> -1
ddcom633 compare -12.1234 -12.000 -> -1
ddcom634 compare -12.1234 -12.0000 -> -1
ddcom635 compare -12.1234 -12.00000 -> -1
ddcom636 compare -12.1234 -12.000000 -> -1
ddcom637 compare -12.1234 -12.0000000 -> -1
ddcom638 compare -12.1234 -12.00000000 -> -1
ddcom639 compare -12.1234 -12.000000000 -> -1
-- extended zeros
ddcom640 compare 0 0 -> 0
ddcom641 compare 0 -0 -> 0
ddcom642 compare 0 -0.0 -> 0
ddcom643 compare 0 0.0 -> 0
ddcom644 compare -0 0 -> 0
ddcom645 compare -0 -0 -> 0
ddcom646 compare -0 -0.0 -> 0
ddcom647 compare -0 0.0 -> 0
ddcom648 compare 0.0 0 -> 0
ddcom649 compare 0.0 -0 -> 0
ddcom650 compare 0.0 -0.0 -> 0
ddcom651 compare 0.0 0.0 -> 0
ddcom652 compare -0.0 0 -> 0
ddcom653 compare -0.0 -0 -> 0
ddcom654 compare -0.0 -0.0 -> 0
ddcom655 compare -0.0 0.0 -> 0
ddcom656 compare -0E1 0.0 -> 0
ddcom657 compare -0E2 0.0 -> 0
ddcom658 compare 0E1 0.0 -> 0
ddcom659 compare 0E2 0.0 -> 0
ddcom660 compare -0E1 0 -> 0
ddcom661 compare -0E2 0 -> 0
ddcom662 compare 0E1 0 -> 0
ddcom663 compare 0E2 0 -> 0
ddcom664 compare -0E1 -0E1 -> 0
ddcom665 compare -0E2 -0E1 -> 0
ddcom666 compare 0E1 -0E1 -> 0
ddcom667 compare 0E2 -0E1 -> 0
ddcom668 compare -0E1 -0E2 -> 0
ddcom669 compare -0E2 -0E2 -> 0
ddcom670 compare 0E1 -0E2 -> 0
ddcom671 compare 0E2 -0E2 -> 0
ddcom672 compare -0E1 0E1 -> 0
ddcom673 compare -0E2 0E1 -> 0
ddcom674 compare 0E1 0E1 -> 0
ddcom675 compare 0E2 0E1 -> 0
ddcom676 compare -0E1 0E2 -> 0
ddcom677 compare -0E2 0E2 -> 0
ddcom678 compare 0E1 0E2 -> 0
ddcom679 compare 0E2 0E2 -> 0
-- trailing zeros; unit-y
ddcom680 compare 12 12 -> 0
ddcom681 compare 12 12.0 -> 0
ddcom682 compare 12 12.00 -> 0
ddcom683 compare 12 12.000 -> 0
ddcom684 compare 12 12.0000 -> 0
ddcom685 compare 12 12.00000 -> 0
ddcom686 compare 12 12.000000 -> 0
ddcom687 compare 12 12.0000000 -> 0
ddcom688 compare 12 12.00000000 -> 0
ddcom689 compare 12 12.000000000 -> 0
ddcom690 compare 12 12 -> 0
ddcom691 compare 12.0 12 -> 0
ddcom692 compare 12.00 12 -> 0
ddcom693 compare 12.000 12 -> 0
ddcom694 compare 12.0000 12 -> 0
ddcom695 compare 12.00000 12 -> 0
ddcom696 compare 12.000000 12 -> 0
ddcom697 compare 12.0000000 12 -> 0
ddcom698 compare 12.00000000 12 -> 0
ddcom699 compare 12.000000000 12 -> 0
-- first, second, & last digit
ddcom700 compare 1234567890123456 1234567890123455 -> 1
ddcom701 compare 1234567890123456 1234567890123456 -> 0
ddcom702 compare 1234567890123456 1234567890123457 -> -1
ddcom703 compare 1234567890123456 0234567890123456 -> 1
ddcom704 compare 1234567890123456 1234567890123456 -> 0
ddcom705 compare 1234567890123456 2234567890123456 -> -1
ddcom706 compare 1134567890123456 1034567890123456 -> 1
ddcom707 compare 1134567890123456 1134567890123456 -> 0
ddcom708 compare 1134567890123456 1234567890123456 -> -1
-- miscellaneous
ddcom721 compare 12345678000 1 -> 1
ddcom722 compare 1 12345678000 -> -1
ddcom723 compare 1234567800 1 -> 1
ddcom724 compare 1 1234567800 -> -1
ddcom725 compare 1234567890 1 -> 1
ddcom726 compare 1 1234567890 -> -1
ddcom727 compare 1234567891 1 -> 1
ddcom728 compare 1 1234567891 -> -1
ddcom729 compare 12345678901 1 -> 1
ddcom730 compare 1 12345678901 -> -1
ddcom731 compare 1234567896 1 -> 1
ddcom732 compare 1 1234567896 -> -1
-- residue cases at lower precision
ddcom740 compare 1 0.9999999 -> 1
ddcom741 compare 1 0.999999 -> 1
ddcom742 compare 1 0.99999 -> 1
ddcom743 compare 1 1.0000 -> 0
ddcom744 compare 1 1.00001 -> -1
ddcom745 compare 1 1.000001 -> -1
ddcom746 compare 1 1.0000001 -> -1
ddcom750 compare 0.9999999 1 -> -1
ddcom751 compare 0.999999 1 -> -1
ddcom752 compare 0.99999 1 -> -1
ddcom753 compare 1.0000 1 -> 0
ddcom754 compare 1.00001 1 -> 1
ddcom755 compare 1.000001 1 -> 1
ddcom756 compare 1.0000001 1 -> 1
-- Specials
ddcom780 compare Inf -Inf -> 1
ddcom781 compare Inf -1000 -> 1
ddcom782 compare Inf -1 -> 1
ddcom783 compare Inf -0 -> 1
ddcom784 compare Inf 0 -> 1
ddcom785 compare Inf 1 -> 1
ddcom786 compare Inf 1000 -> 1
ddcom787 compare Inf Inf -> 0
ddcom788 compare -1000 Inf -> -1
ddcom789 compare -Inf Inf -> -1
ddcom790 compare -1 Inf -> -1
ddcom791 compare -0 Inf -> -1
ddcom792 compare 0 Inf -> -1
ddcom793 compare 1 Inf -> -1
ddcom794 compare 1000 Inf -> -1
ddcom795 compare Inf Inf -> 0
ddcom800 compare -Inf -Inf -> 0
ddcom801 compare -Inf -1000 -> -1
ddcom802 compare -Inf -1 -> -1
ddcom803 compare -Inf -0 -> -1
ddcom804 compare -Inf 0 -> -1
ddcom805 compare -Inf 1 -> -1
ddcom806 compare -Inf 1000 -> -1
ddcom807 compare -Inf Inf -> -1
ddcom808 compare -Inf -Inf -> 0
ddcom809 compare -1000 -Inf -> 1
ddcom810 compare -1 -Inf -> 1
ddcom811 compare -0 -Inf -> 1
ddcom812 compare 0 -Inf -> 1
ddcom813 compare 1 -Inf -> 1
ddcom814 compare 1000 -Inf -> 1
ddcom815 compare Inf -Inf -> 1
ddcom821 compare NaN -Inf -> NaN
ddcom822 compare NaN -1000 -> NaN
ddcom823 compare NaN -1 -> NaN
ddcom824 compare NaN -0 -> NaN
ddcom825 compare NaN 0 -> NaN
ddcom826 compare NaN 1 -> NaN
ddcom827 compare NaN 1000 -> NaN
ddcom828 compare NaN Inf -> NaN
ddcom829 compare NaN NaN -> NaN
ddcom830 compare -Inf NaN -> NaN
ddcom831 compare -1000 NaN -> NaN
ddcom832 compare -1 NaN -> NaN
ddcom833 compare -0 NaN -> NaN
ddcom834 compare 0 NaN -> NaN
ddcom835 compare 1 NaN -> NaN
ddcom836 compare 1000 NaN -> NaN
ddcom837 compare Inf NaN -> NaN
ddcom838 compare -NaN -NaN -> -NaN
ddcom839 compare +NaN -NaN -> NaN
ddcom840 compare -NaN +NaN -> -NaN
ddcom841 compare sNaN -Inf -> NaN Invalid_operation
ddcom842 compare sNaN -1000 -> NaN Invalid_operation
ddcom843 compare sNaN -1 -> NaN Invalid_operation
ddcom844 compare sNaN -0 -> NaN Invalid_operation
ddcom845 compare sNaN 0 -> NaN Invalid_operation
ddcom846 compare sNaN 1 -> NaN Invalid_operation
ddcom847 compare sNaN 1000 -> NaN Invalid_operation
ddcom848 compare sNaN NaN -> NaN Invalid_operation
ddcom849 compare sNaN sNaN -> NaN Invalid_operation
ddcom850 compare NaN sNaN -> NaN Invalid_operation
ddcom851 compare -Inf sNaN -> NaN Invalid_operation
ddcom852 compare -1000 sNaN -> NaN Invalid_operation
ddcom853 compare -1 sNaN -> NaN Invalid_operation
ddcom854 compare -0 sNaN -> NaN Invalid_operation
ddcom855 compare 0 sNaN -> NaN Invalid_operation
ddcom856 compare 1 sNaN -> NaN Invalid_operation
ddcom857 compare 1000 sNaN -> NaN Invalid_operation
ddcom858 compare Inf sNaN -> NaN Invalid_operation
ddcom859 compare NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddcom860 compare NaN9 -Inf -> NaN9
ddcom861 compare NaN8 999 -> NaN8
ddcom862 compare NaN77 Inf -> NaN77
ddcom863 compare -NaN67 NaN5 -> -NaN67
ddcom864 compare -Inf -NaN4 -> -NaN4
ddcom865 compare -999 -NaN33 -> -NaN33
ddcom866 compare Inf NaN2 -> NaN2
ddcom867 compare -NaN41 -NaN42 -> -NaN41
ddcom868 compare +NaN41 -NaN42 -> NaN41
ddcom869 compare -NaN41 +NaN42 -> -NaN41
ddcom870 compare +NaN41 +NaN42 -> NaN41
ddcom871 compare -sNaN99 -Inf -> -NaN99 Invalid_operation
ddcom872 compare sNaN98 -11 -> NaN98 Invalid_operation
ddcom873 compare sNaN97 NaN -> NaN97 Invalid_operation
ddcom874 compare sNaN16 sNaN94 -> NaN16 Invalid_operation
ddcom875 compare NaN85 sNaN83 -> NaN83 Invalid_operation
ddcom876 compare -Inf sNaN92 -> NaN92 Invalid_operation
ddcom877 compare 088 sNaN81 -> NaN81 Invalid_operation
ddcom878 compare Inf sNaN90 -> NaN90 Invalid_operation
ddcom879 compare NaN -sNaN89 -> -NaN89 Invalid_operation
-- wide range
ddcom880 compare +1.23456789012345E-0 9E+384 -> -1
ddcom881 compare 9E+384 +1.23456789012345E-0 -> 1
ddcom882 compare +0.100 9E-383 -> 1
ddcom883 compare 9E-383 +0.100 -> -1
ddcom885 compare -1.23456789012345E-0 9E+384 -> -1
ddcom886 compare 9E+384 -1.23456789012345E-0 -> 1
ddcom887 compare -0.100 9E-383 -> -1
ddcom888 compare 9E-383 -0.100 -> 1
-- spread zeros
ddcom900 compare 0E-383 0 -> 0
ddcom901 compare 0E-383 -0 -> 0
ddcom902 compare -0E-383 0 -> 0
ddcom903 compare -0E-383 -0 -> 0
ddcom904 compare 0E-383 0E+384 -> 0
ddcom905 compare 0E-383 -0E+384 -> 0
ddcom906 compare -0E-383 0E+384 -> 0
ddcom907 compare -0E-383 -0E+384 -> 0
ddcom908 compare 0 0E+384 -> 0
ddcom909 compare 0 -0E+384 -> 0
ddcom910 compare -0 0E+384 -> 0
ddcom911 compare -0 -0E+384 -> 0
ddcom930 compare 0E+384 0 -> 0
ddcom931 compare 0E+384 -0 -> 0
ddcom932 compare -0E+384 0 -> 0
ddcom933 compare -0E+384 -0 -> 0
ddcom934 compare 0E+384 0E-383 -> 0
ddcom935 compare 0E+384 -0E-383 -> 0
ddcom936 compare -0E+384 0E-383 -> 0
ddcom937 compare -0E+384 -0E-383 -> 0
ddcom938 compare 0 0E-383 -> 0
ddcom939 compare 0 -0E-383 -> 0
ddcom940 compare -0 0E-383 -> 0
ddcom941 compare -0 -0E-383 -> 0
-- signs
ddcom961 compare 1e+77 1e+11 -> 1
ddcom962 compare 1e+77 -1e+11 -> 1
ddcom963 compare -1e+77 1e+11 -> -1
ddcom964 compare -1e+77 -1e+11 -> -1
ddcom965 compare 1e-77 1e-11 -> -1
ddcom966 compare 1e-77 -1e-11 -> 1
ddcom967 compare -1e-77 1e-11 -> -1
ddcom968 compare -1e-77 -1e-11 -> 1
-- full alignment range, both ways
ddcomp1001 compare 1 1.000000000000000 -> 0
ddcomp1002 compare 1 1.00000000000000 -> 0
ddcomp1003 compare 1 1.0000000000000 -> 0
ddcomp1004 compare 1 1.000000000000 -> 0
ddcomp1005 compare 1 1.00000000000 -> 0
ddcomp1006 compare 1 1.0000000000 -> 0
ddcomp1007 compare 1 1.000000000 -> 0
ddcomp1008 compare 1 1.00000000 -> 0
ddcomp1009 compare 1 1.0000000 -> 0
ddcomp1010 compare 1 1.000000 -> 0
ddcomp1011 compare 1 1.00000 -> 0
ddcomp1012 compare 1 1.0000 -> 0
ddcomp1013 compare 1 1.000 -> 0
ddcomp1014 compare 1 1.00 -> 0
ddcomp1015 compare 1 1.0 -> 0
ddcomp1021 compare 1.000000000000000 1 -> 0
ddcomp1022 compare 1.00000000000000 1 -> 0
ddcomp1023 compare 1.0000000000000 1 -> 0
ddcomp1024 compare 1.000000000000 1 -> 0
ddcomp1025 compare 1.00000000000 1 -> 0
ddcomp1026 compare 1.0000000000 1 -> 0
ddcomp1027 compare 1.000000000 1 -> 0
ddcomp1028 compare 1.00000000 1 -> 0
ddcomp1029 compare 1.0000000 1 -> 0
ddcomp1030 compare 1.000000 1 -> 0
ddcomp1031 compare 1.00000 1 -> 0
ddcomp1032 compare 1.0000 1 -> 0
ddcomp1033 compare 1.000 1 -> 0
ddcomp1034 compare 1.00 1 -> 0
ddcomp1035 compare 1.0 1 -> 0
-- check MSD always detected non-zero
ddcomp1040 compare 0 0.000000000000000 -> 0
ddcomp1041 compare 0 1.000000000000000 -> -1
ddcomp1042 compare 0 2.000000000000000 -> -1
ddcomp1043 compare 0 3.000000000000000 -> -1
ddcomp1044 compare 0 4.000000000000000 -> -1
ddcomp1045 compare 0 5.000000000000000 -> -1
ddcomp1046 compare 0 6.000000000000000 -> -1
ddcomp1047 compare 0 7.000000000000000 -> -1
ddcomp1048 compare 0 8.000000000000000 -> -1
ddcomp1049 compare 0 9.000000000000000 -> -1
ddcomp1050 compare 0.000000000000000 0 -> 0
ddcomp1051 compare 1.000000000000000 0 -> 1
ddcomp1052 compare 2.000000000000000 0 -> 1
ddcomp1053 compare 3.000000000000000 0 -> 1
ddcomp1054 compare 4.000000000000000 0 -> 1
ddcomp1055 compare 5.000000000000000 0 -> 1
ddcomp1056 compare 6.000000000000000 0 -> 1
ddcomp1057 compare 7.000000000000000 0 -> 1
ddcomp1058 compare 8.000000000000000 0 -> 1
ddcomp1059 compare 9.000000000000000 0 -> 1
-- Null tests
ddcom9990 compare 10 # -> NaN Invalid_operation
ddcom9991 compare # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,647 @@
------------------------------------------------------------------------
-- ddCompareSig.decTest -- decDouble comparison; all NaNs signal --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Note that we cannot assume add/subtract tests cover paths adequately,
-- here, because the code might be quite different (comparison cannot
-- overflow or underflow, so actual subtractions are not necessary).
-- All operands and results are decDoubles.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- sanity checks
ddcms001 comparesig -2 -2 -> 0
ddcms002 comparesig -2 -1 -> -1
ddcms003 comparesig -2 0 -> -1
ddcms004 comparesig -2 1 -> -1
ddcms005 comparesig -2 2 -> -1
ddcms006 comparesig -1 -2 -> 1
ddcms007 comparesig -1 -1 -> 0
ddcms008 comparesig -1 0 -> -1
ddcms009 comparesig -1 1 -> -1
ddcms010 comparesig -1 2 -> -1
ddcms011 comparesig 0 -2 -> 1
ddcms012 comparesig 0 -1 -> 1
ddcms013 comparesig 0 0 -> 0
ddcms014 comparesig 0 1 -> -1
ddcms015 comparesig 0 2 -> -1
ddcms016 comparesig 1 -2 -> 1
ddcms017 comparesig 1 -1 -> 1
ddcms018 comparesig 1 0 -> 1
ddcms019 comparesig 1 1 -> 0
ddcms020 comparesig 1 2 -> -1
ddcms021 comparesig 2 -2 -> 1
ddcms022 comparesig 2 -1 -> 1
ddcms023 comparesig 2 0 -> 1
ddcms025 comparesig 2 1 -> 1
ddcms026 comparesig 2 2 -> 0
ddcms031 comparesig -20 -20 -> 0
ddcms032 comparesig -20 -10 -> -1
ddcms033 comparesig -20 00 -> -1
ddcms034 comparesig -20 10 -> -1
ddcms035 comparesig -20 20 -> -1
ddcms036 comparesig -10 -20 -> 1
ddcms037 comparesig -10 -10 -> 0
ddcms038 comparesig -10 00 -> -1
ddcms039 comparesig -10 10 -> -1
ddcms040 comparesig -10 20 -> -1
ddcms041 comparesig 00 -20 -> 1
ddcms042 comparesig 00 -10 -> 1
ddcms043 comparesig 00 00 -> 0
ddcms044 comparesig 00 10 -> -1
ddcms045 comparesig 00 20 -> -1
ddcms046 comparesig 10 -20 -> 1
ddcms047 comparesig 10 -10 -> 1
ddcms048 comparesig 10 00 -> 1
ddcms049 comparesig 10 10 -> 0
ddcms050 comparesig 10 20 -> -1
ddcms051 comparesig 20 -20 -> 1
ddcms052 comparesig 20 -10 -> 1
ddcms053 comparesig 20 00 -> 1
ddcms055 comparesig 20 10 -> 1
ddcms056 comparesig 20 20 -> 0
ddcms061 comparesig -2.0 -2.0 -> 0
ddcms062 comparesig -2.0 -1.0 -> -1
ddcms063 comparesig -2.0 0.0 -> -1
ddcms064 comparesig -2.0 1.0 -> -1
ddcms065 comparesig -2.0 2.0 -> -1
ddcms066 comparesig -1.0 -2.0 -> 1
ddcms067 comparesig -1.0 -1.0 -> 0
ddcms068 comparesig -1.0 0.0 -> -1
ddcms069 comparesig -1.0 1.0 -> -1
ddcms070 comparesig -1.0 2.0 -> -1
ddcms071 comparesig 0.0 -2.0 -> 1
ddcms072 comparesig 0.0 -1.0 -> 1
ddcms073 comparesig 0.0 0.0 -> 0
ddcms074 comparesig 0.0 1.0 -> -1
ddcms075 comparesig 0.0 2.0 -> -1
ddcms076 comparesig 1.0 -2.0 -> 1
ddcms077 comparesig 1.0 -1.0 -> 1
ddcms078 comparesig 1.0 0.0 -> 1
ddcms079 comparesig 1.0 1.0 -> 0
ddcms080 comparesig 1.0 2.0 -> -1
ddcms081 comparesig 2.0 -2.0 -> 1
ddcms082 comparesig 2.0 -1.0 -> 1
ddcms083 comparesig 2.0 0.0 -> 1
ddcms085 comparesig 2.0 1.0 -> 1
ddcms086 comparesig 2.0 2.0 -> 0
-- now some cases which might overflow if subtract were used
ddcms090 comparesig 9.999999999999999E+384 9.999999999999999E+384 -> 0
ddcms091 comparesig -9.999999999999999E+384 9.999999999999999E+384 -> -1
ddcms092 comparesig 9.999999999999999E+384 -9.999999999999999E+384 -> 1
ddcms093 comparesig -9.999999999999999E+384 -9.999999999999999E+384 -> 0
-- some differing length/exponent cases
ddcms100 comparesig 7.0 7.0 -> 0
ddcms101 comparesig 7.0 7 -> 0
ddcms102 comparesig 7 7.0 -> 0
ddcms103 comparesig 7E+0 7.0 -> 0
ddcms104 comparesig 70E-1 7.0 -> 0
ddcms105 comparesig 0.7E+1 7 -> 0
ddcms106 comparesig 70E-1 7 -> 0
ddcms107 comparesig 7.0 7E+0 -> 0
ddcms108 comparesig 7.0 70E-1 -> 0
ddcms109 comparesig 7 0.7E+1 -> 0
ddcms110 comparesig 7 70E-1 -> 0
ddcms120 comparesig 8.0 7.0 -> 1
ddcms121 comparesig 8.0 7 -> 1
ddcms122 comparesig 8 7.0 -> 1
ddcms123 comparesig 8E+0 7.0 -> 1
ddcms124 comparesig 80E-1 7.0 -> 1
ddcms125 comparesig 0.8E+1 7 -> 1
ddcms126 comparesig 80E-1 7 -> 1
ddcms127 comparesig 8.0 7E+0 -> 1
ddcms128 comparesig 8.0 70E-1 -> 1
ddcms129 comparesig 8 0.7E+1 -> 1
ddcms130 comparesig 8 70E-1 -> 1
ddcms140 comparesig 8.0 9.0 -> -1
ddcms141 comparesig 8.0 9 -> -1
ddcms142 comparesig 8 9.0 -> -1
ddcms143 comparesig 8E+0 9.0 -> -1
ddcms144 comparesig 80E-1 9.0 -> -1
ddcms145 comparesig 0.8E+1 9 -> -1
ddcms146 comparesig 80E-1 9 -> -1
ddcms147 comparesig 8.0 9E+0 -> -1
ddcms148 comparesig 8.0 90E-1 -> -1
ddcms149 comparesig 8 0.9E+1 -> -1
ddcms150 comparesig 8 90E-1 -> -1
-- and again, with sign changes -+ ..
ddcms200 comparesig -7.0 7.0 -> -1
ddcms201 comparesig -7.0 7 -> -1
ddcms202 comparesig -7 7.0 -> -1
ddcms203 comparesig -7E+0 7.0 -> -1
ddcms204 comparesig -70E-1 7.0 -> -1
ddcms205 comparesig -0.7E+1 7 -> -1
ddcms206 comparesig -70E-1 7 -> -1
ddcms207 comparesig -7.0 7E+0 -> -1
ddcms208 comparesig -7.0 70E-1 -> -1
ddcms209 comparesig -7 0.7E+1 -> -1
ddcms210 comparesig -7 70E-1 -> -1
ddcms220 comparesig -8.0 7.0 -> -1
ddcms221 comparesig -8.0 7 -> -1
ddcms222 comparesig -8 7.0 -> -1
ddcms223 comparesig -8E+0 7.0 -> -1
ddcms224 comparesig -80E-1 7.0 -> -1
ddcms225 comparesig -0.8E+1 7 -> -1
ddcms226 comparesig -80E-1 7 -> -1
ddcms227 comparesig -8.0 7E+0 -> -1
ddcms228 comparesig -8.0 70E-1 -> -1
ddcms229 comparesig -8 0.7E+1 -> -1
ddcms230 comparesig -8 70E-1 -> -1
ddcms240 comparesig -8.0 9.0 -> -1
ddcms241 comparesig -8.0 9 -> -1
ddcms242 comparesig -8 9.0 -> -1
ddcms243 comparesig -8E+0 9.0 -> -1
ddcms244 comparesig -80E-1 9.0 -> -1
ddcms245 comparesig -0.8E+1 9 -> -1
ddcms246 comparesig -80E-1 9 -> -1
ddcms247 comparesig -8.0 9E+0 -> -1
ddcms248 comparesig -8.0 90E-1 -> -1
ddcms249 comparesig -8 0.9E+1 -> -1
ddcms250 comparesig -8 90E-1 -> -1
-- and again, with sign changes +- ..
ddcms300 comparesig 7.0 -7.0 -> 1
ddcms301 comparesig 7.0 -7 -> 1
ddcms302 comparesig 7 -7.0 -> 1
ddcms303 comparesig 7E+0 -7.0 -> 1
ddcms304 comparesig 70E-1 -7.0 -> 1
ddcms305 comparesig .7E+1 -7 -> 1
ddcms306 comparesig 70E-1 -7 -> 1
ddcms307 comparesig 7.0 -7E+0 -> 1
ddcms308 comparesig 7.0 -70E-1 -> 1
ddcms309 comparesig 7 -.7E+1 -> 1
ddcms310 comparesig 7 -70E-1 -> 1
ddcms320 comparesig 8.0 -7.0 -> 1
ddcms321 comparesig 8.0 -7 -> 1
ddcms322 comparesig 8 -7.0 -> 1
ddcms323 comparesig 8E+0 -7.0 -> 1
ddcms324 comparesig 80E-1 -7.0 -> 1
ddcms325 comparesig .8E+1 -7 -> 1
ddcms326 comparesig 80E-1 -7 -> 1
ddcms327 comparesig 8.0 -7E+0 -> 1
ddcms328 comparesig 8.0 -70E-1 -> 1
ddcms329 comparesig 8 -.7E+1 -> 1
ddcms330 comparesig 8 -70E-1 -> 1
ddcms340 comparesig 8.0 -9.0 -> 1
ddcms341 comparesig 8.0 -9 -> 1
ddcms342 comparesig 8 -9.0 -> 1
ddcms343 comparesig 8E+0 -9.0 -> 1
ddcms344 comparesig 80E-1 -9.0 -> 1
ddcms345 comparesig .8E+1 -9 -> 1
ddcms346 comparesig 80E-1 -9 -> 1
ddcms347 comparesig 8.0 -9E+0 -> 1
ddcms348 comparesig 8.0 -90E-1 -> 1
ddcms349 comparesig 8 -.9E+1 -> 1
ddcms350 comparesig 8 -90E-1 -> 1
-- and again, with sign changes -- ..
ddcms400 comparesig -7.0 -7.0 -> 0
ddcms401 comparesig -7.0 -7 -> 0
ddcms402 comparesig -7 -7.0 -> 0
ddcms403 comparesig -7E+0 -7.0 -> 0
ddcms404 comparesig -70E-1 -7.0 -> 0
ddcms405 comparesig -.7E+1 -7 -> 0
ddcms406 comparesig -70E-1 -7 -> 0
ddcms407 comparesig -7.0 -7E+0 -> 0
ddcms408 comparesig -7.0 -70E-1 -> 0
ddcms409 comparesig -7 -.7E+1 -> 0
ddcms410 comparesig -7 -70E-1 -> 0
ddcms420 comparesig -8.0 -7.0 -> -1
ddcms421 comparesig -8.0 -7 -> -1
ddcms422 comparesig -8 -7.0 -> -1
ddcms423 comparesig -8E+0 -7.0 -> -1
ddcms424 comparesig -80E-1 -7.0 -> -1
ddcms425 comparesig -.8E+1 -7 -> -1
ddcms426 comparesig -80E-1 -7 -> -1
ddcms427 comparesig -8.0 -7E+0 -> -1
ddcms428 comparesig -8.0 -70E-1 -> -1
ddcms429 comparesig -8 -.7E+1 -> -1
ddcms430 comparesig -8 -70E-1 -> -1
ddcms440 comparesig -8.0 -9.0 -> 1
ddcms441 comparesig -8.0 -9 -> 1
ddcms442 comparesig -8 -9.0 -> 1
ddcms443 comparesig -8E+0 -9.0 -> 1
ddcms444 comparesig -80E-1 -9.0 -> 1
ddcms445 comparesig -.8E+1 -9 -> 1
ddcms446 comparesig -80E-1 -9 -> 1
ddcms447 comparesig -8.0 -9E+0 -> 1
ddcms448 comparesig -8.0 -90E-1 -> 1
ddcms449 comparesig -8 -.9E+1 -> 1
ddcms450 comparesig -8 -90E-1 -> 1
-- testcases that subtract to lots of zeros at boundaries [pgr]
ddcms473 comparesig 123.4560000000000E-89 123.456E-89 -> 0
ddcms474 comparesig 123.456000000000E+89 123.456E+89 -> 0
ddcms475 comparesig 123.45600000000E-89 123.456E-89 -> 0
ddcms476 comparesig 123.4560000000E+89 123.456E+89 -> 0
ddcms477 comparesig 123.456000000E-89 123.456E-89 -> 0
ddcms478 comparesig 123.45600000E+89 123.456E+89 -> 0
ddcms479 comparesig 123.4560000E-89 123.456E-89 -> 0
ddcms480 comparesig 123.456000E+89 123.456E+89 -> 0
ddcms481 comparesig 123.45600E-89 123.456E-89 -> 0
ddcms482 comparesig 123.4560E+89 123.456E+89 -> 0
ddcms483 comparesig 123.456E-89 123.456E-89 -> 0
ddcms487 comparesig 123.456E+89 123.4560000000000E+89 -> 0
ddcms488 comparesig 123.456E-89 123.456000000000E-89 -> 0
ddcms489 comparesig 123.456E+89 123.45600000000E+89 -> 0
ddcms490 comparesig 123.456E-89 123.4560000000E-89 -> 0
ddcms491 comparesig 123.456E+89 123.456000000E+89 -> 0
ddcms492 comparesig 123.456E-89 123.45600000E-89 -> 0
ddcms493 comparesig 123.456E+89 123.4560000E+89 -> 0
ddcms494 comparesig 123.456E-89 123.456000E-89 -> 0
ddcms495 comparesig 123.456E+89 123.45600E+89 -> 0
ddcms496 comparesig 123.456E-89 123.4560E-89 -> 0
ddcms497 comparesig 123.456E+89 123.456E+89 -> 0
-- wide-ranging, around precision; signs equal
ddcms500 comparesig 1 1E-15 -> 1
ddcms501 comparesig 1 1E-14 -> 1
ddcms502 comparesig 1 1E-13 -> 1
ddcms503 comparesig 1 1E-12 -> 1
ddcms504 comparesig 1 1E-11 -> 1
ddcms505 comparesig 1 1E-10 -> 1
ddcms506 comparesig 1 1E-9 -> 1
ddcms507 comparesig 1 1E-8 -> 1
ddcms508 comparesig 1 1E-7 -> 1
ddcms509 comparesig 1 1E-6 -> 1
ddcms510 comparesig 1 1E-5 -> 1
ddcms511 comparesig 1 1E-4 -> 1
ddcms512 comparesig 1 1E-3 -> 1
ddcms513 comparesig 1 1E-2 -> 1
ddcms514 comparesig 1 1E-1 -> 1
ddcms515 comparesig 1 1E-0 -> 0
ddcms516 comparesig 1 1E+1 -> -1
ddcms517 comparesig 1 1E+2 -> -1
ddcms518 comparesig 1 1E+3 -> -1
ddcms519 comparesig 1 1E+4 -> -1
ddcms521 comparesig 1 1E+5 -> -1
ddcms522 comparesig 1 1E+6 -> -1
ddcms523 comparesig 1 1E+7 -> -1
ddcms524 comparesig 1 1E+8 -> -1
ddcms525 comparesig 1 1E+9 -> -1
ddcms526 comparesig 1 1E+10 -> -1
ddcms527 comparesig 1 1E+11 -> -1
ddcms528 comparesig 1 1E+12 -> -1
ddcms529 comparesig 1 1E+13 -> -1
ddcms530 comparesig 1 1E+14 -> -1
ddcms531 comparesig 1 1E+15 -> -1
-- LR swap
ddcms540 comparesig 1E-15 1 -> -1
ddcms541 comparesig 1E-14 1 -> -1
ddcms542 comparesig 1E-13 1 -> -1
ddcms543 comparesig 1E-12 1 -> -1
ddcms544 comparesig 1E-11 1 -> -1
ddcms545 comparesig 1E-10 1 -> -1
ddcms546 comparesig 1E-9 1 -> -1
ddcms547 comparesig 1E-8 1 -> -1
ddcms548 comparesig 1E-7 1 -> -1
ddcms549 comparesig 1E-6 1 -> -1
ddcms550 comparesig 1E-5 1 -> -1
ddcms551 comparesig 1E-4 1 -> -1
ddcms552 comparesig 1E-3 1 -> -1
ddcms553 comparesig 1E-2 1 -> -1
ddcms554 comparesig 1E-1 1 -> -1
ddcms555 comparesig 1E-0 1 -> 0
ddcms556 comparesig 1E+1 1 -> 1
ddcms557 comparesig 1E+2 1 -> 1
ddcms558 comparesig 1E+3 1 -> 1
ddcms559 comparesig 1E+4 1 -> 1
ddcms561 comparesig 1E+5 1 -> 1
ddcms562 comparesig 1E+6 1 -> 1
ddcms563 comparesig 1E+7 1 -> 1
ddcms564 comparesig 1E+8 1 -> 1
ddcms565 comparesig 1E+9 1 -> 1
ddcms566 comparesig 1E+10 1 -> 1
ddcms567 comparesig 1E+11 1 -> 1
ddcms568 comparesig 1E+12 1 -> 1
ddcms569 comparesig 1E+13 1 -> 1
ddcms570 comparesig 1E+14 1 -> 1
ddcms571 comparesig 1E+15 1 -> 1
-- similar with a useful coefficient, one side only
ddcms580 comparesig 0.000000987654321 1E-15 -> 1
ddcms581 comparesig 0.000000987654321 1E-14 -> 1
ddcms582 comparesig 0.000000987654321 1E-13 -> 1
ddcms583 comparesig 0.000000987654321 1E-12 -> 1
ddcms584 comparesig 0.000000987654321 1E-11 -> 1
ddcms585 comparesig 0.000000987654321 1E-10 -> 1
ddcms586 comparesig 0.000000987654321 1E-9 -> 1
ddcms587 comparesig 0.000000987654321 1E-8 -> 1
ddcms588 comparesig 0.000000987654321 1E-7 -> 1
ddcms589 comparesig 0.000000987654321 1E-6 -> -1
ddcms590 comparesig 0.000000987654321 1E-5 -> -1
ddcms591 comparesig 0.000000987654321 1E-4 -> -1
ddcms592 comparesig 0.000000987654321 1E-3 -> -1
ddcms593 comparesig 0.000000987654321 1E-2 -> -1
ddcms594 comparesig 0.000000987654321 1E-1 -> -1
ddcms595 comparesig 0.000000987654321 1E-0 -> -1
ddcms596 comparesig 0.000000987654321 1E+1 -> -1
ddcms597 comparesig 0.000000987654321 1E+2 -> -1
ddcms598 comparesig 0.000000987654321 1E+3 -> -1
ddcms599 comparesig 0.000000987654321 1E+4 -> -1
-- check some unit-y traps
ddcms600 comparesig 12 12.2345 -> -1
ddcms601 comparesig 12.0 12.2345 -> -1
ddcms602 comparesig 12.00 12.2345 -> -1
ddcms603 comparesig 12.000 12.2345 -> -1
ddcms604 comparesig 12.0000 12.2345 -> -1
ddcms605 comparesig 12.00000 12.2345 -> -1
ddcms606 comparesig 12.000000 12.2345 -> -1
ddcms607 comparesig 12.0000000 12.2345 -> -1
ddcms608 comparesig 12.00000000 12.2345 -> -1
ddcms609 comparesig 12.000000000 12.2345 -> -1
ddcms610 comparesig 12.1234 12 -> 1
ddcms611 comparesig 12.1234 12.0 -> 1
ddcms612 comparesig 12.1234 12.00 -> 1
ddcms613 comparesig 12.1234 12.000 -> 1
ddcms614 comparesig 12.1234 12.0000 -> 1
ddcms615 comparesig 12.1234 12.00000 -> 1
ddcms616 comparesig 12.1234 12.000000 -> 1
ddcms617 comparesig 12.1234 12.0000000 -> 1
ddcms618 comparesig 12.1234 12.00000000 -> 1
ddcms619 comparesig 12.1234 12.000000000 -> 1
ddcms620 comparesig -12 -12.2345 -> 1
ddcms621 comparesig -12.0 -12.2345 -> 1
ddcms622 comparesig -12.00 -12.2345 -> 1
ddcms623 comparesig -12.000 -12.2345 -> 1
ddcms624 comparesig -12.0000 -12.2345 -> 1
ddcms625 comparesig -12.00000 -12.2345 -> 1
ddcms626 comparesig -12.000000 -12.2345 -> 1
ddcms627 comparesig -12.0000000 -12.2345 -> 1
ddcms628 comparesig -12.00000000 -12.2345 -> 1
ddcms629 comparesig -12.000000000 -12.2345 -> 1
ddcms630 comparesig -12.1234 -12 -> -1
ddcms631 comparesig -12.1234 -12.0 -> -1
ddcms632 comparesig -12.1234 -12.00 -> -1
ddcms633 comparesig -12.1234 -12.000 -> -1
ddcms634 comparesig -12.1234 -12.0000 -> -1
ddcms635 comparesig -12.1234 -12.00000 -> -1
ddcms636 comparesig -12.1234 -12.000000 -> -1
ddcms637 comparesig -12.1234 -12.0000000 -> -1
ddcms638 comparesig -12.1234 -12.00000000 -> -1
ddcms639 comparesig -12.1234 -12.000000000 -> -1
-- extended zeros
ddcms640 comparesig 0 0 -> 0
ddcms641 comparesig 0 -0 -> 0
ddcms642 comparesig 0 -0.0 -> 0
ddcms643 comparesig 0 0.0 -> 0
ddcms644 comparesig -0 0 -> 0
ddcms645 comparesig -0 -0 -> 0
ddcms646 comparesig -0 -0.0 -> 0
ddcms647 comparesig -0 0.0 -> 0
ddcms648 comparesig 0.0 0 -> 0
ddcms649 comparesig 0.0 -0 -> 0
ddcms650 comparesig 0.0 -0.0 -> 0
ddcms651 comparesig 0.0 0.0 -> 0
ddcms652 comparesig -0.0 0 -> 0
ddcms653 comparesig -0.0 -0 -> 0
ddcms654 comparesig -0.0 -0.0 -> 0
ddcms655 comparesig -0.0 0.0 -> 0
ddcms656 comparesig -0E1 0.0 -> 0
ddcms657 comparesig -0E2 0.0 -> 0
ddcms658 comparesig 0E1 0.0 -> 0
ddcms659 comparesig 0E2 0.0 -> 0
ddcms660 comparesig -0E1 0 -> 0
ddcms661 comparesig -0E2 0 -> 0
ddcms662 comparesig 0E1 0 -> 0
ddcms663 comparesig 0E2 0 -> 0
ddcms664 comparesig -0E1 -0E1 -> 0
ddcms665 comparesig -0E2 -0E1 -> 0
ddcms666 comparesig 0E1 -0E1 -> 0
ddcms667 comparesig 0E2 -0E1 -> 0
ddcms668 comparesig -0E1 -0E2 -> 0
ddcms669 comparesig -0E2 -0E2 -> 0
ddcms670 comparesig 0E1 -0E2 -> 0
ddcms671 comparesig 0E2 -0E2 -> 0
ddcms672 comparesig -0E1 0E1 -> 0
ddcms673 comparesig -0E2 0E1 -> 0
ddcms674 comparesig 0E1 0E1 -> 0
ddcms675 comparesig 0E2 0E1 -> 0
ddcms676 comparesig -0E1 0E2 -> 0
ddcms677 comparesig -0E2 0E2 -> 0
ddcms678 comparesig 0E1 0E2 -> 0
ddcms679 comparesig 0E2 0E2 -> 0
-- trailing zeros; unit-y
ddcms680 comparesig 12 12 -> 0
ddcms681 comparesig 12 12.0 -> 0
ddcms682 comparesig 12 12.00 -> 0
ddcms683 comparesig 12 12.000 -> 0
ddcms684 comparesig 12 12.0000 -> 0
ddcms685 comparesig 12 12.00000 -> 0
ddcms686 comparesig 12 12.000000 -> 0
ddcms687 comparesig 12 12.0000000 -> 0
ddcms688 comparesig 12 12.00000000 -> 0
ddcms689 comparesig 12 12.000000000 -> 0
ddcms690 comparesig 12 12 -> 0
ddcms691 comparesig 12.0 12 -> 0
ddcms692 comparesig 12.00 12 -> 0
ddcms693 comparesig 12.000 12 -> 0
ddcms694 comparesig 12.0000 12 -> 0
ddcms695 comparesig 12.00000 12 -> 0
ddcms696 comparesig 12.000000 12 -> 0
ddcms697 comparesig 12.0000000 12 -> 0
ddcms698 comparesig 12.00000000 12 -> 0
ddcms699 comparesig 12.000000000 12 -> 0
-- first, second, & last digit
ddcms700 comparesig 1234567890123456 1234567890123455 -> 1
ddcms701 comparesig 1234567890123456 1234567890123456 -> 0
ddcms702 comparesig 1234567890123456 1234567890123457 -> -1
ddcms703 comparesig 1234567890123456 0234567890123456 -> 1
ddcms704 comparesig 1234567890123456 1234567890123456 -> 0
ddcms705 comparesig 1234567890123456 2234567890123456 -> -1
ddcms706 comparesig 1134567890123456 1034567890123456 -> 1
ddcms707 comparesig 1134567890123456 1134567890123456 -> 0
ddcms708 comparesig 1134567890123456 1234567890123456 -> -1
-- miscellaneous
ddcms721 comparesig 12345678000 1 -> 1
ddcms722 comparesig 1 12345678000 -> -1
ddcms723 comparesig 1234567800 1 -> 1
ddcms724 comparesig 1 1234567800 -> -1
ddcms725 comparesig 1234567890 1 -> 1
ddcms726 comparesig 1 1234567890 -> -1
ddcms727 comparesig 1234567891 1 -> 1
ddcms728 comparesig 1 1234567891 -> -1
ddcms729 comparesig 12345678901 1 -> 1
ddcms730 comparesig 1 12345678901 -> -1
ddcms731 comparesig 1234567896 1 -> 1
ddcms732 comparesig 1 1234567896 -> -1
-- residue cases at lower precision
ddcms740 comparesig 1 0.9999999 -> 1
ddcms741 comparesig 1 0.999999 -> 1
ddcms742 comparesig 1 0.99999 -> 1
ddcms743 comparesig 1 1.0000 -> 0
ddcms744 comparesig 1 1.00001 -> -1
ddcms745 comparesig 1 1.000001 -> -1
ddcms746 comparesig 1 1.0000001 -> -1
ddcms750 comparesig 0.9999999 1 -> -1
ddcms751 comparesig 0.999999 1 -> -1
ddcms752 comparesig 0.99999 1 -> -1
ddcms753 comparesig 1.0000 1 -> 0
ddcms754 comparesig 1.00001 1 -> 1
ddcms755 comparesig 1.000001 1 -> 1
ddcms756 comparesig 1.0000001 1 -> 1
-- Specials
ddcms780 comparesig Inf -Inf -> 1
ddcms781 comparesig Inf -1000 -> 1
ddcms782 comparesig Inf -1 -> 1
ddcms783 comparesig Inf -0 -> 1
ddcms784 comparesig Inf 0 -> 1
ddcms785 comparesig Inf 1 -> 1
ddcms786 comparesig Inf 1000 -> 1
ddcms787 comparesig Inf Inf -> 0
ddcms788 comparesig -1000 Inf -> -1
ddcms789 comparesig -Inf Inf -> -1
ddcms790 comparesig -1 Inf -> -1
ddcms791 comparesig -0 Inf -> -1
ddcms792 comparesig 0 Inf -> -1
ddcms793 comparesig 1 Inf -> -1
ddcms794 comparesig 1000 Inf -> -1
ddcms795 comparesig Inf Inf -> 0
ddcms800 comparesig -Inf -Inf -> 0
ddcms801 comparesig -Inf -1000 -> -1
ddcms802 comparesig -Inf -1 -> -1
ddcms803 comparesig -Inf -0 -> -1
ddcms804 comparesig -Inf 0 -> -1
ddcms805 comparesig -Inf 1 -> -1
ddcms806 comparesig -Inf 1000 -> -1
ddcms807 comparesig -Inf Inf -> -1
ddcms808 comparesig -Inf -Inf -> 0
ddcms809 comparesig -1000 -Inf -> 1
ddcms810 comparesig -1 -Inf -> 1
ddcms811 comparesig -0 -Inf -> 1
ddcms812 comparesig 0 -Inf -> 1
ddcms813 comparesig 1 -Inf -> 1
ddcms814 comparesig 1000 -Inf -> 1
ddcms815 comparesig Inf -Inf -> 1
ddcms821 comparesig NaN -Inf -> NaN Invalid_operation
ddcms822 comparesig NaN -1000 -> NaN Invalid_operation
ddcms823 comparesig NaN -1 -> NaN Invalid_operation
ddcms824 comparesig NaN -0 -> NaN Invalid_operation
ddcms825 comparesig NaN 0 -> NaN Invalid_operation
ddcms826 comparesig NaN 1 -> NaN Invalid_operation
ddcms827 comparesig NaN 1000 -> NaN Invalid_operation
ddcms828 comparesig NaN Inf -> NaN Invalid_operation
ddcms829 comparesig NaN NaN -> NaN Invalid_operation
ddcms830 comparesig -Inf NaN -> NaN Invalid_operation
ddcms831 comparesig -1000 NaN -> NaN Invalid_operation
ddcms832 comparesig -1 NaN -> NaN Invalid_operation
ddcms833 comparesig -0 NaN -> NaN Invalid_operation
ddcms834 comparesig 0 NaN -> NaN Invalid_operation
ddcms835 comparesig 1 NaN -> NaN Invalid_operation
ddcms836 comparesig 1000 NaN -> NaN Invalid_operation
ddcms837 comparesig Inf NaN -> NaN Invalid_operation
ddcms838 comparesig -NaN -NaN -> -NaN Invalid_operation
ddcms839 comparesig +NaN -NaN -> NaN Invalid_operation
ddcms840 comparesig -NaN +NaN -> -NaN Invalid_operation
ddcms841 comparesig sNaN -Inf -> NaN Invalid_operation
ddcms842 comparesig sNaN -1000 -> NaN Invalid_operation
ddcms843 comparesig sNaN -1 -> NaN Invalid_operation
ddcms844 comparesig sNaN -0 -> NaN Invalid_operation
ddcms845 comparesig sNaN 0 -> NaN Invalid_operation
ddcms846 comparesig sNaN 1 -> NaN Invalid_operation
ddcms847 comparesig sNaN 1000 -> NaN Invalid_operation
ddcms848 comparesig sNaN NaN -> NaN Invalid_operation
ddcms849 comparesig sNaN sNaN -> NaN Invalid_operation
ddcms850 comparesig NaN sNaN -> NaN Invalid_operation
ddcms851 comparesig -Inf sNaN -> NaN Invalid_operation
ddcms852 comparesig -1000 sNaN -> NaN Invalid_operation
ddcms853 comparesig -1 sNaN -> NaN Invalid_operation
ddcms854 comparesig -0 sNaN -> NaN Invalid_operation
ddcms855 comparesig 0 sNaN -> NaN Invalid_operation
ddcms856 comparesig 1 sNaN -> NaN Invalid_operation
ddcms857 comparesig 1000 sNaN -> NaN Invalid_operation
ddcms858 comparesig Inf sNaN -> NaN Invalid_operation
ddcms859 comparesig NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddcms860 comparesig NaN9 -Inf -> NaN9 Invalid_operation
ddcms861 comparesig NaN8 999 -> NaN8 Invalid_operation
ddcms862 comparesig NaN77 Inf -> NaN77 Invalid_operation
ddcms863 comparesig -NaN67 NaN5 -> -NaN67 Invalid_operation
ddcms864 comparesig -Inf -NaN4 -> -NaN4 Invalid_operation
ddcms865 comparesig -999 -NaN33 -> -NaN33 Invalid_operation
ddcms866 comparesig Inf NaN2 -> NaN2 Invalid_operation
ddcms867 comparesig -NaN41 -NaN42 -> -NaN41 Invalid_operation
ddcms868 comparesig +NaN41 -NaN42 -> NaN41 Invalid_operation
ddcms869 comparesig -NaN41 +NaN42 -> -NaN41 Invalid_operation
ddcms870 comparesig +NaN41 +NaN42 -> NaN41 Invalid_operation
ddcms871 comparesig -sNaN99 -Inf -> -NaN99 Invalid_operation
ddcms872 comparesig sNaN98 -11 -> NaN98 Invalid_operation
ddcms873 comparesig sNaN97 NaN -> NaN97 Invalid_operation
ddcms874 comparesig sNaN16 sNaN94 -> NaN16 Invalid_operation
ddcms875 comparesig NaN85 sNaN83 -> NaN83 Invalid_operation
ddcms876 comparesig -Inf sNaN92 -> NaN92 Invalid_operation
ddcms877 comparesig 088 sNaN81 -> NaN81 Invalid_operation
ddcms878 comparesig Inf sNaN90 -> NaN90 Invalid_operation
ddcms879 comparesig NaN -sNaN89 -> -NaN89 Invalid_operation
-- wide range
ddcms880 comparesig +1.23456789012345E-0 9E+384 -> -1
ddcms881 comparesig 9E+384 +1.23456789012345E-0 -> 1
ddcms882 comparesig +0.100 9E-383 -> 1
ddcms883 comparesig 9E-383 +0.100 -> -1
ddcms885 comparesig -1.23456789012345E-0 9E+384 -> -1
ddcms886 comparesig 9E+384 -1.23456789012345E-0 -> 1
ddcms887 comparesig -0.100 9E-383 -> -1
ddcms888 comparesig 9E-383 -0.100 -> 1
-- signs
ddcms901 comparesig 1e+77 1e+11 -> 1
ddcms902 comparesig 1e+77 -1e+11 -> 1
ddcms903 comparesig -1e+77 1e+11 -> -1
ddcms904 comparesig -1e+77 -1e+11 -> -1
ddcms905 comparesig 1e-77 1e-11 -> -1
ddcms906 comparesig 1e-77 -1e-11 -> 1
ddcms907 comparesig -1e-77 1e-11 -> -1
ddcms908 comparesig -1e-77 -1e-11 -> 1
-- Null tests
ddcms990 comparesig 10 # -> NaN Invalid_operation
ddcms991 comparesig # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,706 @@
------------------------------------------------------------------------
-- ddCompareTotalMag.decTest -- decDouble comparison; abs. total order--
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Note that we cannot assume add/subtract tests cover paths adequately,
-- here, because the code might be quite different (comparison cannot
-- overflow or underflow, so actual subtractions are not necessary).
-- Similarly, comparetotal will have some radically different paths
-- than compare.
-- All operands and results are decDoubles.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- sanity checks
ddctm001 comparetotmag -2 -2 -> 0
ddctm002 comparetotmag -2 -1 -> 1
ddctm003 comparetotmag -2 0 -> 1
ddctm004 comparetotmag -2 1 -> 1
ddctm005 comparetotmag -2 2 -> 0
ddctm006 comparetotmag -1 -2 -> -1
ddctm007 comparetotmag -1 -1 -> 0
ddctm008 comparetotmag -1 0 -> 1
ddctm009 comparetotmag -1 1 -> 0
ddctm010 comparetotmag -1 2 -> -1
ddctm011 comparetotmag 0 -2 -> -1
ddctm012 comparetotmag 0 -1 -> -1
ddctm013 comparetotmag 0 0 -> 0
ddctm014 comparetotmag 0 1 -> -1
ddctm015 comparetotmag 0 2 -> -1
ddctm016 comparetotmag 1 -2 -> -1
ddctm017 comparetotmag 1 -1 -> 0
ddctm018 comparetotmag 1 0 -> 1
ddctm019 comparetotmag 1 1 -> 0
ddctm020 comparetotmag 1 2 -> -1
ddctm021 comparetotmag 2 -2 -> 0
ddctm022 comparetotmag 2 -1 -> 1
ddctm023 comparetotmag 2 0 -> 1
ddctm025 comparetotmag 2 1 -> 1
ddctm026 comparetotmag 2 2 -> 0
ddctm031 comparetotmag -20 -20 -> 0
ddctm032 comparetotmag -20 -10 -> 1
ddctm033 comparetotmag -20 00 -> 1
ddctm034 comparetotmag -20 10 -> 1
ddctm035 comparetotmag -20 20 -> 0
ddctm036 comparetotmag -10 -20 -> -1
ddctm037 comparetotmag -10 -10 -> 0
ddctm038 comparetotmag -10 00 -> 1
ddctm039 comparetotmag -10 10 -> 0
ddctm040 comparetotmag -10 20 -> -1
ddctm041 comparetotmag 00 -20 -> -1
ddctm042 comparetotmag 00 -10 -> -1
ddctm043 comparetotmag 00 00 -> 0
ddctm044 comparetotmag 00 10 -> -1
ddctm045 comparetotmag 00 20 -> -1
ddctm046 comparetotmag 10 -20 -> -1
ddctm047 comparetotmag 10 -10 -> 0
ddctm048 comparetotmag 10 00 -> 1
ddctm049 comparetotmag 10 10 -> 0
ddctm050 comparetotmag 10 20 -> -1
ddctm051 comparetotmag 20 -20 -> 0
ddctm052 comparetotmag 20 -10 -> 1
ddctm053 comparetotmag 20 00 -> 1
ddctm055 comparetotmag 20 10 -> 1
ddctm056 comparetotmag 20 20 -> 0
ddctm061 comparetotmag -2.0 -2.0 -> 0
ddctm062 comparetotmag -2.0 -1.0 -> 1
ddctm063 comparetotmag -2.0 0.0 -> 1
ddctm064 comparetotmag -2.0 1.0 -> 1
ddctm065 comparetotmag -2.0 2.0 -> 0
ddctm066 comparetotmag -1.0 -2.0 -> -1
ddctm067 comparetotmag -1.0 -1.0 -> 0
ddctm068 comparetotmag -1.0 0.0 -> 1
ddctm069 comparetotmag -1.0 1.0 -> 0
ddctm070 comparetotmag -1.0 2.0 -> -1
ddctm071 comparetotmag 0.0 -2.0 -> -1
ddctm072 comparetotmag 0.0 -1.0 -> -1
ddctm073 comparetotmag 0.0 0.0 -> 0
ddctm074 comparetotmag 0.0 1.0 -> -1
ddctm075 comparetotmag 0.0 2.0 -> -1
ddctm076 comparetotmag 1.0 -2.0 -> -1
ddctm077 comparetotmag 1.0 -1.0 -> 0
ddctm078 comparetotmag 1.0 0.0 -> 1
ddctm079 comparetotmag 1.0 1.0 -> 0
ddctm080 comparetotmag 1.0 2.0 -> -1
ddctm081 comparetotmag 2.0 -2.0 -> 0
ddctm082 comparetotmag 2.0 -1.0 -> 1
ddctm083 comparetotmag 2.0 0.0 -> 1
ddctm085 comparetotmag 2.0 1.0 -> 1
ddctm086 comparetotmag 2.0 2.0 -> 0
-- now some cases which might overflow if subtract were used
ddctm090 comparetotmag 9.99999999E+384 9.99999999E+384 -> 0
ddctm091 comparetotmag -9.99999999E+384 9.99999999E+384 -> 0
ddctm092 comparetotmag 9.99999999E+384 -9.99999999E+384 -> 0
ddctm093 comparetotmag -9.99999999E+384 -9.99999999E+384 -> 0
-- some differing length/exponent cases
-- in this first group, compare would compare all equal
ddctm100 comparetotmag 7.0 7.0 -> 0
ddctm101 comparetotmag 7.0 7 -> -1
ddctm102 comparetotmag 7 7.0 -> 1
ddctm103 comparetotmag 7E+0 7.0 -> 1
ddctm104 comparetotmag 70E-1 7.0 -> 0
ddctm105 comparetotmag 0.7E+1 7 -> 0
ddctm106 comparetotmag 70E-1 7 -> -1
ddctm107 comparetotmag 7.0 7E+0 -> -1
ddctm108 comparetotmag 7.0 70E-1 -> 0
ddctm109 comparetotmag 7 0.7E+1 -> 0
ddctm110 comparetotmag 7 70E-1 -> 1
ddctm120 comparetotmag 8.0 7.0 -> 1
ddctm121 comparetotmag 8.0 7 -> 1
ddctm122 comparetotmag 8 7.0 -> 1
ddctm123 comparetotmag 8E+0 7.0 -> 1
ddctm124 comparetotmag 80E-1 7.0 -> 1
ddctm125 comparetotmag 0.8E+1 7 -> 1
ddctm126 comparetotmag 80E-1 7 -> 1
ddctm127 comparetotmag 8.0 7E+0 -> 1
ddctm128 comparetotmag 8.0 70E-1 -> 1
ddctm129 comparetotmag 8 0.7E+1 -> 1
ddctm130 comparetotmag 8 70E-1 -> 1
ddctm140 comparetotmag 8.0 9.0 -> -1
ddctm141 comparetotmag 8.0 9 -> -1
ddctm142 comparetotmag 8 9.0 -> -1
ddctm143 comparetotmag 8E+0 9.0 -> -1
ddctm144 comparetotmag 80E-1 9.0 -> -1
ddctm145 comparetotmag 0.8E+1 9 -> -1
ddctm146 comparetotmag 80E-1 9 -> -1
ddctm147 comparetotmag 8.0 9E+0 -> -1
ddctm148 comparetotmag 8.0 90E-1 -> -1
ddctm149 comparetotmag 8 0.9E+1 -> -1
ddctm150 comparetotmag 8 90E-1 -> -1
-- and again, with sign changes -+ ..
ddctm200 comparetotmag -7.0 7.0 -> 0
ddctm201 comparetotmag -7.0 7 -> -1
ddctm202 comparetotmag -7 7.0 -> 1
ddctm203 comparetotmag -7E+0 7.0 -> 1
ddctm204 comparetotmag -70E-1 7.0 -> 0
ddctm205 comparetotmag -0.7E+1 7 -> 0
ddctm206 comparetotmag -70E-1 7 -> -1
ddctm207 comparetotmag -7.0 7E+0 -> -1
ddctm208 comparetotmag -7.0 70E-1 -> 0
ddctm209 comparetotmag -7 0.7E+1 -> 0
ddctm210 comparetotmag -7 70E-1 -> 1
ddctm220 comparetotmag -8.0 7.0 -> 1
ddctm221 comparetotmag -8.0 7 -> 1
ddctm222 comparetotmag -8 7.0 -> 1
ddctm223 comparetotmag -8E+0 7.0 -> 1
ddctm224 comparetotmag -80E-1 7.0 -> 1
ddctm225 comparetotmag -0.8E+1 7 -> 1
ddctm226 comparetotmag -80E-1 7 -> 1
ddctm227 comparetotmag -8.0 7E+0 -> 1
ddctm228 comparetotmag -8.0 70E-1 -> 1
ddctm229 comparetotmag -8 0.7E+1 -> 1
ddctm230 comparetotmag -8 70E-1 -> 1
ddctm240 comparetotmag -8.0 9.0 -> -1
ddctm241 comparetotmag -8.0 9 -> -1
ddctm242 comparetotmag -8 9.0 -> -1
ddctm243 comparetotmag -8E+0 9.0 -> -1
ddctm244 comparetotmag -80E-1 9.0 -> -1
ddctm245 comparetotmag -0.8E+1 9 -> -1
ddctm246 comparetotmag -80E-1 9 -> -1
ddctm247 comparetotmag -8.0 9E+0 -> -1
ddctm248 comparetotmag -8.0 90E-1 -> -1
ddctm249 comparetotmag -8 0.9E+1 -> -1
ddctm250 comparetotmag -8 90E-1 -> -1
-- and again, with sign changes +- ..
ddctm300 comparetotmag 7.0 -7.0 -> 0
ddctm301 comparetotmag 7.0 -7 -> -1
ddctm302 comparetotmag 7 -7.0 -> 1
ddctm303 comparetotmag 7E+0 -7.0 -> 1
ddctm304 comparetotmag 70E-1 -7.0 -> 0
ddctm305 comparetotmag .7E+1 -7 -> 0
ddctm306 comparetotmag 70E-1 -7 -> -1
ddctm307 comparetotmag 7.0 -7E+0 -> -1
ddctm308 comparetotmag 7.0 -70E-1 -> 0
ddctm309 comparetotmag 7 -.7E+1 -> 0
ddctm310 comparetotmag 7 -70E-1 -> 1
ddctm320 comparetotmag 8.0 -7.0 -> 1
ddctm321 comparetotmag 8.0 -7 -> 1
ddctm322 comparetotmag 8 -7.0 -> 1
ddctm323 comparetotmag 8E+0 -7.0 -> 1
ddctm324 comparetotmag 80E-1 -7.0 -> 1
ddctm325 comparetotmag .8E+1 -7 -> 1
ddctm326 comparetotmag 80E-1 -7 -> 1
ddctm327 comparetotmag 8.0 -7E+0 -> 1
ddctm328 comparetotmag 8.0 -70E-1 -> 1
ddctm329 comparetotmag 8 -.7E+1 -> 1
ddctm330 comparetotmag 8 -70E-1 -> 1
ddctm340 comparetotmag 8.0 -9.0 -> -1
ddctm341 comparetotmag 8.0 -9 -> -1
ddctm342 comparetotmag 8 -9.0 -> -1
ddctm343 comparetotmag 8E+0 -9.0 -> -1
ddctm344 comparetotmag 80E-1 -9.0 -> -1
ddctm345 comparetotmag .8E+1 -9 -> -1
ddctm346 comparetotmag 80E-1 -9 -> -1
ddctm347 comparetotmag 8.0 -9E+0 -> -1
ddctm348 comparetotmag 8.0 -90E-1 -> -1
ddctm349 comparetotmag 8 -.9E+1 -> -1
ddctm350 comparetotmag 8 -90E-1 -> -1
-- and again, with sign changes -- ..
ddctm400 comparetotmag -7.0 -7.0 -> 0
ddctm401 comparetotmag -7.0 -7 -> -1
ddctm402 comparetotmag -7 -7.0 -> 1
ddctm403 comparetotmag -7E+0 -7.0 -> 1
ddctm404 comparetotmag -70E-1 -7.0 -> 0
ddctm405 comparetotmag -.7E+1 -7 -> 0
ddctm406 comparetotmag -70E-1 -7 -> -1
ddctm407 comparetotmag -7.0 -7E+0 -> -1
ddctm408 comparetotmag -7.0 -70E-1 -> 0
ddctm409 comparetotmag -7 -.7E+1 -> 0
ddctm410 comparetotmag -7 -70E-1 -> 1
ddctm420 comparetotmag -8.0 -7.0 -> 1
ddctm421 comparetotmag -8.0 -7 -> 1
ddctm422 comparetotmag -8 -7.0 -> 1
ddctm423 comparetotmag -8E+0 -7.0 -> 1
ddctm424 comparetotmag -80E-1 -7.0 -> 1
ddctm425 comparetotmag -.8E+1 -7 -> 1
ddctm426 comparetotmag -80E-1 -7 -> 1
ddctm427 comparetotmag -8.0 -7E+0 -> 1
ddctm428 comparetotmag -8.0 -70E-1 -> 1
ddctm429 comparetotmag -8 -.7E+1 -> 1
ddctm430 comparetotmag -8 -70E-1 -> 1
ddctm440 comparetotmag -8.0 -9.0 -> -1
ddctm441 comparetotmag -8.0 -9 -> -1
ddctm442 comparetotmag -8 -9.0 -> -1
ddctm443 comparetotmag -8E+0 -9.0 -> -1
ddctm444 comparetotmag -80E-1 -9.0 -> -1
ddctm445 comparetotmag -.8E+1 -9 -> -1
ddctm446 comparetotmag -80E-1 -9 -> -1
ddctm447 comparetotmag -8.0 -9E+0 -> -1
ddctm448 comparetotmag -8.0 -90E-1 -> -1
ddctm449 comparetotmag -8 -.9E+1 -> -1
ddctm450 comparetotmag -8 -90E-1 -> -1
-- testcases that subtract to lots of zeros at boundaries [pgr]
ddctm473 comparetotmag 123.4560000000000E-89 123.456E-89 -> -1
ddctm474 comparetotmag 123.456000000000E+89 123.456E+89 -> -1
ddctm475 comparetotmag 123.45600000000E-89 123.456E-89 -> -1
ddctm476 comparetotmag 123.4560000000E+89 123.456E+89 -> -1
ddctm477 comparetotmag 123.456000000E-89 123.456E-89 -> -1
ddctm478 comparetotmag 123.45600000E+89 123.456E+89 -> -1
ddctm479 comparetotmag 123.4560000E-89 123.456E-89 -> -1
ddctm480 comparetotmag 123.456000E+89 123.456E+89 -> -1
ddctm481 comparetotmag 123.45600E-89 123.456E-89 -> -1
ddctm482 comparetotmag 123.4560E+89 123.456E+89 -> -1
ddctm483 comparetotmag 123.456E-89 123.456E-89 -> 0
ddctm487 comparetotmag 123.456E+89 123.4560000000000E+89 -> 1
ddctm488 comparetotmag 123.456E-89 123.456000000000E-89 -> 1
ddctm489 comparetotmag 123.456E+89 123.45600000000E+89 -> 1
ddctm490 comparetotmag 123.456E-89 123.4560000000E-89 -> 1
ddctm491 comparetotmag 123.456E+89 123.456000000E+89 -> 1
ddctm492 comparetotmag 123.456E-89 123.45600000E-89 -> 1
ddctm493 comparetotmag 123.456E+89 123.4560000E+89 -> 1
ddctm494 comparetotmag 123.456E-89 123.456000E-89 -> 1
ddctm495 comparetotmag 123.456E+89 123.45600E+89 -> 1
ddctm496 comparetotmag 123.456E-89 123.4560E-89 -> 1
ddctm497 comparetotmag 123.456E+89 123.456E+89 -> 0
-- wide-ranging, around precision; signs equal
ddctm498 comparetotmag 1 1E-17 -> 1
ddctm499 comparetotmag 1 1E-16 -> 1
ddctm500 comparetotmag 1 1E-15 -> 1
ddctm501 comparetotmag 1 1E-14 -> 1
ddctm502 comparetotmag 1 1E-13 -> 1
ddctm503 comparetotmag 1 1E-12 -> 1
ddctm504 comparetotmag 1 1E-11 -> 1
ddctm505 comparetotmag 1 1E-10 -> 1
ddctm506 comparetotmag 1 1E-9 -> 1
ddctm507 comparetotmag 1 1E-8 -> 1
ddctm508 comparetotmag 1 1E-7 -> 1
ddctm509 comparetotmag 1 1E-6 -> 1
ddctm510 comparetotmag 1 1E-5 -> 1
ddctm511 comparetotmag 1 1E-4 -> 1
ddctm512 comparetotmag 1 1E-3 -> 1
ddctm513 comparetotmag 1 1E-2 -> 1
ddctm514 comparetotmag 1 1E-1 -> 1
ddctm515 comparetotmag 1 1E-0 -> 0
ddctm516 comparetotmag 1 1E+1 -> -1
ddctm517 comparetotmag 1 1E+2 -> -1
ddctm518 comparetotmag 1 1E+3 -> -1
ddctm519 comparetotmag 1 1E+4 -> -1
ddctm521 comparetotmag 1 1E+5 -> -1
ddctm522 comparetotmag 1 1E+6 -> -1
ddctm523 comparetotmag 1 1E+7 -> -1
ddctm524 comparetotmag 1 1E+8 -> -1
ddctm525 comparetotmag 1 1E+9 -> -1
ddctm526 comparetotmag 1 1E+10 -> -1
ddctm527 comparetotmag 1 1E+11 -> -1
ddctm528 comparetotmag 1 1E+12 -> -1
ddctm529 comparetotmag 1 1E+13 -> -1
ddctm530 comparetotmag 1 1E+14 -> -1
ddctm531 comparetotmag 1 1E+15 -> -1
ddctm532 comparetotmag 1 1E+16 -> -1
ddctm533 comparetotmag 1 1E+17 -> -1
-- LR swap
ddctm538 comparetotmag 1E-17 1 -> -1
ddctm539 comparetotmag 1E-16 1 -> -1
ddctm540 comparetotmag 1E-15 1 -> -1
ddctm541 comparetotmag 1E-14 1 -> -1
ddctm542 comparetotmag 1E-13 1 -> -1
ddctm543 comparetotmag 1E-12 1 -> -1
ddctm544 comparetotmag 1E-11 1 -> -1
ddctm545 comparetotmag 1E-10 1 -> -1
ddctm546 comparetotmag 1E-9 1 -> -1
ddctm547 comparetotmag 1E-8 1 -> -1
ddctm548 comparetotmag 1E-7 1 -> -1
ddctm549 comparetotmag 1E-6 1 -> -1
ddctm550 comparetotmag 1E-5 1 -> -1
ddctm551 comparetotmag 1E-4 1 -> -1
ddctm552 comparetotmag 1E-3 1 -> -1
ddctm553 comparetotmag 1E-2 1 -> -1
ddctm554 comparetotmag 1E-1 1 -> -1
ddctm555 comparetotmag 1E-0 1 -> 0
ddctm556 comparetotmag 1E+1 1 -> 1
ddctm557 comparetotmag 1E+2 1 -> 1
ddctm558 comparetotmag 1E+3 1 -> 1
ddctm559 comparetotmag 1E+4 1 -> 1
ddctm561 comparetotmag 1E+5 1 -> 1
ddctm562 comparetotmag 1E+6 1 -> 1
ddctm563 comparetotmag 1E+7 1 -> 1
ddctm564 comparetotmag 1E+8 1 -> 1
ddctm565 comparetotmag 1E+9 1 -> 1
ddctm566 comparetotmag 1E+10 1 -> 1
ddctm567 comparetotmag 1E+11 1 -> 1
ddctm568 comparetotmag 1E+12 1 -> 1
ddctm569 comparetotmag 1E+13 1 -> 1
ddctm570 comparetotmag 1E+14 1 -> 1
ddctm571 comparetotmag 1E+15 1 -> 1
ddctm572 comparetotmag 1E+16 1 -> 1
ddctm573 comparetotmag 1E+17 1 -> 1
-- similar with a useful coefficient, one side only
ddctm578 comparetotmag 0.000000987654321 1E-17 -> 1
ddctm579 comparetotmag 0.000000987654321 1E-16 -> 1
ddctm580 comparetotmag 0.000000987654321 1E-15 -> 1
ddctm581 comparetotmag 0.000000987654321 1E-14 -> 1
ddctm582 comparetotmag 0.000000987654321 1E-13 -> 1
ddctm583 comparetotmag 0.000000987654321 1E-12 -> 1
ddctm584 comparetotmag 0.000000987654321 1E-11 -> 1
ddctm585 comparetotmag 0.000000987654321 1E-10 -> 1
ddctm586 comparetotmag 0.000000987654321 1E-9 -> 1
ddctm587 comparetotmag 0.000000987654321 1E-8 -> 1
ddctm588 comparetotmag 0.000000987654321 1E-7 -> 1
ddctm589 comparetotmag 0.000000987654321 1E-6 -> -1
ddctm590 comparetotmag 0.000000987654321 1E-5 -> -1
ddctm591 comparetotmag 0.000000987654321 1E-4 -> -1
ddctm592 comparetotmag 0.000000987654321 1E-3 -> -1
ddctm593 comparetotmag 0.000000987654321 1E-2 -> -1
ddctm594 comparetotmag 0.000000987654321 1E-1 -> -1
ddctm595 comparetotmag 0.000000987654321 1E-0 -> -1
ddctm596 comparetotmag 0.000000987654321 1E+1 -> -1
ddctm597 comparetotmag 0.000000987654321 1E+2 -> -1
ddctm598 comparetotmag 0.000000987654321 1E+3 -> -1
ddctm599 comparetotmag 0.000000987654321 1E+4 -> -1
-- check some unit-y traps
ddctm600 comparetotmag 12 12.2345 -> -1
ddctm601 comparetotmag 12.0 12.2345 -> -1
ddctm602 comparetotmag 12.00 12.2345 -> -1
ddctm603 comparetotmag 12.000 12.2345 -> -1
ddctm604 comparetotmag 12.0000 12.2345 -> -1
ddctm605 comparetotmag 12.00000 12.2345 -> -1
ddctm606 comparetotmag 12.000000 12.2345 -> -1
ddctm607 comparetotmag 12.0000000 12.2345 -> -1
ddctm608 comparetotmag 12.00000000 12.2345 -> -1
ddctm609 comparetotmag 12.000000000 12.2345 -> -1
ddctm610 comparetotmag 12.1234 12 -> 1
ddctm611 comparetotmag 12.1234 12.0 -> 1
ddctm612 comparetotmag 12.1234 12.00 -> 1
ddctm613 comparetotmag 12.1234 12.000 -> 1
ddctm614 comparetotmag 12.1234 12.0000 -> 1
ddctm615 comparetotmag 12.1234 12.00000 -> 1
ddctm616 comparetotmag 12.1234 12.000000 -> 1
ddctm617 comparetotmag 12.1234 12.0000000 -> 1
ddctm618 comparetotmag 12.1234 12.00000000 -> 1
ddctm619 comparetotmag 12.1234 12.000000000 -> 1
ddctm620 comparetotmag -12 -12.2345 -> -1
ddctm621 comparetotmag -12.0 -12.2345 -> -1
ddctm622 comparetotmag -12.00 -12.2345 -> -1
ddctm623 comparetotmag -12.000 -12.2345 -> -1
ddctm624 comparetotmag -12.0000 -12.2345 -> -1
ddctm625 comparetotmag -12.00000 -12.2345 -> -1
ddctm626 comparetotmag -12.000000 -12.2345 -> -1
ddctm627 comparetotmag -12.0000000 -12.2345 -> -1
ddctm628 comparetotmag -12.00000000 -12.2345 -> -1
ddctm629 comparetotmag -12.000000000 -12.2345 -> -1
ddctm630 comparetotmag -12.1234 -12 -> 1
ddctm631 comparetotmag -12.1234 -12.0 -> 1
ddctm632 comparetotmag -12.1234 -12.00 -> 1
ddctm633 comparetotmag -12.1234 -12.000 -> 1
ddctm634 comparetotmag -12.1234 -12.0000 -> 1
ddctm635 comparetotmag -12.1234 -12.00000 -> 1
ddctm636 comparetotmag -12.1234 -12.000000 -> 1
ddctm637 comparetotmag -12.1234 -12.0000000 -> 1
ddctm638 comparetotmag -12.1234 -12.00000000 -> 1
ddctm639 comparetotmag -12.1234 -12.000000000 -> 1
-- extended zeros
ddctm640 comparetotmag 0 0 -> 0
ddctm641 comparetotmag 0 -0 -> 0
ddctm642 comparetotmag 0 -0.0 -> 1
ddctm643 comparetotmag 0 0.0 -> 1
ddctm644 comparetotmag -0 0 -> 0
ddctm645 comparetotmag -0 -0 -> 0
ddctm646 comparetotmag -0 -0.0 -> 1
ddctm647 comparetotmag -0 0.0 -> 1
ddctm648 comparetotmag 0.0 0 -> -1
ddctm649 comparetotmag 0.0 -0 -> -1
ddctm650 comparetotmag 0.0 -0.0 -> 0
ddctm651 comparetotmag 0.0 0.0 -> 0
ddctm652 comparetotmag -0.0 0 -> -1
ddctm653 comparetotmag -0.0 -0 -> -1
ddctm654 comparetotmag -0.0 -0.0 -> 0
ddctm655 comparetotmag -0.0 0.0 -> 0
ddctm656 comparetotmag -0E1 0.0 -> 1
ddctm657 comparetotmag -0E2 0.0 -> 1
ddctm658 comparetotmag 0E1 0.0 -> 1
ddctm659 comparetotmag 0E2 0.0 -> 1
ddctm660 comparetotmag -0E1 0 -> 1
ddctm661 comparetotmag -0E2 0 -> 1
ddctm662 comparetotmag 0E1 0 -> 1
ddctm663 comparetotmag 0E2 0 -> 1
ddctm664 comparetotmag -0E1 -0E1 -> 0
ddctm665 comparetotmag -0E2 -0E1 -> 1
ddctm666 comparetotmag 0E1 -0E1 -> 0
ddctm667 comparetotmag 0E2 -0E1 -> 1
ddctm668 comparetotmag -0E1 -0E2 -> -1
ddctm669 comparetotmag -0E2 -0E2 -> 0
ddctm670 comparetotmag 0E1 -0E2 -> -1
ddctm671 comparetotmag 0E2 -0E2 -> 0
ddctm672 comparetotmag -0E1 0E1 -> 0
ddctm673 comparetotmag -0E2 0E1 -> 1
ddctm674 comparetotmag 0E1 0E1 -> 0
ddctm675 comparetotmag 0E2 0E1 -> 1
ddctm676 comparetotmag -0E1 0E2 -> -1
ddctm677 comparetotmag -0E2 0E2 -> 0
ddctm678 comparetotmag 0E1 0E2 -> -1
ddctm679 comparetotmag 0E2 0E2 -> 0
-- trailing zeros; unit-y
ddctm680 comparetotmag 12 12 -> 0
ddctm681 comparetotmag 12 12.0 -> 1
ddctm682 comparetotmag 12 12.00 -> 1
ddctm683 comparetotmag 12 12.000 -> 1
ddctm684 comparetotmag 12 12.0000 -> 1
ddctm685 comparetotmag 12 12.00000 -> 1
ddctm686 comparetotmag 12 12.000000 -> 1
ddctm687 comparetotmag 12 12.0000000 -> 1
ddctm688 comparetotmag 12 12.00000000 -> 1
ddctm689 comparetotmag 12 12.000000000 -> 1
ddctm690 comparetotmag 12 12 -> 0
ddctm691 comparetotmag 12.0 12 -> -1
ddctm692 comparetotmag 12.00 12 -> -1
ddctm693 comparetotmag 12.000 12 -> -1
ddctm694 comparetotmag 12.0000 12 -> -1
ddctm695 comparetotmag 12.00000 12 -> -1
ddctm696 comparetotmag 12.000000 12 -> -1
ddctm697 comparetotmag 12.0000000 12 -> -1
ddctm698 comparetotmag 12.00000000 12 -> -1
ddctm699 comparetotmag 12.000000000 12 -> -1
-- old long operand checks
ddctm701 comparetotmag 12345678000 1 -> 1
ddctm702 comparetotmag 1 12345678000 -> -1
ddctm703 comparetotmag 1234567800 1 -> 1
ddctm704 comparetotmag 1 1234567800 -> -1
ddctm705 comparetotmag 1234567890 1 -> 1
ddctm706 comparetotmag 1 1234567890 -> -1
ddctm707 comparetotmag 1234567891 1 -> 1
ddctm708 comparetotmag 1 1234567891 -> -1
ddctm709 comparetotmag 12345678901 1 -> 1
ddctm710 comparetotmag 1 12345678901 -> -1
ddctm711 comparetotmag 1234567896 1 -> 1
ddctm712 comparetotmag 1 1234567896 -> -1
ddctm713 comparetotmag -1234567891 1 -> 1
ddctm714 comparetotmag 1 -1234567891 -> -1
ddctm715 comparetotmag -12345678901 1 -> 1
ddctm716 comparetotmag 1 -12345678901 -> -1
ddctm717 comparetotmag -1234567896 1 -> 1
ddctm718 comparetotmag 1 -1234567896 -> -1
-- old residue cases
ddctm740 comparetotmag 1 0.9999999 -> 1
ddctm741 comparetotmag 1 0.999999 -> 1
ddctm742 comparetotmag 1 0.99999 -> 1
ddctm743 comparetotmag 1 1.0000 -> 1
ddctm744 comparetotmag 1 1.00001 -> -1
ddctm745 comparetotmag 1 1.000001 -> -1
ddctm746 comparetotmag 1 1.0000001 -> -1
ddctm750 comparetotmag 0.9999999 1 -> -1
ddctm751 comparetotmag 0.999999 1 -> -1
ddctm752 comparetotmag 0.99999 1 -> -1
ddctm753 comparetotmag 1.0000 1 -> -1
ddctm754 comparetotmag 1.00001 1 -> 1
ddctm755 comparetotmag 1.000001 1 -> 1
ddctm756 comparetotmag 1.0000001 1 -> 1
-- Specials
ddctm780 comparetotmag Inf -Inf -> 0
ddctm781 comparetotmag Inf -1000 -> 1
ddctm782 comparetotmag Inf -1 -> 1
ddctm783 comparetotmag Inf -0 -> 1
ddctm784 comparetotmag Inf 0 -> 1
ddctm785 comparetotmag Inf 1 -> 1
ddctm786 comparetotmag Inf 1000 -> 1
ddctm787 comparetotmag Inf Inf -> 0
ddctm788 comparetotmag -1000 Inf -> -1
ddctm789 comparetotmag -Inf Inf -> 0
ddctm790 comparetotmag -1 Inf -> -1
ddctm791 comparetotmag -0 Inf -> -1
ddctm792 comparetotmag 0 Inf -> -1
ddctm793 comparetotmag 1 Inf -> -1
ddctm794 comparetotmag 1000 Inf -> -1
ddctm795 comparetotmag Inf Inf -> 0
ddctm800 comparetotmag -Inf -Inf -> 0
ddctm801 comparetotmag -Inf -1000 -> 1
ddctm802 comparetotmag -Inf -1 -> 1
ddctm803 comparetotmag -Inf -0 -> 1
ddctm804 comparetotmag -Inf 0 -> 1
ddctm805 comparetotmag -Inf 1 -> 1
ddctm806 comparetotmag -Inf 1000 -> 1
ddctm807 comparetotmag -Inf Inf -> 0
ddctm808 comparetotmag -Inf -Inf -> 0
ddctm809 comparetotmag -1000 -Inf -> -1
ddctm810 comparetotmag -1 -Inf -> -1
ddctm811 comparetotmag -0 -Inf -> -1
ddctm812 comparetotmag 0 -Inf -> -1
ddctm813 comparetotmag 1 -Inf -> -1
ddctm814 comparetotmag 1000 -Inf -> -1
ddctm815 comparetotmag Inf -Inf -> 0
ddctm821 comparetotmag NaN -Inf -> 1
ddctm822 comparetotmag NaN -1000 -> 1
ddctm823 comparetotmag NaN -1 -> 1
ddctm824 comparetotmag NaN -0 -> 1
ddctm825 comparetotmag NaN 0 -> 1
ddctm826 comparetotmag NaN 1 -> 1
ddctm827 comparetotmag NaN 1000 -> 1
ddctm828 comparetotmag NaN Inf -> 1
ddctm829 comparetotmag NaN NaN -> 0
ddctm830 comparetotmag -Inf NaN -> -1
ddctm831 comparetotmag -1000 NaN -> -1
ddctm832 comparetotmag -1 NaN -> -1
ddctm833 comparetotmag -0 NaN -> -1
ddctm834 comparetotmag 0 NaN -> -1
ddctm835 comparetotmag 1 NaN -> -1
ddctm836 comparetotmag 1000 NaN -> -1
ddctm837 comparetotmag Inf NaN -> -1
ddctm838 comparetotmag -NaN -NaN -> 0
ddctm839 comparetotmag +NaN -NaN -> 0
ddctm840 comparetotmag -NaN +NaN -> 0
ddctm841 comparetotmag sNaN -sNaN -> 0
ddctm842 comparetotmag sNaN -NaN -> -1
ddctm843 comparetotmag sNaN -Inf -> 1
ddctm844 comparetotmag sNaN -1000 -> 1
ddctm845 comparetotmag sNaN -1 -> 1
ddctm846 comparetotmag sNaN -0 -> 1
ddctm847 comparetotmag sNaN 0 -> 1
ddctm848 comparetotmag sNaN 1 -> 1
ddctm849 comparetotmag sNaN 1000 -> 1
ddctm850 comparetotmag sNaN NaN -> -1
ddctm851 comparetotmag sNaN sNaN -> 0
ddctm852 comparetotmag -sNaN sNaN -> 0
ddctm853 comparetotmag -NaN sNaN -> 1
ddctm854 comparetotmag -Inf sNaN -> -1
ddctm855 comparetotmag -1000 sNaN -> -1
ddctm856 comparetotmag -1 sNaN -> -1
ddctm857 comparetotmag -0 sNaN -> -1
ddctm858 comparetotmag 0 sNaN -> -1
ddctm859 comparetotmag 1 sNaN -> -1
ddctm860 comparetotmag 1000 sNaN -> -1
ddctm861 comparetotmag Inf sNaN -> -1
ddctm862 comparetotmag NaN sNaN -> 1
ddctm863 comparetotmag sNaN sNaN -> 0
ddctm871 comparetotmag -sNaN -sNaN -> 0
ddctm872 comparetotmag -sNaN -NaN -> -1
ddctm873 comparetotmag -sNaN -Inf -> 1
ddctm874 comparetotmag -sNaN -1000 -> 1
ddctm875 comparetotmag -sNaN -1 -> 1
ddctm876 comparetotmag -sNaN -0 -> 1
ddctm877 comparetotmag -sNaN 0 -> 1
ddctm878 comparetotmag -sNaN 1 -> 1
ddctm879 comparetotmag -sNaN 1000 -> 1
ddctm880 comparetotmag -sNaN NaN -> -1
ddctm881 comparetotmag -sNaN sNaN -> 0
ddctm882 comparetotmag -sNaN -sNaN -> 0
ddctm883 comparetotmag -NaN -sNaN -> 1
ddctm884 comparetotmag -Inf -sNaN -> -1
ddctm885 comparetotmag -1000 -sNaN -> -1
ddctm886 comparetotmag -1 -sNaN -> -1
ddctm887 comparetotmag -0 -sNaN -> -1
ddctm888 comparetotmag 0 -sNaN -> -1
ddctm889 comparetotmag 1 -sNaN -> -1
ddctm890 comparetotmag 1000 -sNaN -> -1
ddctm891 comparetotmag Inf -sNaN -> -1
ddctm892 comparetotmag NaN -sNaN -> 1
ddctm893 comparetotmag sNaN -sNaN -> 0
-- NaNs with payload
ddctm960 comparetotmag NaN9 -Inf -> 1
ddctm961 comparetotmag NaN8 999 -> 1
ddctm962 comparetotmag NaN77 Inf -> 1
ddctm963 comparetotmag -NaN67 NaN5 -> 1
ddctm964 comparetotmag -Inf -NaN4 -> -1
ddctm965 comparetotmag -999 -NaN33 -> -1
ddctm966 comparetotmag Inf NaN2 -> -1
ddctm970 comparetotmag -NaN41 -NaN42 -> -1
ddctm971 comparetotmag +NaN41 -NaN42 -> -1
ddctm972 comparetotmag -NaN41 +NaN42 -> -1
ddctm973 comparetotmag +NaN41 +NaN42 -> -1
ddctm974 comparetotmag -NaN42 -NaN01 -> 1
ddctm975 comparetotmag +NaN42 -NaN01 -> 1
ddctm976 comparetotmag -NaN42 +NaN01 -> 1
ddctm977 comparetotmag +NaN42 +NaN01 -> 1
ddctm980 comparetotmag -sNaN771 -sNaN772 -> -1
ddctm981 comparetotmag +sNaN771 -sNaN772 -> -1
ddctm982 comparetotmag -sNaN771 +sNaN772 -> -1
ddctm983 comparetotmag +sNaN771 +sNaN772 -> -1
ddctm984 comparetotmag -sNaN772 -sNaN771 -> 1
ddctm985 comparetotmag +sNaN772 -sNaN771 -> 1
ddctm986 comparetotmag -sNaN772 +sNaN771 -> 1
ddctm987 comparetotmag +sNaN772 +sNaN771 -> 1
ddctm991 comparetotmag -sNaN99 -Inf -> 1
ddctm992 comparetotmag sNaN98 -11 -> 1
ddctm993 comparetotmag sNaN97 NaN -> -1
ddctm994 comparetotmag sNaN16 sNaN94 -> -1
ddctm995 comparetotmag NaN85 sNaN83 -> 1
ddctm996 comparetotmag -Inf sNaN92 -> -1
ddctm997 comparetotmag 088 sNaN81 -> -1
ddctm998 comparetotmag Inf sNaN90 -> -1
ddctm999 comparetotmag NaN -sNaN89 -> 1
-- spread zeros
ddctm1110 comparetotmag 0E-383 0 -> -1
ddctm1111 comparetotmag 0E-383 -0 -> -1
ddctm1112 comparetotmag -0E-383 0 -> -1
ddctm1113 comparetotmag -0E-383 -0 -> -1
ddctm1114 comparetotmag 0E-383 0E+384 -> -1
ddctm1115 comparetotmag 0E-383 -0E+384 -> -1
ddctm1116 comparetotmag -0E-383 0E+384 -> -1
ddctm1117 comparetotmag -0E-383 -0E+384 -> -1
ddctm1118 comparetotmag 0 0E+384 -> -1
ddctm1119 comparetotmag 0 -0E+384 -> -1
ddctm1120 comparetotmag -0 0E+384 -> -1
ddctm1121 comparetotmag -0 -0E+384 -> -1
ddctm1130 comparetotmag 0E+384 0 -> 1
ddctm1131 comparetotmag 0E+384 -0 -> 1
ddctm1132 comparetotmag -0E+384 0 -> 1
ddctm1133 comparetotmag -0E+384 -0 -> 1
ddctm1134 comparetotmag 0E+384 0E-383 -> 1
ddctm1135 comparetotmag 0E+384 -0E-383 -> 1
ddctm1136 comparetotmag -0E+384 0E-383 -> 1
ddctm1137 comparetotmag -0E+384 -0E-383 -> 1
ddctm1138 comparetotmag 0 0E-383 -> 1
ddctm1139 comparetotmag 0 -0E-383 -> 1
ddctm1140 comparetotmag -0 0E-383 -> 1
ddctm1141 comparetotmag -0 -0E-383 -> 1
-- Null tests
ddctm9990 comparetotmag 10 # -> NaN Invalid_operation
ddctm9991 comparetotmag # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,88 @@
------------------------------------------------------------------------
-- ddCopy.decTest -- quiet decDouble copy --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decDoubles.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check
ddcpy001 copy +7.50 -> 7.50
-- Infinities
ddcpy011 copy Infinity -> Infinity
ddcpy012 copy -Infinity -> -Infinity
-- NaNs, 0 payload
ddcpy021 copy NaN -> NaN
ddcpy022 copy -NaN -> -NaN
ddcpy023 copy sNaN -> sNaN
ddcpy024 copy -sNaN -> -sNaN
-- NaNs, non-0 payload
ddcpy031 copy NaN10 -> NaN10
ddcpy032 copy -NaN10 -> -NaN10
ddcpy033 copy sNaN10 -> sNaN10
ddcpy034 copy -sNaN10 -> -sNaN10
ddcpy035 copy NaN7 -> NaN7
ddcpy036 copy -NaN7 -> -NaN7
ddcpy037 copy sNaN101 -> sNaN101
ddcpy038 copy -sNaN101 -> -sNaN101
-- finites
ddcpy101 copy 7 -> 7
ddcpy102 copy -7 -> -7
ddcpy103 copy 75 -> 75
ddcpy104 copy -75 -> -75
ddcpy105 copy 7.50 -> 7.50
ddcpy106 copy -7.50 -> -7.50
ddcpy107 copy 7.500 -> 7.500
ddcpy108 copy -7.500 -> -7.500
-- zeros
ddcpy111 copy 0 -> 0
ddcpy112 copy -0 -> -0
ddcpy113 copy 0E+4 -> 0E+4
ddcpy114 copy -0E+4 -> -0E+4
ddcpy115 copy 0.0000 -> 0.0000
ddcpy116 copy -0.0000 -> -0.0000
ddcpy117 copy 0E-141 -> 0E-141
ddcpy118 copy -0E-141 -> -0E-141
-- full coefficients, alternating bits
ddcpy121 copy 2682682682682682 -> 2682682682682682
ddcpy122 copy -2682682682682682 -> -2682682682682682
ddcpy123 copy 1341341341341341 -> 1341341341341341
ddcpy124 copy -1341341341341341 -> -1341341341341341
-- Nmax, Nmin, Ntiny
ddcpy131 copy 9.999999999999999E+384 -> 9.999999999999999E+384
ddcpy132 copy 1E-383 -> 1E-383
ddcpy133 copy 1.000000000000000E-383 -> 1.000000000000000E-383
ddcpy134 copy 1E-398 -> 1E-398
ddcpy135 copy -1E-398 -> -1E-398
ddcpy136 copy -1.000000000000000E-383 -> -1.000000000000000E-383
ddcpy137 copy -1E-383 -> -1E-383
ddcpy138 copy -9.999999999999999E+384 -> -9.999999999999999E+384

View File

@@ -0,0 +1,88 @@
------------------------------------------------------------------------
-- ddCopyAbs.decTest -- quiet decDouble copy and set sign to zero --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decDoubles.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check
ddcpa001 copyabs +7.50 -> 7.50
-- Infinities
ddcpa011 copyabs Infinity -> Infinity
ddcpa012 copyabs -Infinity -> Infinity
-- NaNs, 0 payload
ddcpa021 copyabs NaN -> NaN
ddcpa022 copyabs -NaN -> NaN
ddcpa023 copyabs sNaN -> sNaN
ddcpa024 copyabs -sNaN -> sNaN
-- NaNs, non-0 payload
ddcpa031 copyabs NaN10 -> NaN10
ddcpa032 copyabs -NaN15 -> NaN15
ddcpa033 copyabs sNaN15 -> sNaN15
ddcpa034 copyabs -sNaN10 -> sNaN10
ddcpa035 copyabs NaN7 -> NaN7
ddcpa036 copyabs -NaN7 -> NaN7
ddcpa037 copyabs sNaN101 -> sNaN101
ddcpa038 copyabs -sNaN101 -> sNaN101
-- finites
ddcpa101 copyabs 7 -> 7
ddcpa102 copyabs -7 -> 7
ddcpa103 copyabs 75 -> 75
ddcpa104 copyabs -75 -> 75
ddcpa105 copyabs 7.10 -> 7.10
ddcpa106 copyabs -7.10 -> 7.10
ddcpa107 copyabs 7.500 -> 7.500
ddcpa108 copyabs -7.500 -> 7.500
-- zeros
ddcpa111 copyabs 0 -> 0
ddcpa112 copyabs -0 -> 0
ddcpa113 copyabs 0E+6 -> 0E+6
ddcpa114 copyabs -0E+6 -> 0E+6
ddcpa115 copyabs 0.0000 -> 0.0000
ddcpa116 copyabs -0.0000 -> 0.0000
ddcpa117 copyabs 0E-141 -> 0E-141
ddcpa118 copyabs -0E-141 -> 0E-141
-- full coefficients, alternating bits
ddcpa121 copyabs 2682682682682682 -> 2682682682682682
ddcpa122 copyabs -2682682682682682 -> 2682682682682682
ddcpa123 copyabs 1341341341341341 -> 1341341341341341
ddcpa124 copyabs -1341341341341341 -> 1341341341341341
-- Nmax, Nmin, Ntiny
ddcpa131 copyabs 9.999999999999999E+384 -> 9.999999999999999E+384
ddcpa132 copyabs 1E-383 -> 1E-383
ddcpa133 copyabs 1.000000000000000E-383 -> 1.000000000000000E-383
ddcpa134 copyabs 1E-398 -> 1E-398
ddcpa135 copyabs -1E-398 -> 1E-398
ddcpa136 copyabs -1.000000000000000E-383 -> 1.000000000000000E-383
ddcpa137 copyabs -1E-383 -> 1E-383
ddcpa138 copyabs -9.999999999999999E+384 -> 9.999999999999999E+384

View File

@@ -0,0 +1,88 @@
------------------------------------------------------------------------
-- ddCopyNegate.decTest -- quiet decDouble copy and negate --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decDoubles.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check
ddcpn001 copynegate +7.50 -> -7.50
-- Infinities
ddcpn011 copynegate Infinity -> -Infinity
ddcpn012 copynegate -Infinity -> Infinity
-- NaNs, 0 payload
ddcpn021 copynegate NaN -> -NaN
ddcpn022 copynegate -NaN -> NaN
ddcpn023 copynegate sNaN -> -sNaN
ddcpn024 copynegate -sNaN -> sNaN
-- NaNs, non-0 payload
ddcpn031 copynegate NaN13 -> -NaN13
ddcpn032 copynegate -NaN13 -> NaN13
ddcpn033 copynegate sNaN13 -> -sNaN13
ddcpn034 copynegate -sNaN13 -> sNaN13
ddcpn035 copynegate NaN70 -> -NaN70
ddcpn036 copynegate -NaN70 -> NaN70
ddcpn037 copynegate sNaN101 -> -sNaN101
ddcpn038 copynegate -sNaN101 -> sNaN101
-- finites
ddcpn101 copynegate 7 -> -7
ddcpn102 copynegate -7 -> 7
ddcpn103 copynegate 75 -> -75
ddcpn104 copynegate -75 -> 75
ddcpn105 copynegate 7.50 -> -7.50
ddcpn106 copynegate -7.50 -> 7.50
ddcpn107 copynegate 7.500 -> -7.500
ddcpn108 copynegate -7.500 -> 7.500
-- zeros
ddcpn111 copynegate 0 -> -0
ddcpn112 copynegate -0 -> 0
ddcpn113 copynegate 0E+4 -> -0E+4
ddcpn114 copynegate -0E+4 -> 0E+4
ddcpn115 copynegate 0.0000 -> -0.0000
ddcpn116 copynegate -0.0000 -> 0.0000
ddcpn117 copynegate 0E-141 -> -0E-141
ddcpn118 copynegate -0E-141 -> 0E-141
-- full coefficients, alternating bits
ddcpn121 copynegate 2682682682682682 -> -2682682682682682
ddcpn122 copynegate -2682682682682682 -> 2682682682682682
ddcpn123 copynegate 1341341341341341 -> -1341341341341341
ddcpn124 copynegate -1341341341341341 -> 1341341341341341
-- Nmax, Nmin, Ntiny
ddcpn131 copynegate 9.999999999999999E+384 -> -9.999999999999999E+384
ddcpn132 copynegate 1E-383 -> -1E-383
ddcpn133 copynegate 1.000000000000000E-383 -> -1.000000000000000E-383
ddcpn134 copynegate 1E-398 -> -1E-398
ddcpn135 copynegate -1E-398 -> 1E-398
ddcpn136 copynegate -1.000000000000000E-383 -> 1.000000000000000E-383
ddcpn137 copynegate -1E-383 -> 1E-383
ddcpn138 copynegate -9.999999999999999E+384 -> 9.999999999999999E+384

View File

@@ -0,0 +1,175 @@
------------------------------------------------------------------------
-- ddCopySign.decTest -- quiet decDouble copy with sign from rhs --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decDoubles.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check
ddcps001 copysign +7.50 11 -> 7.50
-- Infinities
ddcps011 copysign Infinity 11 -> Infinity
ddcps012 copysign -Infinity 11 -> Infinity
-- NaNs, 0 payload
ddcps021 copysign NaN 11 -> NaN
ddcps022 copysign -NaN 11 -> NaN
ddcps023 copysign sNaN 11 -> sNaN
ddcps024 copysign -sNaN 11 -> sNaN
-- NaNs, non-0 payload
ddcps031 copysign NaN10 11 -> NaN10
ddcps032 copysign -NaN10 11 -> NaN10
ddcps033 copysign sNaN10 11 -> sNaN10
ddcps034 copysign -sNaN10 11 -> sNaN10
ddcps035 copysign NaN7 11 -> NaN7
ddcps036 copysign -NaN7 11 -> NaN7
ddcps037 copysign sNaN101 11 -> sNaN101
ddcps038 copysign -sNaN101 11 -> sNaN101
-- finites
ddcps101 copysign 7 11 -> 7
ddcps102 copysign -7 11 -> 7
ddcps103 copysign 75 11 -> 75
ddcps104 copysign -75 11 -> 75
ddcps105 copysign 7.50 11 -> 7.50
ddcps106 copysign -7.50 11 -> 7.50
ddcps107 copysign 7.500 11 -> 7.500
ddcps108 copysign -7.500 11 -> 7.500
-- zeros
ddcps111 copysign 0 11 -> 0
ddcps112 copysign -0 11 -> 0
ddcps113 copysign 0E+4 11 -> 0E+4
ddcps114 copysign -0E+4 11 -> 0E+4
ddcps115 copysign 0.0000 11 -> 0.0000
ddcps116 copysign -0.0000 11 -> 0.0000
ddcps117 copysign 0E-141 11 -> 0E-141
ddcps118 copysign -0E-141 11 -> 0E-141
-- full coefficients, alternating bits
ddcps121 copysign 2682682682682682 11 -> 2682682682682682
ddcps122 copysign -2682682682682682 11 -> 2682682682682682
ddcps123 copysign 1341341341341341 11 -> 1341341341341341
ddcps124 copysign -1341341341341341 11 -> 1341341341341341
-- Nmax, Nmin, Ntiny
ddcps131 copysign 9.999999999999999E+384 11 -> 9.999999999999999E+384
ddcps132 copysign 1E-383 11 -> 1E-383
ddcps133 copysign 1.000000000000000E-383 11 -> 1.000000000000000E-383
ddcps134 copysign 1E-398 11 -> 1E-398
ddcps135 copysign -1E-398 11 -> 1E-398
ddcps136 copysign -1.000000000000000E-383 11 -> 1.000000000000000E-383
ddcps137 copysign -1E-383 11 -> 1E-383
ddcps138 copysign -9.999999999999999E+384 11 -> 9.999999999999999E+384
-- repeat with negative RHS
-- Infinities
ddcps211 copysign Infinity -34 -> -Infinity
ddcps212 copysign -Infinity -34 -> -Infinity
-- NaNs, 0 payload
ddcps221 copysign NaN -34 -> -NaN
ddcps222 copysign -NaN -34 -> -NaN
ddcps223 copysign sNaN -34 -> -sNaN
ddcps224 copysign -sNaN -34 -> -sNaN
-- NaNs, non-0 payload
ddcps231 copysign NaN10 -34 -> -NaN10
ddcps232 copysign -NaN10 -34 -> -NaN10
ddcps233 copysign sNaN10 -34 -> -sNaN10
ddcps234 copysign -sNaN10 -34 -> -sNaN10
ddcps235 copysign NaN7 -34 -> -NaN7
ddcps236 copysign -NaN7 -34 -> -NaN7
ddcps237 copysign sNaN101 -34 -> -sNaN101
ddcps238 copysign -sNaN101 -34 -> -sNaN101
-- finites
ddcps301 copysign 7 -34 -> -7
ddcps302 copysign -7 -34 -> -7
ddcps303 copysign 75 -34 -> -75
ddcps304 copysign -75 -34 -> -75
ddcps305 copysign 7.50 -34 -> -7.50
ddcps306 copysign -7.50 -34 -> -7.50
ddcps307 copysign 7.500 -34 -> -7.500
ddcps308 copysign -7.500 -34 -> -7.500
-- zeros
ddcps311 copysign 0 -34 -> -0
ddcps312 copysign -0 -34 -> -0
ddcps313 copysign 0E+4 -34 -> -0E+4
ddcps314 copysign -0E+4 -34 -> -0E+4
ddcps315 copysign 0.0000 -34 -> -0.0000
ddcps316 copysign -0.0000 -34 -> -0.0000
ddcps317 copysign 0E-141 -34 -> -0E-141
ddcps318 copysign -0E-141 -34 -> -0E-141
-- full coefficients, alternating bits
ddcps321 copysign 2682682682682682 -34 -> -2682682682682682
ddcps322 copysign -2682682682682682 -34 -> -2682682682682682
ddcps323 copysign 1341341341341341 -34 -> -1341341341341341
ddcps324 copysign -1341341341341341 -34 -> -1341341341341341
-- Nmax, Nmin, Ntiny
ddcps331 copysign 9.999999999999999E+384 -34 -> -9.999999999999999E+384
ddcps332 copysign 1E-383 -34 -> -1E-383
ddcps333 copysign 1.000000000000000E-383 -34 -> -1.000000000000000E-383
ddcps334 copysign 1E-398 -34 -> -1E-398
ddcps335 copysign -1E-398 -34 -> -1E-398
ddcps336 copysign -1.000000000000000E-383 -34 -> -1.000000000000000E-383
ddcps337 copysign -1E-383 -34 -> -1E-383
ddcps338 copysign -9.999999999999999E+384 -34 -> -9.999999999999999E+384
-- Other kinds of RHS
ddcps401 copysign 701 -34 -> -701
ddcps402 copysign -720 -34 -> -720
ddcps403 copysign 701 -0 -> -701
ddcps404 copysign -720 -0 -> -720
ddcps405 copysign 701 +0 -> 701
ddcps406 copysign -720 +0 -> 720
ddcps407 copysign 701 +34 -> 701
ddcps408 copysign -720 +34 -> 720
ddcps413 copysign 701 -Inf -> -701
ddcps414 copysign -720 -Inf -> -720
ddcps415 copysign 701 +Inf -> 701
ddcps416 copysign -720 +Inf -> 720
ddcps420 copysign 701 -NaN -> -701
ddcps421 copysign -720 -NaN -> -720
ddcps422 copysign 701 +NaN -> 701
ddcps423 copysign -720 +NaN -> 720
ddcps425 copysign -720 +NaN8 -> 720
ddcps426 copysign 701 -sNaN -> -701
ddcps427 copysign -720 -sNaN -> -720
ddcps428 copysign 701 +sNaN -> 701
ddcps429 copysign -720 +sNaN -> 720
ddcps430 copysign -720 +sNaN3 -> 720

View File

@@ -0,0 +1,449 @@
------------------------------------------------------------------------
-- ddDivideInt.decTest -- decDouble integer division --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
dddvi001 divideint 1 1 -> 1
dddvi002 divideint 2 1 -> 2
dddvi003 divideint 1 2 -> 0
dddvi004 divideint 2 2 -> 1
dddvi005 divideint 0 1 -> 0
dddvi006 divideint 0 2 -> 0
dddvi007 divideint 1 3 -> 0
dddvi008 divideint 2 3 -> 0
dddvi009 divideint 3 3 -> 1
dddvi010 divideint 2.4 1 -> 2
dddvi011 divideint 2.4 -1 -> -2
dddvi012 divideint -2.4 1 -> -2
dddvi013 divideint -2.4 -1 -> 2
dddvi014 divideint 2.40 1 -> 2
dddvi015 divideint 2.400 1 -> 2
dddvi016 divideint 2.4 2 -> 1
dddvi017 divideint 2.400 2 -> 1
dddvi018 divideint 2. 2 -> 1
dddvi019 divideint 20 20 -> 1
dddvi020 divideint 187 187 -> 1
dddvi021 divideint 5 2 -> 2
dddvi022 divideint 5 2.0 -> 2
dddvi023 divideint 5 2.000 -> 2
dddvi024 divideint 5 0.200 -> 25
dddvi025 divideint 5 0.200 -> 25
dddvi030 divideint 1 2 -> 0
dddvi031 divideint 1 4 -> 0
dddvi032 divideint 1 8 -> 0
dddvi033 divideint 1 16 -> 0
dddvi034 divideint 1 32 -> 0
dddvi035 divideint 1 64 -> 0
dddvi040 divideint 1 -2 -> -0
dddvi041 divideint 1 -4 -> -0
dddvi042 divideint 1 -8 -> -0
dddvi043 divideint 1 -16 -> -0
dddvi044 divideint 1 -32 -> -0
dddvi045 divideint 1 -64 -> -0
dddvi050 divideint -1 2 -> -0
dddvi051 divideint -1 4 -> -0
dddvi052 divideint -1 8 -> -0
dddvi053 divideint -1 16 -> -0
dddvi054 divideint -1 32 -> -0
dddvi055 divideint -1 64 -> -0
dddvi060 divideint -1 -2 -> 0
dddvi061 divideint -1 -4 -> 0
dddvi062 divideint -1 -8 -> 0
dddvi063 divideint -1 -16 -> 0
dddvi064 divideint -1 -32 -> 0
dddvi065 divideint -1 -64 -> 0
-- similar with powers of ten
dddvi160 divideint 1 1 -> 1
dddvi161 divideint 1 10 -> 0
dddvi162 divideint 1 100 -> 0
dddvi163 divideint 1 1000 -> 0
dddvi164 divideint 1 10000 -> 0
dddvi165 divideint 1 100000 -> 0
dddvi166 divideint 1 1000000 -> 0
dddvi167 divideint 1 10000000 -> 0
dddvi168 divideint 1 100000000 -> 0
dddvi170 divideint 1 -1 -> -1
dddvi171 divideint 1 -10 -> -0
dddvi172 divideint 1 -100 -> -0
dddvi173 divideint 1 -1000 -> -0
dddvi174 divideint 1 -10000 -> -0
dddvi175 divideint 1 -100000 -> -0
dddvi176 divideint 1 -1000000 -> -0
dddvi177 divideint 1 -10000000 -> -0
dddvi178 divideint 1 -100000000 -> -0
dddvi180 divideint -1 1 -> -1
dddvi181 divideint -1 10 -> -0
dddvi182 divideint -1 100 -> -0
dddvi183 divideint -1 1000 -> -0
dddvi184 divideint -1 10000 -> -0
dddvi185 divideint -1 100000 -> -0
dddvi186 divideint -1 1000000 -> -0
dddvi187 divideint -1 10000000 -> -0
dddvi188 divideint -1 100000000 -> -0
dddvi190 divideint -1 -1 -> 1
dddvi191 divideint -1 -10 -> 0
dddvi192 divideint -1 -100 -> 0
dddvi193 divideint -1 -1000 -> 0
dddvi194 divideint -1 -10000 -> 0
dddvi195 divideint -1 -100000 -> 0
dddvi196 divideint -1 -1000000 -> 0
dddvi197 divideint -1 -10000000 -> 0
dddvi198 divideint -1 -100000000 -> 0
-- some long operand (at p=9) cases
dddvi070 divideint 999999999 1 -> 999999999
dddvi071 divideint 999999999.4 1 -> 999999999
dddvi072 divideint 999999999.5 1 -> 999999999
dddvi073 divideint 999999999.9 1 -> 999999999
dddvi074 divideint 999999999.999 1 -> 999999999
dddvi090 divideint 0. 1 -> 0
dddvi091 divideint .0 1 -> 0
dddvi092 divideint 0.00 1 -> 0
dddvi093 divideint 0.00E+9 1 -> 0
dddvi094 divideint 0.0000E-50 1 -> 0
dddvi100 divideint 1 1 -> 1
dddvi101 divideint 1 2 -> 0
dddvi102 divideint 1 3 -> 0
dddvi103 divideint 1 4 -> 0
dddvi104 divideint 1 5 -> 0
dddvi105 divideint 1 6 -> 0
dddvi106 divideint 1 7 -> 0
dddvi107 divideint 1 8 -> 0
dddvi108 divideint 1 9 -> 0
dddvi109 divideint 1 10 -> 0
dddvi110 divideint 1 1 -> 1
dddvi111 divideint 2 1 -> 2
dddvi112 divideint 3 1 -> 3
dddvi113 divideint 4 1 -> 4
dddvi114 divideint 5 1 -> 5
dddvi115 divideint 6 1 -> 6
dddvi116 divideint 7 1 -> 7
dddvi117 divideint 8 1 -> 8
dddvi118 divideint 9 1 -> 9
dddvi119 divideint 10 1 -> 10
-- from DiagBigDecimal
dddvi131 divideint 101.3 1 -> 101
dddvi132 divideint 101.0 1 -> 101
dddvi133 divideint 101.3 3 -> 33
dddvi134 divideint 101.0 3 -> 33
dddvi135 divideint 2.4 1 -> 2
dddvi136 divideint 2.400 1 -> 2
dddvi137 divideint 18 18 -> 1
dddvi138 divideint 1120 1000 -> 1
dddvi139 divideint 2.4 2 -> 1
dddvi140 divideint 2.400 2 -> 1
dddvi141 divideint 0.5 2.000 -> 0
dddvi142 divideint 8.005 7 -> 1
dddvi143 divideint 5 2 -> 2
dddvi144 divideint 0 2 -> 0
dddvi145 divideint 0.00 2 -> 0
-- Others
dddvi150 divideint 12345 4.999 -> 2469
dddvi151 divideint 12345 4.99 -> 2473
dddvi152 divideint 12345 4.9 -> 2519
dddvi153 divideint 12345 5 -> 2469
dddvi154 divideint 12345 5.1 -> 2420
dddvi155 divideint 12345 5.01 -> 2464
dddvi156 divideint 12345 5.001 -> 2468
dddvi157 divideint 101 7.6 -> 13
-- Various flavours of divideint by 0
dddvi201 divideint 0 0 -> NaN Division_undefined
dddvi202 divideint 0.0E5 0 -> NaN Division_undefined
dddvi203 divideint 0.000 0 -> NaN Division_undefined
dddvi204 divideint 0.0001 0 -> Infinity Division_by_zero
dddvi205 divideint 0.01 0 -> Infinity Division_by_zero
dddvi206 divideint 0.1 0 -> Infinity Division_by_zero
dddvi207 divideint 1 0 -> Infinity Division_by_zero
dddvi208 divideint 1 0.0 -> Infinity Division_by_zero
dddvi209 divideint 10 0.0 -> Infinity Division_by_zero
dddvi210 divideint 1E+100 0.0 -> Infinity Division_by_zero
dddvi211 divideint 1E+380 0 -> Infinity Division_by_zero
dddvi214 divideint -0.0001 0 -> -Infinity Division_by_zero
dddvi215 divideint -0.01 0 -> -Infinity Division_by_zero
dddvi216 divideint -0.1 0 -> -Infinity Division_by_zero
dddvi217 divideint -1 0 -> -Infinity Division_by_zero
dddvi218 divideint -1 0.0 -> -Infinity Division_by_zero
dddvi219 divideint -10 0.0 -> -Infinity Division_by_zero
dddvi220 divideint -1E+100 0.0 -> -Infinity Division_by_zero
dddvi221 divideint -1E+380 0 -> -Infinity Division_by_zero
-- test some cases that are close to exponent overflow
dddvi270 divideint 1 1e384 -> 0
dddvi271 divideint 1 0.9e384 -> 0
dddvi272 divideint 1 0.99e384 -> 0
dddvi273 divideint 1 0.9999999999999999e384 -> 0
dddvi274 divideint 9e384 1 -> NaN Division_impossible
dddvi275 divideint 9.9e384 1 -> NaN Division_impossible
dddvi276 divideint 9.99e384 1 -> NaN Division_impossible
dddvi277 divideint 9.999999999999999e384 1 -> NaN Division_impossible
dddvi280 divideint 0.1 9e-383 -> NaN Division_impossible
dddvi281 divideint 0.1 99e-383 -> NaN Division_impossible
dddvi282 divideint 0.1 999e-383 -> NaN Division_impossible
dddvi283 divideint 0.1 9e-382 -> NaN Division_impossible
dddvi284 divideint 0.1 99e-382 -> NaN Division_impossible
-- GD edge cases: lhs smaller than rhs but more digits
dddvi301 divideint 0.9 2 -> 0
dddvi302 divideint 0.9 2.0 -> 0
dddvi303 divideint 0.9 2.1 -> 0
dddvi304 divideint 0.9 2.00 -> 0
dddvi305 divideint 0.9 2.01 -> 0
dddvi306 divideint 0.12 1 -> 0
dddvi307 divideint 0.12 1.0 -> 0
dddvi308 divideint 0.12 1.00 -> 0
dddvi309 divideint 0.12 1.0 -> 0
dddvi310 divideint 0.12 1.00 -> 0
dddvi311 divideint 0.12 2 -> 0
dddvi312 divideint 0.12 2.0 -> 0
dddvi313 divideint 0.12 2.1 -> 0
dddvi314 divideint 0.12 2.00 -> 0
dddvi315 divideint 0.12 2.01 -> 0
-- edge cases of impossible
dddvi330 divideint 1234567890123456 10 -> 123456789012345
dddvi331 divideint 1234567890123456 1 -> 1234567890123456
dddvi332 divideint 1234567890123456 0.1 -> NaN Division_impossible
dddvi333 divideint 1234567890123456 0.01 -> NaN Division_impossible
-- overflow and underflow tests [from divide]
dddvi1051 divideint 1e+277 1e-311 -> NaN Division_impossible
dddvi1052 divideint 1e+277 -1e-311 -> NaN Division_impossible
dddvi1053 divideint -1e+277 1e-311 -> NaN Division_impossible
dddvi1054 divideint -1e+277 -1e-311 -> NaN Division_impossible
dddvi1055 divideint 1e-277 1e+311 -> 0
dddvi1056 divideint 1e-277 -1e+311 -> -0
dddvi1057 divideint -1e-277 1e+311 -> -0
dddvi1058 divideint -1e-277 -1e+311 -> 0
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
dddvi1060 divideint 1e-291 1e+101 -> 0
dddvi1061 divideint 1e-291 1e+102 -> 0
dddvi1062 divideint 1e-291 1e+103 -> 0
dddvi1063 divideint 1e-291 1e+104 -> 0
dddvi1064 divideint 1e-291 1e+105 -> 0
dddvi1065 divideint 1e-291 1e+106 -> 0
dddvi1066 divideint 1e-291 1e+107 -> 0
dddvi1067 divideint 1e-291 1e+108 -> 0
dddvi1068 divideint 1e-291 1e+109 -> 0
dddvi1069 divideint 1e-291 1e+110 -> 0
dddvi1101 divideint 1.0000E-394 1 -> 0
dddvi1102 divideint 1.000E-394 1e+1 -> 0
dddvi1103 divideint 1.00E-394 1e+2 -> 0
dddvi1118 divideint 1E-394 1e+4 -> 0
dddvi1119 divideint 3E-394 -1e+5 -> -0
dddvi1120 divideint 5E-394 1e+5 -> 0
dddvi1124 divideint 1E-394 -1e+4 -> -0
dddvi1130 divideint 3.0E-394 -1e+5 -> -0
dddvi1131 divideint 1.0E-199 1e+200 -> 0
dddvi1132 divideint 1.0E-199 1e+199 -> 0
dddvi1133 divideint 1.0E-199 1e+198 -> 0
dddvi1134 divideint 2.0E-199 2e+198 -> 0
dddvi1135 divideint 4.0E-199 4e+198 -> 0
-- long operand checks
dddvi401 divideint 12345678000 100 -> 123456780
dddvi402 divideint 1 12345678000 -> 0
dddvi403 divideint 1234567800 10 -> 123456780
dddvi404 divideint 1 1234567800 -> 0
dddvi405 divideint 1234567890 10 -> 123456789
dddvi406 divideint 1 1234567890 -> 0
dddvi407 divideint 1234567891 10 -> 123456789
dddvi408 divideint 1 1234567891 -> 0
dddvi409 divideint 12345678901 100 -> 123456789
dddvi410 divideint 1 12345678901 -> 0
dddvi411 divideint 1234567896 10 -> 123456789
dddvi412 divideint 1 1234567896 -> 0
dddvi413 divideint 12345678948 100 -> 123456789
dddvi414 divideint 12345678949 100 -> 123456789
dddvi415 divideint 12345678950 100 -> 123456789
dddvi416 divideint 12345678951 100 -> 123456789
dddvi417 divideint 12345678999 100 -> 123456789
dddvi441 divideint 12345678000 1 -> 12345678000
dddvi442 divideint 1 12345678000 -> 0
dddvi443 divideint 1234567800 1 -> 1234567800
dddvi444 divideint 1 1234567800 -> 0
dddvi445 divideint 1234567890 1 -> 1234567890
dddvi446 divideint 1 1234567890 -> 0
dddvi447 divideint 1234567891 1 -> 1234567891
dddvi448 divideint 1 1234567891 -> 0
dddvi449 divideint 12345678901 1 -> 12345678901
dddvi450 divideint 1 12345678901 -> 0
dddvi451 divideint 1234567896 1 -> 1234567896
dddvi452 divideint 1 1234567896 -> 0
-- more zeros, etc.
dddvi531 divideint 5.00 1E-3 -> 5000
dddvi532 divideint 00.00 0.000 -> NaN Division_undefined
dddvi533 divideint 00.00 0E-3 -> NaN Division_undefined
dddvi534 divideint 0 -0 -> NaN Division_undefined
dddvi535 divideint -0 0 -> NaN Division_undefined
dddvi536 divideint -0 -0 -> NaN Division_undefined
dddvi541 divideint 0 -1 -> -0
dddvi542 divideint -0 -1 -> 0
dddvi543 divideint 0 1 -> 0
dddvi544 divideint -0 1 -> -0
dddvi545 divideint -1 0 -> -Infinity Division_by_zero
dddvi546 divideint -1 -0 -> Infinity Division_by_zero
dddvi547 divideint 1 0 -> Infinity Division_by_zero
dddvi548 divideint 1 -0 -> -Infinity Division_by_zero
dddvi551 divideint 0.0 -1 -> -0
dddvi552 divideint -0.0 -1 -> 0
dddvi553 divideint 0.0 1 -> 0
dddvi554 divideint -0.0 1 -> -0
dddvi555 divideint -1.0 0 -> -Infinity Division_by_zero
dddvi556 divideint -1.0 -0 -> Infinity Division_by_zero
dddvi557 divideint 1.0 0 -> Infinity Division_by_zero
dddvi558 divideint 1.0 -0 -> -Infinity Division_by_zero
dddvi561 divideint 0 -1.0 -> -0
dddvi562 divideint -0 -1.0 -> 0
dddvi563 divideint 0 1.0 -> 0
dddvi564 divideint -0 1.0 -> -0
dddvi565 divideint -1 0.0 -> -Infinity Division_by_zero
dddvi566 divideint -1 -0.0 -> Infinity Division_by_zero
dddvi567 divideint 1 0.0 -> Infinity Division_by_zero
dddvi568 divideint 1 -0.0 -> -Infinity Division_by_zero
dddvi571 divideint 0.0 -1.0 -> -0
dddvi572 divideint -0.0 -1.0 -> 0
dddvi573 divideint 0.0 1.0 -> 0
dddvi574 divideint -0.0 1.0 -> -0
dddvi575 divideint -1.0 0.0 -> -Infinity Division_by_zero
dddvi576 divideint -1.0 -0.0 -> Infinity Division_by_zero
dddvi577 divideint 1.0 0.0 -> Infinity Division_by_zero
dddvi578 divideint 1.0 -0.0 -> -Infinity Division_by_zero
-- Specials
dddvi580 divideint Inf -Inf -> NaN Invalid_operation
dddvi581 divideint Inf -1000 -> -Infinity
dddvi582 divideint Inf -1 -> -Infinity
dddvi583 divideint Inf -0 -> -Infinity
dddvi584 divideint Inf 0 -> Infinity
dddvi585 divideint Inf 1 -> Infinity
dddvi586 divideint Inf 1000 -> Infinity
dddvi587 divideint Inf Inf -> NaN Invalid_operation
dddvi588 divideint -1000 Inf -> -0
dddvi589 divideint -Inf Inf -> NaN Invalid_operation
dddvi590 divideint -1 Inf -> -0
dddvi591 divideint -0 Inf -> -0
dddvi592 divideint 0 Inf -> 0
dddvi593 divideint 1 Inf -> 0
dddvi594 divideint 1000 Inf -> 0
dddvi595 divideint Inf Inf -> NaN Invalid_operation
dddvi600 divideint -Inf -Inf -> NaN Invalid_operation
dddvi601 divideint -Inf -1000 -> Infinity
dddvi602 divideint -Inf -1 -> Infinity
dddvi603 divideint -Inf -0 -> Infinity
dddvi604 divideint -Inf 0 -> -Infinity
dddvi605 divideint -Inf 1 -> -Infinity
dddvi606 divideint -Inf 1000 -> -Infinity
dddvi607 divideint -Inf Inf -> NaN Invalid_operation
dddvi608 divideint -1000 Inf -> -0
dddvi609 divideint -Inf -Inf -> NaN Invalid_operation
dddvi610 divideint -1 -Inf -> 0
dddvi611 divideint -0 -Inf -> 0
dddvi612 divideint 0 -Inf -> -0
dddvi613 divideint 1 -Inf -> -0
dddvi614 divideint 1000 -Inf -> -0
dddvi615 divideint Inf -Inf -> NaN Invalid_operation
dddvi621 divideint NaN -Inf -> NaN
dddvi622 divideint NaN -1000 -> NaN
dddvi623 divideint NaN -1 -> NaN
dddvi624 divideint NaN -0 -> NaN
dddvi625 divideint NaN 0 -> NaN
dddvi626 divideint NaN 1 -> NaN
dddvi627 divideint NaN 1000 -> NaN
dddvi628 divideint NaN Inf -> NaN
dddvi629 divideint NaN NaN -> NaN
dddvi630 divideint -Inf NaN -> NaN
dddvi631 divideint -1000 NaN -> NaN
dddvi632 divideint -1 NaN -> NaN
dddvi633 divideint -0 NaN -> NaN
dddvi634 divideint 0 NaN -> NaN
dddvi635 divideint 1 NaN -> NaN
dddvi636 divideint 1000 NaN -> NaN
dddvi637 divideint Inf NaN -> NaN
dddvi641 divideint sNaN -Inf -> NaN Invalid_operation
dddvi642 divideint sNaN -1000 -> NaN Invalid_operation
dddvi643 divideint sNaN -1 -> NaN Invalid_operation
dddvi644 divideint sNaN -0 -> NaN Invalid_operation
dddvi645 divideint sNaN 0 -> NaN Invalid_operation
dddvi646 divideint sNaN 1 -> NaN Invalid_operation
dddvi647 divideint sNaN 1000 -> NaN Invalid_operation
dddvi648 divideint sNaN NaN -> NaN Invalid_operation
dddvi649 divideint sNaN sNaN -> NaN Invalid_operation
dddvi650 divideint NaN sNaN -> NaN Invalid_operation
dddvi651 divideint -Inf sNaN -> NaN Invalid_operation
dddvi652 divideint -1000 sNaN -> NaN Invalid_operation
dddvi653 divideint -1 sNaN -> NaN Invalid_operation
dddvi654 divideint -0 sNaN -> NaN Invalid_operation
dddvi655 divideint 0 sNaN -> NaN Invalid_operation
dddvi656 divideint 1 sNaN -> NaN Invalid_operation
dddvi657 divideint 1000 sNaN -> NaN Invalid_operation
dddvi658 divideint Inf sNaN -> NaN Invalid_operation
dddvi659 divideint NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dddvi661 divideint NaN9 -Inf -> NaN9
dddvi662 divideint NaN8 1000 -> NaN8
dddvi663 divideint NaN7 Inf -> NaN7
dddvi664 divideint -NaN6 NaN5 -> -NaN6
dddvi665 divideint -Inf NaN4 -> NaN4
dddvi666 divideint -1000 NaN3 -> NaN3
dddvi667 divideint Inf -NaN2 -> -NaN2
dddvi671 divideint -sNaN99 -Inf -> -NaN99 Invalid_operation
dddvi672 divideint sNaN98 -1 -> NaN98 Invalid_operation
dddvi673 divideint sNaN97 NaN -> NaN97 Invalid_operation
dddvi674 divideint sNaN96 sNaN94 -> NaN96 Invalid_operation
dddvi675 divideint NaN95 sNaN93 -> NaN93 Invalid_operation
dddvi676 divideint -Inf sNaN92 -> NaN92 Invalid_operation
dddvi677 divideint 0 sNaN91 -> NaN91 Invalid_operation
dddvi678 divideint Inf -sNaN90 -> -NaN90 Invalid_operation
dddvi679 divideint NaN sNaN89 -> NaN89 Invalid_operation
-- Null tests
dddvi900 divideint 10 # -> NaN Invalid_operation
dddvi901 divideint # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,202 @@
------------------------------------------------------------------------
-- ddInvert.decTest -- digitwise logical INVERT for decDoubles --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check (truth table)
ddinv001 invert 0 -> 1111111111111111
ddinv002 invert 1 -> 1111111111111110
ddinv003 invert 10 -> 1111111111111101
ddinv004 invert 111111111 -> 1111111000000000
ddinv005 invert 000000000 -> 1111111111111111
-- and at msd and msd-1
ddinv007 invert 0000000000000000 -> 1111111111111111
ddinv008 invert 1000000000000000 -> 111111111111111
ddinv009 invert 0000000000000000 -> 1111111111111111
ddinv010 invert 0100000000000000 -> 1011111111111111
ddinv011 invert 0111111111111111 -> 1000000000000000
ddinv012 invert 1111111111111111 -> 0
ddinv013 invert 0011111111111111 -> 1100000000000000
ddinv014 invert 0111111111111111 -> 1000000000000000
-- Various lengths
-- 123456789 1234567890123456
ddinv021 invert 111111111 -> 1111111000000000
ddinv022 invert 111111111111 -> 1111000000000000
ddinv023 invert 11111111 -> 1111111100000000
ddinv025 invert 1111111 -> 1111111110000000
ddinv026 invert 111111 -> 1111111111000000
ddinv027 invert 11111 -> 1111111111100000
ddinv028 invert 1111 -> 1111111111110000
ddinv029 invert 111 -> 1111111111111000
ddinv031 invert 11 -> 1111111111111100
ddinv032 invert 1 -> 1111111111111110
ddinv033 invert 111111111111 -> 1111000000000000
ddinv034 invert 11111111111 -> 1111100000000000
ddinv035 invert 1111111111 -> 1111110000000000
ddinv036 invert 111111111 -> 1111111000000000
ddinv040 invert 011111111 -> 1111111100000000
ddinv041 invert 101111111 -> 1111111010000000
ddinv042 invert 110111111 -> 1111111001000000
ddinv043 invert 111011111 -> 1111111000100000
ddinv044 invert 111101111 -> 1111111000010000
ddinv045 invert 111110111 -> 1111111000001000
ddinv046 invert 111111011 -> 1111111000000100
ddinv047 invert 111111101 -> 1111111000000010
ddinv048 invert 111111110 -> 1111111000000001
ddinv049 invert 011111011 -> 1111111100000100
ddinv050 invert 101111101 -> 1111111010000010
ddinv051 invert 110111110 -> 1111111001000001
ddinv052 invert 111011101 -> 1111111000100010
ddinv053 invert 111101011 -> 1111111000010100
ddinv054 invert 111110111 -> 1111111000001000
ddinv055 invert 111101011 -> 1111111000010100
ddinv056 invert 111011101 -> 1111111000100010
ddinv057 invert 110111110 -> 1111111001000001
ddinv058 invert 101111101 -> 1111111010000010
ddinv059 invert 011111011 -> 1111111100000100
ddinv080 invert 1000000011111111 -> 111111100000000
ddinv081 invert 0100000101111111 -> 1011111010000000
ddinv082 invert 0010000110111111 -> 1101111001000000
ddinv083 invert 0001000111011111 -> 1110111000100000
ddinv084 invert 0000100111101111 -> 1111011000010000
ddinv085 invert 0000010111110111 -> 1111101000001000
ddinv086 invert 0000001111111011 -> 1111110000000100
ddinv087 invert 0000010111111101 -> 1111101000000010
ddinv088 invert 0000100111111110 -> 1111011000000001
ddinv089 invert 0001000011111011 -> 1110111100000100
ddinv090 invert 0010000101111101 -> 1101111010000010
ddinv091 invert 0100000110111110 -> 1011111001000001
ddinv092 invert 1000000111011101 -> 111111000100010
ddinv093 invert 0100000111101011 -> 1011111000010100
ddinv094 invert 0010000111110111 -> 1101111000001000
ddinv095 invert 0001000111101011 -> 1110111000010100
ddinv096 invert 0000100111011101 -> 1111011000100010
ddinv097 invert 0000010110111110 -> 1111101001000001
ddinv098 invert 0000001101111101 -> 1111110010000010
ddinv099 invert 0000010011111011 -> 1111101100000100
-- non-0/1 should not be accepted, nor should signs
ddinv220 invert 111111112 -> NaN Invalid_operation
ddinv221 invert 333333333 -> NaN Invalid_operation
ddinv222 invert 555555555 -> NaN Invalid_operation
ddinv223 invert 777777777 -> NaN Invalid_operation
ddinv224 invert 999999999 -> NaN Invalid_operation
ddinv225 invert 222222222 -> NaN Invalid_operation
ddinv226 invert 444444444 -> NaN Invalid_operation
ddinv227 invert 666666666 -> NaN Invalid_operation
ddinv228 invert 888888888 -> NaN Invalid_operation
ddinv229 invert 999999999 -> NaN Invalid_operation
ddinv230 invert 999999999 -> NaN Invalid_operation
ddinv231 invert 999999999 -> NaN Invalid_operation
ddinv232 invert 999999999 -> NaN Invalid_operation
-- a few randoms
ddinv240 invert 567468689 -> NaN Invalid_operation
ddinv241 invert 567367689 -> NaN Invalid_operation
ddinv242 invert -631917772 -> NaN Invalid_operation
ddinv243 invert -756253257 -> NaN Invalid_operation
ddinv244 invert 835590149 -> NaN Invalid_operation
-- test MSD
ddinv250 invert 2000000000000000 -> NaN Invalid_operation
ddinv251 invert 3000000000000000 -> NaN Invalid_operation
ddinv252 invert 4000000000000000 -> NaN Invalid_operation
ddinv253 invert 5000000000000000 -> NaN Invalid_operation
ddinv254 invert 6000000000000000 -> NaN Invalid_operation
ddinv255 invert 7000000000000000 -> NaN Invalid_operation
ddinv256 invert 8000000000000000 -> NaN Invalid_operation
ddinv257 invert 9000000000000000 -> NaN Invalid_operation
-- test MSD-1
ddinv270 invert 0200001000000000 -> NaN Invalid_operation
ddinv271 invert 0300000100000000 -> NaN Invalid_operation
ddinv272 invert 0400000010000000 -> NaN Invalid_operation
ddinv273 invert 0500000001000000 -> NaN Invalid_operation
ddinv274 invert 1600000000100000 -> NaN Invalid_operation
ddinv275 invert 1700000000010000 -> NaN Invalid_operation
ddinv276 invert 1800000000001000 -> NaN Invalid_operation
ddinv277 invert 1900000000000100 -> NaN Invalid_operation
-- test LSD
ddinv280 invert 0010000000000002 -> NaN Invalid_operation
ddinv281 invert 0001000000000003 -> NaN Invalid_operation
ddinv282 invert 0000100000000004 -> NaN Invalid_operation
ddinv283 invert 0000010000000005 -> NaN Invalid_operation
ddinv284 invert 1000001000000006 -> NaN Invalid_operation
ddinv285 invert 1000000100000007 -> NaN Invalid_operation
ddinv286 invert 1000000010000008 -> NaN Invalid_operation
ddinv287 invert 1000000001000009 -> NaN Invalid_operation
-- test Middie
ddinv288 invert 0010000020000000 -> NaN Invalid_operation
ddinv289 invert 0001000030000001 -> NaN Invalid_operation
ddinv290 invert 0000100040000010 -> NaN Invalid_operation
ddinv291 invert 0000010050000100 -> NaN Invalid_operation
ddinv292 invert 1000001060001000 -> NaN Invalid_operation
ddinv293 invert 1000000170010000 -> NaN Invalid_operation
ddinv294 invert 1000000080100000 -> NaN Invalid_operation
ddinv295 invert 1000000091000000 -> NaN Invalid_operation
-- sign
ddinv296 invert -1000000001000000 -> NaN Invalid_operation
ddinv299 invert 1000000001000000 -> 111111110111111
-- Nmax, Nmin, Ntiny-like
ddinv341 invert 9.99999999E+299 -> NaN Invalid_operation
ddinv342 invert 1E-299 -> NaN Invalid_operation
ddinv343 invert 1.00000000E-299 -> NaN Invalid_operation
ddinv344 invert 1E-207 -> NaN Invalid_operation
ddinv345 invert -1E-207 -> NaN Invalid_operation
ddinv346 invert -1.00000000E-299 -> NaN Invalid_operation
ddinv347 invert -1E-299 -> NaN Invalid_operation
ddinv348 invert -9.99999999E+299 -> NaN Invalid_operation
-- A few other non-integers
ddinv361 invert 1.0 -> NaN Invalid_operation
ddinv362 invert 1E+1 -> NaN Invalid_operation
ddinv363 invert 0.0 -> NaN Invalid_operation
ddinv364 invert 0E+1 -> NaN Invalid_operation
ddinv365 invert 9.9 -> NaN Invalid_operation
ddinv366 invert 9E+1 -> NaN Invalid_operation
-- All Specials are in error
ddinv788 invert -Inf -> NaN Invalid_operation
ddinv794 invert Inf -> NaN Invalid_operation
ddinv821 invert NaN -> NaN Invalid_operation
ddinv841 invert sNaN -> NaN Invalid_operation
-- propagating NaNs
ddinv861 invert NaN1 -> NaN Invalid_operation
ddinv862 invert +NaN2 -> NaN Invalid_operation
ddinv863 invert NaN3 -> NaN Invalid_operation
ddinv864 invert NaN4 -> NaN Invalid_operation
ddinv865 invert NaN5 -> NaN Invalid_operation
ddinv871 invert sNaN11 -> NaN Invalid_operation
ddinv872 invert sNaN12 -> NaN Invalid_operation
ddinv873 invert sNaN13 -> NaN Invalid_operation
ddinv874 invert sNaN14 -> NaN Invalid_operation
ddinv875 invert sNaN15 -> NaN Invalid_operation
ddinv876 invert NaN16 -> NaN Invalid_operation
ddinv881 invert +NaN25 -> NaN Invalid_operation
ddinv882 invert -NaN26 -> NaN Invalid_operation
ddinv883 invert -sNaN27 -> NaN Invalid_operation

View File

@@ -0,0 +1,159 @@
------------------------------------------------------------------------
-- ddLogB.decTest -- integral 754r adjusted exponent, for decDoubles --
-- Copyright (c) IBM Corporation, 2005, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- basics
ddlogb000 logb 0 -> -Infinity Division_by_zero
ddlogb001 logb 1E-398 -> -398
ddlogb002 logb 1E-383 -> -383
ddlogb003 logb 0.001 -> -3
ddlogb004 logb 0.03 -> -2
ddlogb005 logb 1 -> 0
ddlogb006 logb 2 -> 0
ddlogb007 logb 2.5 -> 0
ddlogb008 logb 2.500 -> 0
ddlogb009 logb 10 -> 1
ddlogb010 logb 70 -> 1
ddlogb011 logb 100 -> 2
ddlogb012 logb 333 -> 2
ddlogb013 logb 9E+384 -> 384
ddlogb014 logb +Infinity -> Infinity
-- negatives appear to be treated as positives
ddlogb021 logb -0 -> -Infinity Division_by_zero
ddlogb022 logb -1E-398 -> -398
ddlogb023 logb -9E-383 -> -383
ddlogb024 logb -0.001 -> -3
ddlogb025 logb -1 -> 0
ddlogb026 logb -2 -> 0
ddlogb027 logb -10 -> 1
ddlogb028 logb -70 -> 1
ddlogb029 logb -100 -> 2
ddlogb030 logb -9E+384 -> 384
ddlogb031 logb -Infinity -> Infinity
-- zeros
ddlogb111 logb 0 -> -Infinity Division_by_zero
ddlogb112 logb -0 -> -Infinity Division_by_zero
ddlogb113 logb 0E+4 -> -Infinity Division_by_zero
ddlogb114 logb -0E+4 -> -Infinity Division_by_zero
ddlogb115 logb 0.0000 -> -Infinity Division_by_zero
ddlogb116 logb -0.0000 -> -Infinity Division_by_zero
ddlogb117 logb 0E-141 -> -Infinity Division_by_zero
ddlogb118 logb -0E-141 -> -Infinity Division_by_zero
-- full coefficients, alternating bits
ddlogb121 logb 268268268 -> 8
ddlogb122 logb -268268268 -> 8
ddlogb123 logb 134134134 -> 8
ddlogb124 logb -134134134 -> 8
-- Nmax, Nmin, Ntiny
ddlogb131 logb 9.999999999999999E+384 -> 384
ddlogb132 logb 1E-383 -> -383
ddlogb133 logb 1.000000000000000E-383 -> -383
ddlogb134 logb 1E-398 -> -398
ddlogb135 logb -1E-398 -> -398
ddlogb136 logb -1.000000000000000E-383 -> -383
ddlogb137 logb -1E-383 -> -383
ddlogb138 logb -9.999999999999999E+384 -> 384
-- ones
ddlogb0061 logb 1 -> 0
ddlogb0062 logb 1.0 -> 0
ddlogb0063 logb 1.000000000000000 -> 0
-- notable cases -- exact powers of 10
ddlogb1100 logb 1 -> 0
ddlogb1101 logb 10 -> 1
ddlogb1102 logb 100 -> 2
ddlogb1103 logb 1000 -> 3
ddlogb1104 logb 10000 -> 4
ddlogb1105 logb 100000 -> 5
ddlogb1106 logb 1000000 -> 6
ddlogb1107 logb 10000000 -> 7
ddlogb1108 logb 100000000 -> 8
ddlogb1109 logb 1000000000 -> 9
ddlogb1110 logb 10000000000 -> 10
ddlogb1111 logb 100000000000 -> 11
ddlogb1112 logb 1000000000000 -> 12
ddlogb1113 logb 0.00000000001 -> -11
ddlogb1114 logb 0.0000000001 -> -10
ddlogb1115 logb 0.000000001 -> -9
ddlogb1116 logb 0.00000001 -> -8
ddlogb1117 logb 0.0000001 -> -7
ddlogb1118 logb 0.000001 -> -6
ddlogb1119 logb 0.00001 -> -5
ddlogb1120 logb 0.0001 -> -4
ddlogb1121 logb 0.001 -> -3
ddlogb1122 logb 0.01 -> -2
ddlogb1123 logb 0.1 -> -1
ddlogb1124 logb 1E-99 -> -99
ddlogb1125 logb 1E-100 -> -100
ddlogb1127 logb 1E-299 -> -299
ddlogb1126 logb 1E-383 -> -383
-- suggestions from Ilan Nehama
ddlogb1400 logb 10E-3 -> -2
ddlogb1401 logb 10E-2 -> -1
ddlogb1402 logb 100E-2 -> 0
ddlogb1403 logb 1000E-2 -> 1
ddlogb1404 logb 10000E-2 -> 2
ddlogb1405 logb 10E-1 -> 0
ddlogb1406 logb 100E-1 -> 1
ddlogb1407 logb 1000E-1 -> 2
ddlogb1408 logb 10000E-1 -> 3
ddlogb1409 logb 10E0 -> 1
ddlogb1410 logb 100E0 -> 2
ddlogb1411 logb 1000E0 -> 3
ddlogb1412 logb 10000E0 -> 4
ddlogb1413 logb 10E1 -> 2
ddlogb1414 logb 100E1 -> 3
ddlogb1415 logb 1000E1 -> 4
ddlogb1416 logb 10000E1 -> 5
ddlogb1417 logb 10E2 -> 3
ddlogb1418 logb 100E2 -> 4
ddlogb1419 logb 1000E2 -> 5
ddlogb1420 logb 10000E2 -> 6
-- special values
ddlogb820 logb Infinity -> Infinity
ddlogb821 logb 0 -> -Infinity Division_by_zero
ddlogb822 logb NaN -> NaN
ddlogb823 logb sNaN -> NaN Invalid_operation
-- propagating NaNs
ddlogb824 logb sNaN123 -> NaN123 Invalid_operation
ddlogb825 logb -sNaN321 -> -NaN321 Invalid_operation
ddlogb826 logb NaN456 -> NaN456
ddlogb827 logb -NaN654 -> -NaN654
ddlogb828 logb NaN1 -> NaN1
-- Null test
ddlogb900 logb # -> NaN Invalid_operation

View File

@@ -0,0 +1,322 @@
------------------------------------------------------------------------
-- ddMax.decTest -- decDouble maxnum --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- we assume that base comparison is tested in compare.decTest, so
-- these mainly cover special cases and rounding
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- sanity checks
ddmax001 max -2 -2 -> -2
ddmax002 max -2 -1 -> -1
ddmax003 max -2 0 -> 0
ddmax004 max -2 1 -> 1
ddmax005 max -2 2 -> 2
ddmax006 max -1 -2 -> -1
ddmax007 max -1 -1 -> -1
ddmax008 max -1 0 -> 0
ddmax009 max -1 1 -> 1
ddmax010 max -1 2 -> 2
ddmax011 max 0 -2 -> 0
ddmax012 max 0 -1 -> 0
ddmax013 max 0 0 -> 0
ddmax014 max 0 1 -> 1
ddmax015 max 0 2 -> 2
ddmax016 max 1 -2 -> 1
ddmax017 max 1 -1 -> 1
ddmax018 max 1 0 -> 1
ddmax019 max 1 1 -> 1
ddmax020 max 1 2 -> 2
ddmax021 max 2 -2 -> 2
ddmax022 max 2 -1 -> 2
ddmax023 max 2 0 -> 2
ddmax025 max 2 1 -> 2
ddmax026 max 2 2 -> 2
-- extended zeros
ddmax030 max 0 0 -> 0
ddmax031 max 0 -0 -> 0
ddmax032 max 0 -0.0 -> 0
ddmax033 max 0 0.0 -> 0
ddmax034 max -0 0 -> 0 -- note: -0 = 0, but 0 chosen
ddmax035 max -0 -0 -> -0
ddmax036 max -0 -0.0 -> -0.0
ddmax037 max -0 0.0 -> 0.0
ddmax038 max 0.0 0 -> 0
ddmax039 max 0.0 -0 -> 0.0
ddmax040 max 0.0 -0.0 -> 0.0
ddmax041 max 0.0 0.0 -> 0.0
ddmax042 max -0.0 0 -> 0
ddmax043 max -0.0 -0 -> -0.0
ddmax044 max -0.0 -0.0 -> -0.0
ddmax045 max -0.0 0.0 -> 0.0
ddmax050 max -0E1 0E1 -> 0E+1
ddmax051 max -0E2 0E2 -> 0E+2
ddmax052 max -0E2 0E1 -> 0E+1
ddmax053 max -0E1 0E2 -> 0E+2
ddmax054 max 0E1 -0E1 -> 0E+1
ddmax055 max 0E2 -0E2 -> 0E+2
ddmax056 max 0E2 -0E1 -> 0E+2
ddmax057 max 0E1 -0E2 -> 0E+1
ddmax058 max 0E1 0E1 -> 0E+1
ddmax059 max 0E2 0E2 -> 0E+2
ddmax060 max 0E2 0E1 -> 0E+2
ddmax061 max 0E1 0E2 -> 0E+2
ddmax062 max -0E1 -0E1 -> -0E+1
ddmax063 max -0E2 -0E2 -> -0E+2
ddmax064 max -0E2 -0E1 -> -0E+1
ddmax065 max -0E1 -0E2 -> -0E+1
-- Specials
ddmax090 max Inf -Inf -> Infinity
ddmax091 max Inf -1000 -> Infinity
ddmax092 max Inf -1 -> Infinity
ddmax093 max Inf -0 -> Infinity
ddmax094 max Inf 0 -> Infinity
ddmax095 max Inf 1 -> Infinity
ddmax096 max Inf 1000 -> Infinity
ddmax097 max Inf Inf -> Infinity
ddmax098 max -1000 Inf -> Infinity
ddmax099 max -Inf Inf -> Infinity
ddmax100 max -1 Inf -> Infinity
ddmax101 max -0 Inf -> Infinity
ddmax102 max 0 Inf -> Infinity
ddmax103 max 1 Inf -> Infinity
ddmax104 max 1000 Inf -> Infinity
ddmax105 max Inf Inf -> Infinity
ddmax120 max -Inf -Inf -> -Infinity
ddmax121 max -Inf -1000 -> -1000
ddmax122 max -Inf -1 -> -1
ddmax123 max -Inf -0 -> -0
ddmax124 max -Inf 0 -> 0
ddmax125 max -Inf 1 -> 1
ddmax126 max -Inf 1000 -> 1000
ddmax127 max -Inf Inf -> Infinity
ddmax128 max -Inf -Inf -> -Infinity
ddmax129 max -1000 -Inf -> -1000
ddmax130 max -1 -Inf -> -1
ddmax131 max -0 -Inf -> -0
ddmax132 max 0 -Inf -> 0
ddmax133 max 1 -Inf -> 1
ddmax134 max 1000 -Inf -> 1000
ddmax135 max Inf -Inf -> Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
ddmax141 max NaN -Inf -> -Infinity
ddmax142 max NaN -1000 -> -1000
ddmax143 max NaN -1 -> -1
ddmax144 max NaN -0 -> -0
ddmax145 max NaN 0 -> 0
ddmax146 max NaN 1 -> 1
ddmax147 max NaN 1000 -> 1000
ddmax148 max NaN Inf -> Infinity
ddmax149 max NaN NaN -> NaN
ddmax150 max -Inf NaN -> -Infinity
ddmax151 max -1000 NaN -> -1000
ddmax152 max -1 NaN -> -1
ddmax153 max -0 NaN -> -0
ddmax154 max 0 NaN -> 0
ddmax155 max 1 NaN -> 1
ddmax156 max 1000 NaN -> 1000
ddmax157 max Inf NaN -> Infinity
ddmax161 max sNaN -Inf -> NaN Invalid_operation
ddmax162 max sNaN -1000 -> NaN Invalid_operation
ddmax163 max sNaN -1 -> NaN Invalid_operation
ddmax164 max sNaN -0 -> NaN Invalid_operation
ddmax165 max sNaN 0 -> NaN Invalid_operation
ddmax166 max sNaN 1 -> NaN Invalid_operation
ddmax167 max sNaN 1000 -> NaN Invalid_operation
ddmax168 max sNaN NaN -> NaN Invalid_operation
ddmax169 max sNaN sNaN -> NaN Invalid_operation
ddmax170 max NaN sNaN -> NaN Invalid_operation
ddmax171 max -Inf sNaN -> NaN Invalid_operation
ddmax172 max -1000 sNaN -> NaN Invalid_operation
ddmax173 max -1 sNaN -> NaN Invalid_operation
ddmax174 max -0 sNaN -> NaN Invalid_operation
ddmax175 max 0 sNaN -> NaN Invalid_operation
ddmax176 max 1 sNaN -> NaN Invalid_operation
ddmax177 max 1000 sNaN -> NaN Invalid_operation
ddmax178 max Inf sNaN -> NaN Invalid_operation
ddmax179 max NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddmax181 max NaN9 -Inf -> -Infinity
ddmax182 max NaN8 9 -> 9
ddmax183 max -NaN7 Inf -> Infinity
ddmax184 max -NaN1 NaN11 -> -NaN1
ddmax185 max NaN2 NaN12 -> NaN2
ddmax186 max -NaN13 -NaN7 -> -NaN13
ddmax187 max NaN14 -NaN5 -> NaN14
ddmax188 max -Inf NaN4 -> -Infinity
ddmax189 max -9 -NaN3 -> -9
ddmax190 max Inf NaN2 -> Infinity
ddmax191 max sNaN99 -Inf -> NaN99 Invalid_operation
ddmax192 max sNaN98 -1 -> NaN98 Invalid_operation
ddmax193 max -sNaN97 NaN -> -NaN97 Invalid_operation
ddmax194 max sNaN96 sNaN94 -> NaN96 Invalid_operation
ddmax195 max NaN95 sNaN93 -> NaN93 Invalid_operation
ddmax196 max -Inf sNaN92 -> NaN92 Invalid_operation
ddmax197 max 0 sNaN91 -> NaN91 Invalid_operation
ddmax198 max Inf -sNaN90 -> -NaN90 Invalid_operation
ddmax199 max NaN sNaN89 -> NaN89 Invalid_operation
-- old rounding checks
ddmax221 max 12345678000 1 -> 12345678000
ddmax222 max 1 12345678000 -> 12345678000
ddmax223 max 1234567800 1 -> 1234567800
ddmax224 max 1 1234567800 -> 1234567800
ddmax225 max 1234567890 1 -> 1234567890
ddmax226 max 1 1234567890 -> 1234567890
ddmax227 max 1234567891 1 -> 1234567891
ddmax228 max 1 1234567891 -> 1234567891
ddmax229 max 12345678901 1 -> 12345678901
ddmax230 max 1 12345678901 -> 12345678901
ddmax231 max 1234567896 1 -> 1234567896
ddmax232 max 1 1234567896 -> 1234567896
ddmax233 max -1234567891 1 -> 1
ddmax234 max 1 -1234567891 -> 1
ddmax235 max -12345678901 1 -> 1
ddmax236 max 1 -12345678901 -> 1
ddmax237 max -1234567896 1 -> 1
ddmax238 max 1 -1234567896 -> 1
-- from examples
ddmax280 max '3' '2' -> '3'
ddmax281 max '-10' '3' -> '3'
ddmax282 max '1.0' '1' -> '1'
ddmax283 max '1' '1.0' -> '1'
ddmax284 max '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
ddmax401 max Inf 1.1 -> Infinity
ddmax402 max 1.1 1 -> 1.1
ddmax403 max 1 1.0 -> 1
ddmax404 max 1.0 0.1 -> 1.0
ddmax405 max 0.1 0.10 -> 0.1
ddmax406 max 0.10 0.100 -> 0.10
ddmax407 max 0.10 0 -> 0.10
ddmax408 max 0 0.0 -> 0
ddmax409 max 0.0 -0 -> 0.0
ddmax410 max 0.0 -0.0 -> 0.0
ddmax411 max 0.00 -0.0 -> 0.00
ddmax412 max 0.0 -0.00 -> 0.0
ddmax413 max 0 -0.0 -> 0
ddmax414 max 0 -0 -> 0
ddmax415 max -0.0 -0 -> -0.0
ddmax416 max -0 -0.100 -> -0
ddmax417 max -0.100 -0.10 -> -0.100
ddmax418 max -0.10 -0.1 -> -0.10
ddmax419 max -0.1 -1.0 -> -0.1
ddmax420 max -1.0 -1 -> -1.0
ddmax421 max -1 -1.1 -> -1
ddmax423 max -1.1 -Inf -> -1.1
-- same with operands reversed
ddmax431 max 1.1 Inf -> Infinity
ddmax432 max 1 1.1 -> 1.1
ddmax433 max 1.0 1 -> 1
ddmax434 max 0.1 1.0 -> 1.0
ddmax435 max 0.10 0.1 -> 0.1
ddmax436 max 0.100 0.10 -> 0.10
ddmax437 max 0 0.10 -> 0.10
ddmax438 max 0.0 0 -> 0
ddmax439 max -0 0.0 -> 0.0
ddmax440 max -0.0 0.0 -> 0.0
ddmax441 max -0.0 0.00 -> 0.00
ddmax442 max -0.00 0.0 -> 0.0
ddmax443 max -0.0 0 -> 0
ddmax444 max -0 0 -> 0
ddmax445 max -0 -0.0 -> -0.0
ddmax446 max -0.100 -0 -> -0
ddmax447 max -0.10 -0.100 -> -0.100
ddmax448 max -0.1 -0.10 -> -0.10
ddmax449 max -1.0 -0.1 -> -0.1
ddmax450 max -1 -1.0 -> -1.0
ddmax451 max -1.1 -1 -> -1
ddmax453 max -Inf -1.1 -> -1.1
-- largies
ddmax460 max 1000 1E+3 -> 1E+3
ddmax461 max 1E+3 1000 -> 1E+3
ddmax462 max 1000 -1E+3 -> 1000
ddmax463 max 1E+3 -1000 -> 1E+3
ddmax464 max -1000 1E+3 -> 1E+3
ddmax465 max -1E+3 1000 -> 1000
ddmax466 max -1000 -1E+3 -> -1000
ddmax467 max -1E+3 -1000 -> -1000
-- misalignment traps for little-endian
ddmax471 max 1.0 0.1 -> 1.0
ddmax472 max 0.1 1.0 -> 1.0
ddmax473 max 10.0 0.1 -> 10.0
ddmax474 max 0.1 10.0 -> 10.0
ddmax475 max 100 1.0 -> 100
ddmax476 max 1.0 100 -> 100
ddmax477 max 1000 10.0 -> 1000
ddmax478 max 10.0 1000 -> 1000
ddmax479 max 10000 100.0 -> 10000
ddmax480 max 100.0 10000 -> 10000
ddmax481 max 100000 1000.0 -> 100000
ddmax482 max 1000.0 100000 -> 100000
ddmax483 max 1000000 10000.0 -> 1000000
ddmax484 max 10000.0 1000000 -> 1000000
-- subnormals
ddmax510 max 1.00E-383 0 -> 1.00E-383
ddmax511 max 0.1E-383 0 -> 1E-384 Subnormal
ddmax512 max 0.10E-383 0 -> 1.0E-384 Subnormal
ddmax513 max 0.100E-383 0 -> 1.00E-384 Subnormal
ddmax514 max 0.01E-383 0 -> 1E-385 Subnormal
ddmax515 max 0.999E-383 0 -> 9.99E-384 Subnormal
ddmax516 max 0.099E-383 0 -> 9.9E-385 Subnormal
ddmax517 max 0.009E-383 0 -> 9E-386 Subnormal
ddmax518 max 0.001E-383 0 -> 1E-386 Subnormal
ddmax519 max 0.0009E-383 0 -> 9E-387 Subnormal
ddmax520 max 0.0001E-383 0 -> 1E-387 Subnormal
ddmax530 max -1.00E-383 0 -> 0
ddmax531 max -0.1E-383 0 -> 0
ddmax532 max -0.10E-383 0 -> 0
ddmax533 max -0.100E-383 0 -> 0
ddmax534 max -0.01E-383 0 -> 0
ddmax535 max -0.999E-383 0 -> 0
ddmax536 max -0.099E-383 0 -> 0
ddmax537 max -0.009E-383 0 -> 0
ddmax538 max -0.001E-383 0 -> 0
ddmax539 max -0.0009E-383 0 -> 0
ddmax540 max -0.0001E-383 0 -> 0
-- Null tests
ddmax900 max 10 # -> NaN Invalid_operation
ddmax901 max # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,304 @@
------------------------------------------------------------------------
-- ddMaxMag.decTest -- decDouble maxnummag --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- we assume that base comparison is tested in compare.decTest, so
-- these mainly cover special cases and rounding
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- sanity checks
ddmxg001 maxmag -2 -2 -> -2
ddmxg002 maxmag -2 -1 -> -2
ddmxg003 maxmag -2 0 -> -2
ddmxg004 maxmag -2 1 -> -2
ddmxg005 maxmag -2 2 -> 2
ddmxg006 maxmag -1 -2 -> -2
ddmxg007 maxmag -1 -1 -> -1
ddmxg008 maxmag -1 0 -> -1
ddmxg009 maxmag -1 1 -> 1
ddmxg010 maxmag -1 2 -> 2
ddmxg011 maxmag 0 -2 -> -2
ddmxg012 maxmag 0 -1 -> -1
ddmxg013 maxmag 0 0 -> 0
ddmxg014 maxmag 0 1 -> 1
ddmxg015 maxmag 0 2 -> 2
ddmxg016 maxmag 1 -2 -> -2
ddmxg017 maxmag 1 -1 -> 1
ddmxg018 maxmag 1 0 -> 1
ddmxg019 maxmag 1 1 -> 1
ddmxg020 maxmag 1 2 -> 2
ddmxg021 maxmag 2 -2 -> 2
ddmxg022 maxmag 2 -1 -> 2
ddmxg023 maxmag 2 0 -> 2
ddmxg025 maxmag 2 1 -> 2
ddmxg026 maxmag 2 2 -> 2
-- extended zeros
ddmxg030 maxmag 0 0 -> 0
ddmxg031 maxmag 0 -0 -> 0
ddmxg032 maxmag 0 -0.0 -> 0
ddmxg033 maxmag 0 0.0 -> 0
ddmxg034 maxmag -0 0 -> 0 -- note: -0 = 0, but 0 chosen
ddmxg035 maxmag -0 -0 -> -0
ddmxg036 maxmag -0 -0.0 -> -0.0
ddmxg037 maxmag -0 0.0 -> 0.0
ddmxg038 maxmag 0.0 0 -> 0
ddmxg039 maxmag 0.0 -0 -> 0.0
ddmxg040 maxmag 0.0 -0.0 -> 0.0
ddmxg041 maxmag 0.0 0.0 -> 0.0
ddmxg042 maxmag -0.0 0 -> 0
ddmxg043 maxmag -0.0 -0 -> -0.0
ddmxg044 maxmag -0.0 -0.0 -> -0.0
ddmxg045 maxmag -0.0 0.0 -> 0.0
ddmxg050 maxmag -0E1 0E1 -> 0E+1
ddmxg051 maxmag -0E2 0E2 -> 0E+2
ddmxg052 maxmag -0E2 0E1 -> 0E+1
ddmxg053 maxmag -0E1 0E2 -> 0E+2
ddmxg054 maxmag 0E1 -0E1 -> 0E+1
ddmxg055 maxmag 0E2 -0E2 -> 0E+2
ddmxg056 maxmag 0E2 -0E1 -> 0E+2
ddmxg057 maxmag 0E1 -0E2 -> 0E+1
ddmxg058 maxmag 0E1 0E1 -> 0E+1
ddmxg059 maxmag 0E2 0E2 -> 0E+2
ddmxg060 maxmag 0E2 0E1 -> 0E+2
ddmxg061 maxmag 0E1 0E2 -> 0E+2
ddmxg062 maxmag -0E1 -0E1 -> -0E+1
ddmxg063 maxmag -0E2 -0E2 -> -0E+2
ddmxg064 maxmag -0E2 -0E1 -> -0E+1
ddmxg065 maxmag -0E1 -0E2 -> -0E+1
-- Specials
ddmxg090 maxmag Inf -Inf -> Infinity
ddmxg091 maxmag Inf -1000 -> Infinity
ddmxg092 maxmag Inf -1 -> Infinity
ddmxg093 maxmag Inf -0 -> Infinity
ddmxg094 maxmag Inf 0 -> Infinity
ddmxg095 maxmag Inf 1 -> Infinity
ddmxg096 maxmag Inf 1000 -> Infinity
ddmxg097 maxmag Inf Inf -> Infinity
ddmxg098 maxmag -1000 Inf -> Infinity
ddmxg099 maxmag -Inf Inf -> Infinity
ddmxg100 maxmag -1 Inf -> Infinity
ddmxg101 maxmag -0 Inf -> Infinity
ddmxg102 maxmag 0 Inf -> Infinity
ddmxg103 maxmag 1 Inf -> Infinity
ddmxg104 maxmag 1000 Inf -> Infinity
ddmxg105 maxmag Inf Inf -> Infinity
ddmxg120 maxmag -Inf -Inf -> -Infinity
ddmxg121 maxmag -Inf -1000 -> -Infinity
ddmxg122 maxmag -Inf -1 -> -Infinity
ddmxg123 maxmag -Inf -0 -> -Infinity
ddmxg124 maxmag -Inf 0 -> -Infinity
ddmxg125 maxmag -Inf 1 -> -Infinity
ddmxg126 maxmag -Inf 1000 -> -Infinity
ddmxg127 maxmag -Inf Inf -> Infinity
ddmxg128 maxmag -Inf -Inf -> -Infinity
ddmxg129 maxmag -1000 -Inf -> -Infinity
ddmxg130 maxmag -1 -Inf -> -Infinity
ddmxg131 maxmag -0 -Inf -> -Infinity
ddmxg132 maxmag 0 -Inf -> -Infinity
ddmxg133 maxmag 1 -Inf -> -Infinity
ddmxg134 maxmag 1000 -Inf -> -Infinity
ddmxg135 maxmag Inf -Inf -> Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
ddmxg141 maxmag NaN -Inf -> -Infinity
ddmxg142 maxmag NaN -1000 -> -1000
ddmxg143 maxmag NaN -1 -> -1
ddmxg144 maxmag NaN -0 -> -0
ddmxg145 maxmag NaN 0 -> 0
ddmxg146 maxmag NaN 1 -> 1
ddmxg147 maxmag NaN 1000 -> 1000
ddmxg148 maxmag NaN Inf -> Infinity
ddmxg149 maxmag NaN NaN -> NaN
ddmxg150 maxmag -Inf NaN -> -Infinity
ddmxg151 maxmag -1000 NaN -> -1000
ddmxg152 maxmag -1 NaN -> -1
ddmxg153 maxmag -0 NaN -> -0
ddmxg154 maxmag 0 NaN -> 0
ddmxg155 maxmag 1 NaN -> 1
ddmxg156 maxmag 1000 NaN -> 1000
ddmxg157 maxmag Inf NaN -> Infinity
ddmxg161 maxmag sNaN -Inf -> NaN Invalid_operation
ddmxg162 maxmag sNaN -1000 -> NaN Invalid_operation
ddmxg163 maxmag sNaN -1 -> NaN Invalid_operation
ddmxg164 maxmag sNaN -0 -> NaN Invalid_operation
ddmxg165 maxmag sNaN 0 -> NaN Invalid_operation
ddmxg166 maxmag sNaN 1 -> NaN Invalid_operation
ddmxg167 maxmag sNaN 1000 -> NaN Invalid_operation
ddmxg168 maxmag sNaN NaN -> NaN Invalid_operation
ddmxg169 maxmag sNaN sNaN -> NaN Invalid_operation
ddmxg170 maxmag NaN sNaN -> NaN Invalid_operation
ddmxg171 maxmag -Inf sNaN -> NaN Invalid_operation
ddmxg172 maxmag -1000 sNaN -> NaN Invalid_operation
ddmxg173 maxmag -1 sNaN -> NaN Invalid_operation
ddmxg174 maxmag -0 sNaN -> NaN Invalid_operation
ddmxg175 maxmag 0 sNaN -> NaN Invalid_operation
ddmxg176 maxmag 1 sNaN -> NaN Invalid_operation
ddmxg177 maxmag 1000 sNaN -> NaN Invalid_operation
ddmxg178 maxmag Inf sNaN -> NaN Invalid_operation
ddmxg179 maxmag NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddmxg181 maxmag NaN9 -Inf -> -Infinity
ddmxg182 maxmag NaN8 9 -> 9
ddmxg183 maxmag -NaN7 Inf -> Infinity
ddmxg184 maxmag -NaN1 NaN11 -> -NaN1
ddmxg185 maxmag NaN2 NaN12 -> NaN2
ddmxg186 maxmag -NaN13 -NaN7 -> -NaN13
ddmxg187 maxmag NaN14 -NaN5 -> NaN14
ddmxg188 maxmag -Inf NaN4 -> -Infinity
ddmxg189 maxmag -9 -NaN3 -> -9
ddmxg190 maxmag Inf NaN2 -> Infinity
ddmxg191 maxmag sNaN99 -Inf -> NaN99 Invalid_operation
ddmxg192 maxmag sNaN98 -1 -> NaN98 Invalid_operation
ddmxg193 maxmag -sNaN97 NaN -> -NaN97 Invalid_operation
ddmxg194 maxmag sNaN96 sNaN94 -> NaN96 Invalid_operation
ddmxg195 maxmag NaN95 sNaN93 -> NaN93 Invalid_operation
ddmxg196 maxmag -Inf sNaN92 -> NaN92 Invalid_operation
ddmxg197 maxmag 0 sNaN91 -> NaN91 Invalid_operation
ddmxg198 maxmag Inf -sNaN90 -> -NaN90 Invalid_operation
ddmxg199 maxmag NaN sNaN89 -> NaN89 Invalid_operation
-- old rounding checks
ddmxg221 maxmag 12345678000 1 -> 12345678000
ddmxg222 maxmag 1 12345678000 -> 12345678000
ddmxg223 maxmag 1234567800 1 -> 1234567800
ddmxg224 maxmag 1 1234567800 -> 1234567800
ddmxg225 maxmag 1234567890 1 -> 1234567890
ddmxg226 maxmag 1 1234567890 -> 1234567890
ddmxg227 maxmag 1234567891 1 -> 1234567891
ddmxg228 maxmag 1 1234567891 -> 1234567891
ddmxg229 maxmag 12345678901 1 -> 12345678901
ddmxg230 maxmag 1 12345678901 -> 12345678901
ddmxg231 maxmag 1234567896 1 -> 1234567896
ddmxg232 maxmag 1 1234567896 -> 1234567896
ddmxg233 maxmag -1234567891 1 -> -1234567891
ddmxg234 maxmag 1 -1234567891 -> -1234567891
ddmxg235 maxmag -12345678901 1 -> -12345678901
ddmxg236 maxmag 1 -12345678901 -> -12345678901
ddmxg237 maxmag -1234567896 1 -> -1234567896
ddmxg238 maxmag 1 -1234567896 -> -1234567896
-- from examples
ddmxg280 maxmag '3' '2' -> '3'
ddmxg281 maxmag '-10' '3' -> '-10'
ddmxg282 maxmag '1.0' '1' -> '1'
ddmxg283 maxmag '1' '1.0' -> '1'
ddmxg284 maxmag '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
ddmxg401 maxmag Inf 1.1 -> Infinity
ddmxg402 maxmag 1.1 1 -> 1.1
ddmxg403 maxmag 1 1.0 -> 1
ddmxg404 maxmag 1.0 0.1 -> 1.0
ddmxg405 maxmag 0.1 0.10 -> 0.1
ddmxg406 maxmag 0.10 0.100 -> 0.10
ddmxg407 maxmag 0.10 0 -> 0.10
ddmxg408 maxmag 0 0.0 -> 0
ddmxg409 maxmag 0.0 -0 -> 0.0
ddmxg410 maxmag 0.0 -0.0 -> 0.0
ddmxg411 maxmag 0.00 -0.0 -> 0.00
ddmxg412 maxmag 0.0 -0.00 -> 0.0
ddmxg413 maxmag 0 -0.0 -> 0
ddmxg414 maxmag 0 -0 -> 0
ddmxg415 maxmag -0.0 -0 -> -0.0
ddmxg416 maxmag -0 -0.100 -> -0.100
ddmxg417 maxmag -0.100 -0.10 -> -0.100
ddmxg418 maxmag -0.10 -0.1 -> -0.10
ddmxg419 maxmag -0.1 -1.0 -> -1.0
ddmxg420 maxmag -1.0 -1 -> -1.0
ddmxg421 maxmag -1 -1.1 -> -1.1
ddmxg423 maxmag -1.1 -Inf -> -Infinity
-- same with operands reversed
ddmxg431 maxmag 1.1 Inf -> Infinity
ddmxg432 maxmag 1 1.1 -> 1.1
ddmxg433 maxmag 1.0 1 -> 1
ddmxg434 maxmag 0.1 1.0 -> 1.0
ddmxg435 maxmag 0.10 0.1 -> 0.1
ddmxg436 maxmag 0.100 0.10 -> 0.10
ddmxg437 maxmag 0 0.10 -> 0.10
ddmxg438 maxmag 0.0 0 -> 0
ddmxg439 maxmag -0 0.0 -> 0.0
ddmxg440 maxmag -0.0 0.0 -> 0.0
ddmxg441 maxmag -0.0 0.00 -> 0.00
ddmxg442 maxmag -0.00 0.0 -> 0.0
ddmxg443 maxmag -0.0 0 -> 0
ddmxg444 maxmag -0 0 -> 0
ddmxg445 maxmag -0 -0.0 -> -0.0
ddmxg446 maxmag -0.100 -0 -> -0.100
ddmxg447 maxmag -0.10 -0.100 -> -0.100
ddmxg448 maxmag -0.1 -0.10 -> -0.10
ddmxg449 maxmag -1.0 -0.1 -> -1.0
ddmxg450 maxmag -1 -1.0 -> -1.0
ddmxg451 maxmag -1.1 -1 -> -1.1
ddmxg453 maxmag -Inf -1.1 -> -Infinity
-- largies
ddmxg460 maxmag 1000 1E+3 -> 1E+3
ddmxg461 maxmag 1E+3 1000 -> 1E+3
ddmxg462 maxmag 1000 -1E+3 -> 1000
ddmxg463 maxmag 1E+3 -1000 -> 1E+3
ddmxg464 maxmag -1000 1E+3 -> 1E+3
ddmxg465 maxmag -1E+3 1000 -> 1000
ddmxg466 maxmag -1000 -1E+3 -> -1000
ddmxg467 maxmag -1E+3 -1000 -> -1000
-- subnormals
ddmxg510 maxmag 1.00E-383 0 -> 1.00E-383
ddmxg511 maxmag 0.1E-383 0 -> 1E-384 Subnormal
ddmxg512 maxmag 0.10E-383 0 -> 1.0E-384 Subnormal
ddmxg513 maxmag 0.100E-383 0 -> 1.00E-384 Subnormal
ddmxg514 maxmag 0.01E-383 0 -> 1E-385 Subnormal
ddmxg515 maxmag 0.999E-383 0 -> 9.99E-384 Subnormal
ddmxg516 maxmag 0.099E-383 0 -> 9.9E-385 Subnormal
ddmxg517 maxmag 0.009E-383 0 -> 9E-386 Subnormal
ddmxg518 maxmag 0.001E-383 0 -> 1E-386 Subnormal
ddmxg519 maxmag 0.0009E-383 0 -> 9E-387 Subnormal
ddmxg520 maxmag 0.0001E-383 0 -> 1E-387 Subnormal
ddmxg530 maxmag -1.00E-383 0 -> -1.00E-383
ddmxg531 maxmag -0.1E-383 0 -> -1E-384 Subnormal
ddmxg532 maxmag -0.10E-383 0 -> -1.0E-384 Subnormal
ddmxg533 maxmag -0.100E-383 0 -> -1.00E-384 Subnormal
ddmxg534 maxmag -0.01E-383 0 -> -1E-385 Subnormal
ddmxg535 maxmag -0.999E-383 0 -> -9.99E-384 Subnormal
ddmxg536 maxmag -0.099E-383 0 -> -9.9E-385 Subnormal
ddmxg537 maxmag -0.009E-383 0 -> -9E-386 Subnormal
ddmxg538 maxmag -0.001E-383 0 -> -1E-386 Subnormal
ddmxg539 maxmag -0.0009E-383 0 -> -9E-387 Subnormal
ddmxg540 maxmag -0.0001E-383 0 -> -1E-387 Subnormal
-- Null tests
ddmxg900 maxmag 10 # -> NaN Invalid_operation
ddmxg901 maxmag # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,309 @@
------------------------------------------------------------------------
-- ddMin.decTest -- decDouble minnum --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- we assume that base comparison is tested in compare.decTest, so
-- these mainly cover special cases and rounding
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- sanity checks
ddmin001 min -2 -2 -> -2
ddmin002 min -2 -1 -> -2
ddmin003 min -2 0 -> -2
ddmin004 min -2 1 -> -2
ddmin005 min -2 2 -> -2
ddmin006 min -1 -2 -> -2
ddmin007 min -1 -1 -> -1
ddmin008 min -1 0 -> -1
ddmin009 min -1 1 -> -1
ddmin010 min -1 2 -> -1
ddmin011 min 0 -2 -> -2
ddmin012 min 0 -1 -> -1
ddmin013 min 0 0 -> 0
ddmin014 min 0 1 -> 0
ddmin015 min 0 2 -> 0
ddmin016 min 1 -2 -> -2
ddmin017 min 1 -1 -> -1
ddmin018 min 1 0 -> 0
ddmin019 min 1 1 -> 1
ddmin020 min 1 2 -> 1
ddmin021 min 2 -2 -> -2
ddmin022 min 2 -1 -> -1
ddmin023 min 2 0 -> 0
ddmin025 min 2 1 -> 1
ddmin026 min 2 2 -> 2
-- extended zeros
ddmin030 min 0 0 -> 0
ddmin031 min 0 -0 -> -0
ddmin032 min 0 -0.0 -> -0.0
ddmin033 min 0 0.0 -> 0.0
ddmin034 min -0 0 -> -0
ddmin035 min -0 -0 -> -0
ddmin036 min -0 -0.0 -> -0
ddmin037 min -0 0.0 -> -0
ddmin038 min 0.0 0 -> 0.0
ddmin039 min 0.0 -0 -> -0
ddmin040 min 0.0 -0.0 -> -0.0
ddmin041 min 0.0 0.0 -> 0.0
ddmin042 min -0.0 0 -> -0.0
ddmin043 min -0.0 -0 -> -0
ddmin044 min -0.0 -0.0 -> -0.0
ddmin045 min -0.0 0.0 -> -0.0
ddmin046 min 0E1 -0E1 -> -0E+1
ddmin047 min -0E1 0E2 -> -0E+1
ddmin048 min 0E2 0E1 -> 0E+1
ddmin049 min 0E1 0E2 -> 0E+1
ddmin050 min -0E3 -0E2 -> -0E+3
ddmin051 min -0E2 -0E3 -> -0E+3
-- Specials
ddmin090 min Inf -Inf -> -Infinity
ddmin091 min Inf -1000 -> -1000
ddmin092 min Inf -1 -> -1
ddmin093 min Inf -0 -> -0
ddmin094 min Inf 0 -> 0
ddmin095 min Inf 1 -> 1
ddmin096 min Inf 1000 -> 1000
ddmin097 min Inf Inf -> Infinity
ddmin098 min -1000 Inf -> -1000
ddmin099 min -Inf Inf -> -Infinity
ddmin100 min -1 Inf -> -1
ddmin101 min -0 Inf -> -0
ddmin102 min 0 Inf -> 0
ddmin103 min 1 Inf -> 1
ddmin104 min 1000 Inf -> 1000
ddmin105 min Inf Inf -> Infinity
ddmin120 min -Inf -Inf -> -Infinity
ddmin121 min -Inf -1000 -> -Infinity
ddmin122 min -Inf -1 -> -Infinity
ddmin123 min -Inf -0 -> -Infinity
ddmin124 min -Inf 0 -> -Infinity
ddmin125 min -Inf 1 -> -Infinity
ddmin126 min -Inf 1000 -> -Infinity
ddmin127 min -Inf Inf -> -Infinity
ddmin128 min -Inf -Inf -> -Infinity
ddmin129 min -1000 -Inf -> -Infinity
ddmin130 min -1 -Inf -> -Infinity
ddmin131 min -0 -Inf -> -Infinity
ddmin132 min 0 -Inf -> -Infinity
ddmin133 min 1 -Inf -> -Infinity
ddmin134 min 1000 -Inf -> -Infinity
ddmin135 min Inf -Inf -> -Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
ddmin141 min NaN -Inf -> -Infinity
ddmin142 min NaN -1000 -> -1000
ddmin143 min NaN -1 -> -1
ddmin144 min NaN -0 -> -0
ddmin145 min NaN 0 -> 0
ddmin146 min NaN 1 -> 1
ddmin147 min NaN 1000 -> 1000
ddmin148 min NaN Inf -> Infinity
ddmin149 min NaN NaN -> NaN
ddmin150 min -Inf NaN -> -Infinity
ddmin151 min -1000 NaN -> -1000
ddmin152 min -1 -NaN -> -1
ddmin153 min -0 NaN -> -0
ddmin154 min 0 -NaN -> 0
ddmin155 min 1 NaN -> 1
ddmin156 min 1000 NaN -> 1000
ddmin157 min Inf NaN -> Infinity
ddmin161 min sNaN -Inf -> NaN Invalid_operation
ddmin162 min sNaN -1000 -> NaN Invalid_operation
ddmin163 min sNaN -1 -> NaN Invalid_operation
ddmin164 min sNaN -0 -> NaN Invalid_operation
ddmin165 min -sNaN 0 -> -NaN Invalid_operation
ddmin166 min -sNaN 1 -> -NaN Invalid_operation
ddmin167 min sNaN 1000 -> NaN Invalid_operation
ddmin168 min sNaN NaN -> NaN Invalid_operation
ddmin169 min sNaN sNaN -> NaN Invalid_operation
ddmin170 min NaN sNaN -> NaN Invalid_operation
ddmin171 min -Inf sNaN -> NaN Invalid_operation
ddmin172 min -1000 sNaN -> NaN Invalid_operation
ddmin173 min -1 sNaN -> NaN Invalid_operation
ddmin174 min -0 sNaN -> NaN Invalid_operation
ddmin175 min 0 sNaN -> NaN Invalid_operation
ddmin176 min 1 sNaN -> NaN Invalid_operation
ddmin177 min 1000 sNaN -> NaN Invalid_operation
ddmin178 min Inf sNaN -> NaN Invalid_operation
ddmin179 min NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddmin181 min NaN9 -Inf -> -Infinity
ddmin182 min -NaN8 9990 -> 9990
ddmin183 min NaN71 Inf -> Infinity
ddmin184 min NaN1 NaN54 -> NaN1
ddmin185 min NaN22 -NaN53 -> NaN22
ddmin186 min -NaN3 NaN6 -> -NaN3
ddmin187 min -NaN44 NaN7 -> -NaN44
ddmin188 min -Inf NaN41 -> -Infinity
ddmin189 min -9999 -NaN33 -> -9999
ddmin190 min Inf NaN2 -> Infinity
ddmin191 min sNaN99 -Inf -> NaN99 Invalid_operation
ddmin192 min sNaN98 -11 -> NaN98 Invalid_operation
ddmin193 min -sNaN97 NaN8 -> -NaN97 Invalid_operation
ddmin194 min sNaN69 sNaN94 -> NaN69 Invalid_operation
ddmin195 min NaN95 sNaN93 -> NaN93 Invalid_operation
ddmin196 min -Inf sNaN92 -> NaN92 Invalid_operation
ddmin197 min 088 sNaN91 -> NaN91 Invalid_operation
ddmin198 min Inf -sNaN90 -> -NaN90 Invalid_operation
ddmin199 min NaN sNaN86 -> NaN86 Invalid_operation
-- old rounding checks
ddmin221 min -12345678000 1 -> -12345678000
ddmin222 min 1 -12345678000 -> -12345678000
ddmin223 min -1234567800 1 -> -1234567800
ddmin224 min 1 -1234567800 -> -1234567800
ddmin225 min -1234567890 1 -> -1234567890
ddmin226 min 1 -1234567890 -> -1234567890
ddmin227 min -1234567891 1 -> -1234567891
ddmin228 min 1 -1234567891 -> -1234567891
ddmin229 min -12345678901 1 -> -12345678901
ddmin230 min 1 -12345678901 -> -12345678901
ddmin231 min -1234567896 1 -> -1234567896
ddmin232 min 1 -1234567896 -> -1234567896
ddmin233 min 1234567891 1 -> 1
ddmin234 min 1 1234567891 -> 1
ddmin235 min 12345678901 1 -> 1
ddmin236 min 1 12345678901 -> 1
ddmin237 min 1234567896 1 -> 1
ddmin238 min 1 1234567896 -> 1
-- from examples
ddmin280 min '3' '2' -> '2'
ddmin281 min '-10' '3' -> '-10'
ddmin282 min '1.0' '1' -> '1.0'
ddmin283 min '1' '1.0' -> '1.0'
ddmin284 min '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
ddmin401 min Inf 1.1 -> 1.1
ddmin402 min 1.1 1 -> 1
ddmin403 min 1 1.0 -> 1.0
ddmin404 min 1.0 0.1 -> 0.1
ddmin405 min 0.1 0.10 -> 0.10
ddmin406 min 0.10 0.100 -> 0.100
ddmin407 min 0.10 0 -> 0
ddmin408 min 0 0.0 -> 0.0
ddmin409 min 0.0 -0 -> -0
ddmin410 min 0.0 -0.0 -> -0.0
ddmin411 min 0.00 -0.0 -> -0.0
ddmin412 min 0.0 -0.00 -> -0.00
ddmin413 min 0 -0.0 -> -0.0
ddmin414 min 0 -0 -> -0
ddmin415 min -0.0 -0 -> -0
ddmin416 min -0 -0.100 -> -0.100
ddmin417 min -0.100 -0.10 -> -0.10
ddmin418 min -0.10 -0.1 -> -0.1
ddmin419 min -0.1 -1.0 -> -1.0
ddmin420 min -1.0 -1 -> -1
ddmin421 min -1 -1.1 -> -1.1
ddmin423 min -1.1 -Inf -> -Infinity
-- same with operands reversed
ddmin431 min 1.1 Inf -> 1.1
ddmin432 min 1 1.1 -> 1
ddmin433 min 1.0 1 -> 1.0
ddmin434 min 0.1 1.0 -> 0.1
ddmin435 min 0.10 0.1 -> 0.10
ddmin436 min 0.100 0.10 -> 0.100
ddmin437 min 0 0.10 -> 0
ddmin438 min 0.0 0 -> 0.0
ddmin439 min -0 0.0 -> -0
ddmin440 min -0.0 0.0 -> -0.0
ddmin441 min -0.0 0.00 -> -0.0
ddmin442 min -0.00 0.0 -> -0.00
ddmin443 min -0.0 0 -> -0.0
ddmin444 min -0 0 -> -0
ddmin445 min -0 -0.0 -> -0
ddmin446 min -0.100 -0 -> -0.100
ddmin447 min -0.10 -0.100 -> -0.10
ddmin448 min -0.1 -0.10 -> -0.1
ddmin449 min -1.0 -0.1 -> -1.0
ddmin450 min -1 -1.0 -> -1
ddmin451 min -1.1 -1 -> -1.1
ddmin453 min -Inf -1.1 -> -Infinity
-- largies
ddmin460 min 1000 1E+3 -> 1000
ddmin461 min 1E+3 1000 -> 1000
ddmin462 min 1000 -1E+3 -> -1E+3
ddmin463 min 1E+3 -384 -> -384
ddmin464 min -384 1E+3 -> -384
ddmin465 min -1E+3 1000 -> -1E+3
ddmin466 min -384 -1E+3 -> -1E+3
ddmin467 min -1E+3 -384 -> -1E+3
-- misalignment traps for little-endian
ddmin471 min 1.0 0.1 -> 0.1
ddmin472 min 0.1 1.0 -> 0.1
ddmin473 min 10.0 0.1 -> 0.1
ddmin474 min 0.1 10.0 -> 0.1
ddmin475 min 100 1.0 -> 1.0
ddmin476 min 1.0 100 -> 1.0
ddmin477 min 1000 10.0 -> 10.0
ddmin478 min 10.0 1000 -> 10.0
ddmin479 min 10000 100.0 -> 100.0
ddmin480 min 100.0 10000 -> 100.0
ddmin481 min 100000 1000.0 -> 1000.0
ddmin482 min 1000.0 100000 -> 1000.0
ddmin483 min 1000000 10000.0 -> 10000.0
ddmin484 min 10000.0 1000000 -> 10000.0
-- subnormals
ddmin510 min 1.00E-383 0 -> 0
ddmin511 min 0.1E-383 0 -> 0
ddmin512 min 0.10E-383 0 -> 0
ddmin513 min 0.100E-383 0 -> 0
ddmin514 min 0.01E-383 0 -> 0
ddmin515 min 0.999E-383 0 -> 0
ddmin516 min 0.099E-383 0 -> 0
ddmin517 min 0.009E-383 0 -> 0
ddmin518 min 0.001E-383 0 -> 0
ddmin519 min 0.0009E-383 0 -> 0
ddmin520 min 0.0001E-383 0 -> 0
ddmin530 min -1.00E-383 0 -> -1.00E-383
ddmin531 min -0.1E-383 0 -> -1E-384 Subnormal
ddmin532 min -0.10E-383 0 -> -1.0E-384 Subnormal
ddmin533 min -0.100E-383 0 -> -1.00E-384 Subnormal
ddmin534 min -0.01E-383 0 -> -1E-385 Subnormal
ddmin535 min -0.999E-383 0 -> -9.99E-384 Subnormal
ddmin536 min -0.099E-383 0 -> -9.9E-385 Subnormal
ddmin537 min -0.009E-383 0 -> -9E-386 Subnormal
ddmin538 min -0.001E-383 0 -> -1E-386 Subnormal
ddmin539 min -0.0009E-383 0 -> -9E-387 Subnormal
ddmin540 min -0.0001E-383 0 -> -1E-387 Subnormal
-- Null tests
ddmin900 min 10 # -> NaN Invalid_operation
ddmin901 min # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,293 @@
------------------------------------------------------------------------
-- ddMinMag.decTest -- decDouble minnummag --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- we assume that base comparison is tested in compare.decTest, so
-- these mainly cover special cases and rounding
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- sanity checks
ddmng001 minmag -2 -2 -> -2
ddmng002 minmag -2 -1 -> -1
ddmng003 minmag -2 0 -> 0
ddmng004 minmag -2 1 -> 1
ddmng005 minmag -2 2 -> -2
ddmng006 minmag -1 -2 -> -1
ddmng007 minmag -1 -1 -> -1
ddmng008 minmag -1 0 -> 0
ddmng009 minmag -1 1 -> -1
ddmng010 minmag -1 2 -> -1
ddmng011 minmag 0 -2 -> 0
ddmng012 minmag 0 -1 -> 0
ddmng013 minmag 0 0 -> 0
ddmng014 minmag 0 1 -> 0
ddmng015 minmag 0 2 -> 0
ddmng016 minmag 1 -2 -> 1
ddmng017 minmag 1 -1 -> -1
ddmng018 minmag 1 0 -> 0
ddmng019 minmag 1 1 -> 1
ddmng020 minmag 1 2 -> 1
ddmng021 minmag 2 -2 -> -2
ddmng022 minmag 2 -1 -> -1
ddmng023 minmag 2 0 -> 0
ddmng025 minmag 2 1 -> 1
ddmng026 minmag 2 2 -> 2
-- extended zeros
ddmng030 minmag 0 0 -> 0
ddmng031 minmag 0 -0 -> -0
ddmng032 minmag 0 -0.0 -> -0.0
ddmng033 minmag 0 0.0 -> 0.0
ddmng034 minmag -0 0 -> -0
ddmng035 minmag -0 -0 -> -0
ddmng036 minmag -0 -0.0 -> -0
ddmng037 minmag -0 0.0 -> -0
ddmng038 minmag 0.0 0 -> 0.0
ddmng039 minmag 0.0 -0 -> -0
ddmng040 minmag 0.0 -0.0 -> -0.0
ddmng041 minmag 0.0 0.0 -> 0.0
ddmng042 minmag -0.0 0 -> -0.0
ddmng043 minmag -0.0 -0 -> -0
ddmng044 minmag -0.0 -0.0 -> -0.0
ddmng045 minmag -0.0 0.0 -> -0.0
ddmng046 minmag 0E1 -0E1 -> -0E+1
ddmng047 minmag -0E1 0E2 -> -0E+1
ddmng048 minmag 0E2 0E1 -> 0E+1
ddmng049 minmag 0E1 0E2 -> 0E+1
ddmng050 minmag -0E3 -0E2 -> -0E+3
ddmng051 minmag -0E2 -0E3 -> -0E+3
-- Specials
ddmng090 minmag Inf -Inf -> -Infinity
ddmng091 minmag Inf -1000 -> -1000
ddmng092 minmag Inf -1 -> -1
ddmng093 minmag Inf -0 -> -0
ddmng094 minmag Inf 0 -> 0
ddmng095 minmag Inf 1 -> 1
ddmng096 minmag Inf 1000 -> 1000
ddmng097 minmag Inf Inf -> Infinity
ddmng098 minmag -1000 Inf -> -1000
ddmng099 minmag -Inf Inf -> -Infinity
ddmng100 minmag -1 Inf -> -1
ddmng101 minmag -0 Inf -> -0
ddmng102 minmag 0 Inf -> 0
ddmng103 minmag 1 Inf -> 1
ddmng104 minmag 1000 Inf -> 1000
ddmng105 minmag Inf Inf -> Infinity
ddmng120 minmag -Inf -Inf -> -Infinity
ddmng121 minmag -Inf -1000 -> -1000
ddmng122 minmag -Inf -1 -> -1
ddmng123 minmag -Inf -0 -> -0
ddmng124 minmag -Inf 0 -> 0
ddmng125 minmag -Inf 1 -> 1
ddmng126 minmag -Inf 1000 -> 1000
ddmng127 minmag -Inf Inf -> -Infinity
ddmng128 minmag -Inf -Inf -> -Infinity
ddmng129 minmag -1000 -Inf -> -1000
ddmng130 minmag -1 -Inf -> -1
ddmng131 minmag -0 -Inf -> -0
ddmng132 minmag 0 -Inf -> 0
ddmng133 minmag 1 -Inf -> 1
ddmng134 minmag 1000 -Inf -> 1000
ddmng135 minmag Inf -Inf -> -Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
ddmng141 minmag NaN -Inf -> -Infinity
ddmng142 minmag NaN -1000 -> -1000
ddmng143 minmag NaN -1 -> -1
ddmng144 minmag NaN -0 -> -0
ddmng145 minmag NaN 0 -> 0
ddmng146 minmag NaN 1 -> 1
ddmng147 minmag NaN 1000 -> 1000
ddmng148 minmag NaN Inf -> Infinity
ddmng149 minmag NaN NaN -> NaN
ddmng150 minmag -Inf NaN -> -Infinity
ddmng151 minmag -1000 NaN -> -1000
ddmng152 minmag -1 -NaN -> -1
ddmng153 minmag -0 NaN -> -0
ddmng154 minmag 0 -NaN -> 0
ddmng155 minmag 1 NaN -> 1
ddmng156 minmag 1000 NaN -> 1000
ddmng157 minmag Inf NaN -> Infinity
ddmng161 minmag sNaN -Inf -> NaN Invalid_operation
ddmng162 minmag sNaN -1000 -> NaN Invalid_operation
ddmng163 minmag sNaN -1 -> NaN Invalid_operation
ddmng164 minmag sNaN -0 -> NaN Invalid_operation
ddmng165 minmag -sNaN 0 -> -NaN Invalid_operation
ddmng166 minmag -sNaN 1 -> -NaN Invalid_operation
ddmng167 minmag sNaN 1000 -> NaN Invalid_operation
ddmng168 minmag sNaN NaN -> NaN Invalid_operation
ddmng169 minmag sNaN sNaN -> NaN Invalid_operation
ddmng170 minmag NaN sNaN -> NaN Invalid_operation
ddmng171 minmag -Inf sNaN -> NaN Invalid_operation
ddmng172 minmag -1000 sNaN -> NaN Invalid_operation
ddmng173 minmag -1 sNaN -> NaN Invalid_operation
ddmng174 minmag -0 sNaN -> NaN Invalid_operation
ddmng175 minmag 0 sNaN -> NaN Invalid_operation
ddmng176 minmag 1 sNaN -> NaN Invalid_operation
ddmng177 minmag 1000 sNaN -> NaN Invalid_operation
ddmng178 minmag Inf sNaN -> NaN Invalid_operation
ddmng179 minmag NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddmng181 minmag NaN9 -Inf -> -Infinity
ddmng182 minmag -NaN8 9990 -> 9990
ddmng183 minmag NaN71 Inf -> Infinity
ddmng184 minmag NaN1 NaN54 -> NaN1
ddmng185 minmag NaN22 -NaN53 -> NaN22
ddmng186 minmag -NaN3 NaN6 -> -NaN3
ddmng187 minmag -NaN44 NaN7 -> -NaN44
ddmng188 minmag -Inf NaN41 -> -Infinity
ddmng189 minmag -9999 -NaN33 -> -9999
ddmng190 minmag Inf NaN2 -> Infinity
ddmng191 minmag sNaN99 -Inf -> NaN99 Invalid_operation
ddmng192 minmag sNaN98 -11 -> NaN98 Invalid_operation
ddmng193 minmag -sNaN97 NaN8 -> -NaN97 Invalid_operation
ddmng194 minmag sNaN69 sNaN94 -> NaN69 Invalid_operation
ddmng195 minmag NaN95 sNaN93 -> NaN93 Invalid_operation
ddmng196 minmag -Inf sNaN92 -> NaN92 Invalid_operation
ddmng197 minmag 088 sNaN91 -> NaN91 Invalid_operation
ddmng198 minmag Inf -sNaN90 -> -NaN90 Invalid_operation
ddmng199 minmag NaN sNaN86 -> NaN86 Invalid_operation
-- old rounding checks
ddmng221 minmag -12345678000 1 -> 1
ddmng222 minmag 1 -12345678000 -> 1
ddmng223 minmag -1234567800 1 -> 1
ddmng224 minmag 1 -1234567800 -> 1
ddmng225 minmag -1234567890 1 -> 1
ddmng226 minmag 1 -1234567890 -> 1
ddmng227 minmag -1234567891 1 -> 1
ddmng228 minmag 1 -1234567891 -> 1
ddmng229 minmag -12345678901 1 -> 1
ddmng230 minmag 1 -12345678901 -> 1
ddmng231 minmag -1234567896 1 -> 1
ddmng232 minmag 1 -1234567896 -> 1
ddmng233 minmag 1234567891 1 -> 1
ddmng234 minmag 1 1234567891 -> 1
ddmng235 minmag 12345678901 1 -> 1
ddmng236 minmag 1 12345678901 -> 1
ddmng237 minmag 1234567896 1 -> 1
ddmng238 minmag 1 1234567896 -> 1
-- from examples
ddmng280 minmag '3' '2' -> '2'
ddmng281 minmag '-10' '3' -> '3'
ddmng282 minmag '1.0' '1' -> '1.0'
ddmng283 minmag '1' '1.0' -> '1.0'
ddmng284 minmag '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
ddmng401 minmag Inf 1.1 -> 1.1
ddmng402 minmag 1.1 1 -> 1
ddmng403 minmag 1 1.0 -> 1.0
ddmng404 minmag 1.0 0.1 -> 0.1
ddmng405 minmag 0.1 0.10 -> 0.10
ddmng406 minmag 0.10 0.100 -> 0.100
ddmng407 minmag 0.10 0 -> 0
ddmng408 minmag 0 0.0 -> 0.0
ddmng409 minmag 0.0 -0 -> -0
ddmng410 minmag 0.0 -0.0 -> -0.0
ddmng411 minmag 0.00 -0.0 -> -0.0
ddmng412 minmag 0.0 -0.00 -> -0.00
ddmng413 minmag 0 -0.0 -> -0.0
ddmng414 minmag 0 -0 -> -0
ddmng415 minmag -0.0 -0 -> -0
ddmng416 minmag -0 -0.100 -> -0
ddmng417 minmag -0.100 -0.10 -> -0.10
ddmng418 minmag -0.10 -0.1 -> -0.1
ddmng419 minmag -0.1 -1.0 -> -0.1
ddmng420 minmag -1.0 -1 -> -1
ddmng421 minmag -1 -1.1 -> -1
ddmng423 minmag -1.1 -Inf -> -1.1
-- same with operands reversed
ddmng431 minmag 1.1 Inf -> 1.1
ddmng432 minmag 1 1.1 -> 1
ddmng433 minmag 1.0 1 -> 1.0
ddmng434 minmag 0.1 1.0 -> 0.1
ddmng435 minmag 0.10 0.1 -> 0.10
ddmng436 minmag 0.100 0.10 -> 0.100
ddmng437 minmag 0 0.10 -> 0
ddmng438 minmag 0.0 0 -> 0.0
ddmng439 minmag -0 0.0 -> -0
ddmng440 minmag -0.0 0.0 -> -0.0
ddmng441 minmag -0.0 0.00 -> -0.0
ddmng442 minmag -0.00 0.0 -> -0.00
ddmng443 minmag -0.0 0 -> -0.0
ddmng444 minmag -0 0 -> -0
ddmng445 minmag -0 -0.0 -> -0
ddmng446 minmag -0.100 -0 -> -0
ddmng447 minmag -0.10 -0.100 -> -0.10
ddmng448 minmag -0.1 -0.10 -> -0.1
ddmng449 minmag -1.0 -0.1 -> -0.1
ddmng450 minmag -1 -1.0 -> -1
ddmng451 minmag -1.1 -1 -> -1
ddmng453 minmag -Inf -1.1 -> -1.1
-- largies
ddmng460 minmag 1000 1E+3 -> 1000
ddmng461 minmag 1E+3 1000 -> 1000
ddmng462 minmag 1000 -1E+3 -> -1E+3
ddmng463 minmag 1E+3 -384 -> -384
ddmng464 minmag -384 1E+3 -> -384
ddmng465 minmag -1E+3 1000 -> -1E+3
ddmng466 minmag -384 -1E+3 -> -384
ddmng467 minmag -1E+3 -384 -> -384
-- subnormals
ddmng510 minmag 1.00E-383 0 -> 0
ddmng511 minmag 0.1E-383 0 -> 0
ddmng512 minmag 0.10E-383 0 -> 0
ddmng513 minmag 0.100E-383 0 -> 0
ddmng514 minmag 0.01E-383 0 -> 0
ddmng515 minmag 0.999E-383 0 -> 0
ddmng516 minmag 0.099E-383 0 -> 0
ddmng517 minmag 0.009E-383 0 -> 0
ddmng518 minmag 0.001E-383 0 -> 0
ddmng519 minmag 0.0009E-383 0 -> 0
ddmng520 minmag 0.0001E-383 0 -> 0
ddmng530 minmag -1.00E-383 0 -> 0
ddmng531 minmag -0.1E-383 0 -> 0
ddmng532 minmag -0.10E-383 0 -> 0
ddmng533 minmag -0.100E-383 0 -> 0
ddmng534 minmag -0.01E-383 0 -> 0
ddmng535 minmag -0.999E-383 0 -> 0
ddmng536 minmag -0.099E-383 0 -> 0
ddmng537 minmag -0.009E-383 0 -> 0
ddmng538 minmag -0.001E-383 0 -> 0
ddmng539 minmag -0.0009E-383 0 -> 0
ddmng540 minmag -0.0001E-383 0 -> 0
-- Null tests
ddmng900 minmag 10 # -> NaN Invalid_operation
ddmng901 minmag # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,88 @@
------------------------------------------------------------------------
-- ddMinus.decTest -- decDouble 0-x --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decDoubles.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check
ddmns001 minus +7.50 -> -7.50
-- Infinities
ddmns011 minus Infinity -> -Infinity
ddmns012 minus -Infinity -> Infinity
-- NaNs, 0 payload
ddmns021 minus NaN -> NaN
ddmns022 minus -NaN -> -NaN
ddmns023 minus sNaN -> NaN Invalid_operation
ddmns024 minus -sNaN -> -NaN Invalid_operation
-- NaNs, non-0 payload
ddmns031 minus NaN13 -> NaN13
ddmns032 minus -NaN13 -> -NaN13
ddmns033 minus sNaN13 -> NaN13 Invalid_operation
ddmns034 minus -sNaN13 -> -NaN13 Invalid_operation
ddmns035 minus NaN70 -> NaN70
ddmns036 minus -NaN70 -> -NaN70
ddmns037 minus sNaN101 -> NaN101 Invalid_operation
ddmns038 minus -sNaN101 -> -NaN101 Invalid_operation
-- finites
ddmns101 minus 7 -> -7
ddmns102 minus -7 -> 7
ddmns103 minus 75 -> -75
ddmns104 minus -75 -> 75
ddmns105 minus 7.50 -> -7.50
ddmns106 minus -7.50 -> 7.50
ddmns107 minus 7.500 -> -7.500
ddmns108 minus -7.500 -> 7.500
-- zeros
ddmns111 minus 0 -> 0
ddmns112 minus -0 -> 0
ddmns113 minus 0E+4 -> 0E+4
ddmns114 minus -0E+4 -> 0E+4
ddmns115 minus 0.0000 -> 0.0000
ddmns116 minus -0.0000 -> 0.0000
ddmns117 minus 0E-141 -> 0E-141
ddmns118 minus -0E-141 -> 0E-141
-- full coefficients, alternating bits
ddmns121 minus 2682682682682682 -> -2682682682682682
ddmns122 minus -2682682682682682 -> 2682682682682682
ddmns123 minus 1341341341341341 -> -1341341341341341
ddmns124 minus -1341341341341341 -> 1341341341341341
-- Nmax, Nmin, Ntiny
ddmns131 minus 9.999999999999999E+384 -> -9.999999999999999E+384
ddmns132 minus 1E-383 -> -1E-383
ddmns133 minus 1.000000000000000E-383 -> -1.000000000000000E-383
ddmns134 minus 1E-398 -> -1E-398 Subnormal
ddmns135 minus -1E-398 -> 1E-398 Subnormal
ddmns136 minus -1.000000000000000E-383 -> 1.000000000000000E-383
ddmns137 minus -1E-383 -> 1E-383
ddmns138 minus -9.999999999999999E+384 -> 9.999999999999999E+384

View File

@@ -0,0 +1,553 @@
------------------------------------------------------------------------
-- ddMultiply.decTest -- decDouble multiplication --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- This set of tests are for decDoubles only; all arguments are
-- representable in a decDouble
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- sanity checks
ddmul000 multiply 2 2 -> 4
ddmul001 multiply 2 3 -> 6
ddmul002 multiply 5 1 -> 5
ddmul003 multiply 5 2 -> 10
ddmul004 multiply 1.20 2 -> 2.40
ddmul005 multiply 1.20 0 -> 0.00
ddmul006 multiply 1.20 -2 -> -2.40
ddmul007 multiply -1.20 2 -> -2.40
ddmul008 multiply -1.20 0 -> -0.00
ddmul009 multiply -1.20 -2 -> 2.40
ddmul010 multiply 5.09 7.1 -> 36.139
ddmul011 multiply 2.5 4 -> 10.0
ddmul012 multiply 2.50 4 -> 10.00
ddmul013 multiply 1.23456789 1.00000000 -> 1.234567890000000 Rounded
ddmul015 multiply 2.50 4 -> 10.00
ddmul016 multiply 9.999999999 9.999999999 -> 99.99999998000000 Inexact Rounded
ddmul017 multiply 9.999999999 -9.999999999 -> -99.99999998000000 Inexact Rounded
ddmul018 multiply -9.999999999 9.999999999 -> -99.99999998000000 Inexact Rounded
ddmul019 multiply -9.999999999 -9.999999999 -> 99.99999998000000 Inexact Rounded
-- zeros, etc.
ddmul021 multiply 0 0 -> 0
ddmul022 multiply 0 -0 -> -0
ddmul023 multiply -0 0 -> -0
ddmul024 multiply -0 -0 -> 0
ddmul025 multiply -0.0 -0.0 -> 0.00
ddmul026 multiply -0.0 -0.0 -> 0.00
ddmul027 multiply -0.0 -0.0 -> 0.00
ddmul028 multiply -0.0 -0.0 -> 0.00
ddmul030 multiply 5.00 1E-3 -> 0.00500
ddmul031 multiply 00.00 0.000 -> 0.00000
ddmul032 multiply 00.00 0E-3 -> 0.00000 -- rhs is 0
ddmul033 multiply 0E-3 00.00 -> 0.00000 -- lhs is 0
ddmul034 multiply -5.00 1E-3 -> -0.00500
ddmul035 multiply -00.00 0.000 -> -0.00000
ddmul036 multiply -00.00 0E-3 -> -0.00000 -- rhs is 0
ddmul037 multiply -0E-3 00.00 -> -0.00000 -- lhs is 0
ddmul038 multiply 5.00 -1E-3 -> -0.00500
ddmul039 multiply 00.00 -0.000 -> -0.00000
ddmul040 multiply 00.00 -0E-3 -> -0.00000 -- rhs is 0
ddmul041 multiply 0E-3 -00.00 -> -0.00000 -- lhs is 0
ddmul042 multiply -5.00 -1E-3 -> 0.00500
ddmul043 multiply -00.00 -0.000 -> 0.00000
ddmul044 multiply -00.00 -0E-3 -> 0.00000 -- rhs is 0
ddmul045 multiply -0E-3 -00.00 -> 0.00000 -- lhs is 0
-- examples from decarith
ddmul050 multiply 1.20 3 -> 3.60
ddmul051 multiply 7 3 -> 21
ddmul052 multiply 0.9 0.8 -> 0.72
ddmul053 multiply 0.9 -0 -> -0.0
ddmul054 multiply 654321 654321 -> 428135971041
ddmul060 multiply 123.45 1e7 -> 1.2345E+9
ddmul061 multiply 123.45 1e8 -> 1.2345E+10
ddmul062 multiply 123.45 1e+9 -> 1.2345E+11
ddmul063 multiply 123.45 1e10 -> 1.2345E+12
ddmul064 multiply 123.45 1e11 -> 1.2345E+13
ddmul065 multiply 123.45 1e12 -> 1.2345E+14
ddmul066 multiply 123.45 1e13 -> 1.2345E+15
-- test some intermediate lengths
-- 1234567890123456
ddmul080 multiply 0.1 1230123456456789 -> 123012345645678.9
ddmul084 multiply 0.1 1230123456456789 -> 123012345645678.9
ddmul090 multiply 1230123456456789 0.1 -> 123012345645678.9
ddmul094 multiply 1230123456456789 0.1 -> 123012345645678.9
-- test some more edge cases and carries
ddmul101 multiply 9 9 -> 81
ddmul102 multiply 9 90 -> 810
ddmul103 multiply 9 900 -> 8100
ddmul104 multiply 9 9000 -> 81000
ddmul105 multiply 9 90000 -> 810000
ddmul106 multiply 9 900000 -> 8100000
ddmul107 multiply 9 9000000 -> 81000000
ddmul108 multiply 9 90000000 -> 810000000
ddmul109 multiply 9 900000000 -> 8100000000
ddmul110 multiply 9 9000000000 -> 81000000000
ddmul111 multiply 9 90000000000 -> 810000000000
ddmul112 multiply 9 900000000000 -> 8100000000000
ddmul113 multiply 9 9000000000000 -> 81000000000000
ddmul114 multiply 9 90000000000000 -> 810000000000000
ddmul115 multiply 9 900000000000000 -> 8100000000000000
--ddmul116 multiply 9 9000000000000000 -> 81000000000000000
--ddmul117 multiply 9 90000000000000000 -> 810000000000000000
--ddmul118 multiply 9 900000000000000000 -> 8100000000000000000
--ddmul119 multiply 9 9000000000000000000 -> 81000000000000000000
--ddmul120 multiply 9 90000000000000000000 -> 810000000000000000000
--ddmul121 multiply 9 900000000000000000000 -> 8100000000000000000000
--ddmul122 multiply 9 9000000000000000000000 -> 81000000000000000000000
--ddmul123 multiply 9 90000000000000000000000 -> 810000000000000000000000
-- test some more edge cases without carries
ddmul131 multiply 3 3 -> 9
ddmul132 multiply 3 30 -> 90
ddmul133 multiply 3 300 -> 900
ddmul134 multiply 3 3000 -> 9000
ddmul135 multiply 3 30000 -> 90000
ddmul136 multiply 3 300000 -> 900000
ddmul137 multiply 3 3000000 -> 9000000
ddmul138 multiply 3 30000000 -> 90000000
ddmul139 multiply 3 300000000 -> 900000000
ddmul140 multiply 3 3000000000 -> 9000000000
ddmul141 multiply 3 30000000000 -> 90000000000
ddmul142 multiply 3 300000000000 -> 900000000000
ddmul143 multiply 3 3000000000000 -> 9000000000000
ddmul144 multiply 3 30000000000000 -> 90000000000000
ddmul145 multiply 3 300000000000000 -> 900000000000000
-- test some edge cases with exact rounding
ddmul301 multiply 9 9 -> 81
ddmul302 multiply 9 90 -> 810
ddmul303 multiply 9 900 -> 8100
ddmul304 multiply 9 9000 -> 81000
ddmul305 multiply 9 90000 -> 810000
ddmul306 multiply 9 900000 -> 8100000
ddmul307 multiply 9 9000000 -> 81000000
ddmul308 multiply 9 90000000 -> 810000000
ddmul309 multiply 9 900000000 -> 8100000000
ddmul310 multiply 9 9000000000 -> 81000000000
ddmul311 multiply 9 90000000000 -> 810000000000
ddmul312 multiply 9 900000000000 -> 8100000000000
ddmul313 multiply 9 9000000000000 -> 81000000000000
ddmul314 multiply 9 90000000000000 -> 810000000000000
ddmul315 multiply 9 900000000000000 -> 8100000000000000
ddmul316 multiply 9 9000000000000000 -> 8.100000000000000E+16 Rounded
ddmul317 multiply 90 9000000000000000 -> 8.100000000000000E+17 Rounded
ddmul318 multiply 900 9000000000000000 -> 8.100000000000000E+18 Rounded
ddmul319 multiply 9000 9000000000000000 -> 8.100000000000000E+19 Rounded
ddmul320 multiply 90000 9000000000000000 -> 8.100000000000000E+20 Rounded
ddmul321 multiply 900000 9000000000000000 -> 8.100000000000000E+21 Rounded
ddmul322 multiply 9000000 9000000000000000 -> 8.100000000000000E+22 Rounded
ddmul323 multiply 90000000 9000000000000000 -> 8.100000000000000E+23 Rounded
-- tryzeros cases
ddmul504 multiply 0E-260 1000E-260 -> 0E-398 Clamped
ddmul505 multiply 100E+260 0E+260 -> 0E+369 Clamped
-- 65K-1 case
ddmul506 multiply 77.1 850 -> 65535.0
-- mixed with zeros
ddmul541 multiply 0 -1 -> -0
ddmul542 multiply -0 -1 -> 0
ddmul543 multiply 0 1 -> 0
ddmul544 multiply -0 1 -> -0
ddmul545 multiply -1 0 -> -0
ddmul546 multiply -1 -0 -> 0
ddmul547 multiply 1 0 -> 0
ddmul548 multiply 1 -0 -> -0
ddmul551 multiply 0.0 -1 -> -0.0
ddmul552 multiply -0.0 -1 -> 0.0
ddmul553 multiply 0.0 1 -> 0.0
ddmul554 multiply -0.0 1 -> -0.0
ddmul555 multiply -1.0 0 -> -0.0
ddmul556 multiply -1.0 -0 -> 0.0
ddmul557 multiply 1.0 0 -> 0.0
ddmul558 multiply 1.0 -0 -> -0.0
ddmul561 multiply 0 -1.0 -> -0.0
ddmul562 multiply -0 -1.0 -> 0.0
ddmul563 multiply 0 1.0 -> 0.0
ddmul564 multiply -0 1.0 -> -0.0
ddmul565 multiply -1 0.0 -> -0.0
ddmul566 multiply -1 -0.0 -> 0.0
ddmul567 multiply 1 0.0 -> 0.0
ddmul568 multiply 1 -0.0 -> -0.0
ddmul571 multiply 0.0 -1.0 -> -0.00
ddmul572 multiply -0.0 -1.0 -> 0.00
ddmul573 multiply 0.0 1.0 -> 0.00
ddmul574 multiply -0.0 1.0 -> -0.00
ddmul575 multiply -1.0 0.0 -> -0.00
ddmul576 multiply -1.0 -0.0 -> 0.00
ddmul577 multiply 1.0 0.0 -> 0.00
ddmul578 multiply 1.0 -0.0 -> -0.00
-- Specials
ddmul580 multiply Inf -Inf -> -Infinity
ddmul581 multiply Inf -1000 -> -Infinity
ddmul582 multiply Inf -1 -> -Infinity
ddmul583 multiply Inf -0 -> NaN Invalid_operation
ddmul584 multiply Inf 0 -> NaN Invalid_operation
ddmul585 multiply Inf 1 -> Infinity
ddmul586 multiply Inf 1000 -> Infinity
ddmul587 multiply Inf Inf -> Infinity
ddmul588 multiply -1000 Inf -> -Infinity
ddmul589 multiply -Inf Inf -> -Infinity
ddmul590 multiply -1 Inf -> -Infinity
ddmul591 multiply -0 Inf -> NaN Invalid_operation
ddmul592 multiply 0 Inf -> NaN Invalid_operation
ddmul593 multiply 1 Inf -> Infinity
ddmul594 multiply 1000 Inf -> Infinity
ddmul595 multiply Inf Inf -> Infinity
ddmul600 multiply -Inf -Inf -> Infinity
ddmul601 multiply -Inf -1000 -> Infinity
ddmul602 multiply -Inf -1 -> Infinity
ddmul603 multiply -Inf -0 -> NaN Invalid_operation
ddmul604 multiply -Inf 0 -> NaN Invalid_operation
ddmul605 multiply -Inf 1 -> -Infinity
ddmul606 multiply -Inf 1000 -> -Infinity
ddmul607 multiply -Inf Inf -> -Infinity
ddmul608 multiply -1000 Inf -> -Infinity
ddmul609 multiply -Inf -Inf -> Infinity
ddmul610 multiply -1 -Inf -> Infinity
ddmul611 multiply -0 -Inf -> NaN Invalid_operation
ddmul612 multiply 0 -Inf -> NaN Invalid_operation
ddmul613 multiply 1 -Inf -> -Infinity
ddmul614 multiply 1000 -Inf -> -Infinity
ddmul615 multiply Inf -Inf -> -Infinity
ddmul621 multiply NaN -Inf -> NaN
ddmul622 multiply NaN -1000 -> NaN
ddmul623 multiply NaN -1 -> NaN
ddmul624 multiply NaN -0 -> NaN
ddmul625 multiply NaN 0 -> NaN
ddmul626 multiply NaN 1 -> NaN
ddmul627 multiply NaN 1000 -> NaN
ddmul628 multiply NaN Inf -> NaN
ddmul629 multiply NaN NaN -> NaN
ddmul630 multiply -Inf NaN -> NaN
ddmul631 multiply -1000 NaN -> NaN
ddmul632 multiply -1 NaN -> NaN
ddmul633 multiply -0 NaN -> NaN
ddmul634 multiply 0 NaN -> NaN
ddmul635 multiply 1 NaN -> NaN
ddmul636 multiply 1000 NaN -> NaN
ddmul637 multiply Inf NaN -> NaN
ddmul641 multiply sNaN -Inf -> NaN Invalid_operation
ddmul642 multiply sNaN -1000 -> NaN Invalid_operation
ddmul643 multiply sNaN -1 -> NaN Invalid_operation
ddmul644 multiply sNaN -0 -> NaN Invalid_operation
ddmul645 multiply sNaN 0 -> NaN Invalid_operation
ddmul646 multiply sNaN 1 -> NaN Invalid_operation
ddmul647 multiply sNaN 1000 -> NaN Invalid_operation
ddmul648 multiply sNaN NaN -> NaN Invalid_operation
ddmul649 multiply sNaN sNaN -> NaN Invalid_operation
ddmul650 multiply NaN sNaN -> NaN Invalid_operation
ddmul651 multiply -Inf sNaN -> NaN Invalid_operation
ddmul652 multiply -1000 sNaN -> NaN Invalid_operation
ddmul653 multiply -1 sNaN -> NaN Invalid_operation
ddmul654 multiply -0 sNaN -> NaN Invalid_operation
ddmul655 multiply 0 sNaN -> NaN Invalid_operation
ddmul656 multiply 1 sNaN -> NaN Invalid_operation
ddmul657 multiply 1000 sNaN -> NaN Invalid_operation
ddmul658 multiply Inf sNaN -> NaN Invalid_operation
ddmul659 multiply NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddmul661 multiply NaN9 -Inf -> NaN9
ddmul662 multiply NaN8 999 -> NaN8
ddmul663 multiply NaN71 Inf -> NaN71
ddmul664 multiply NaN6 NaN5 -> NaN6
ddmul665 multiply -Inf NaN4 -> NaN4
ddmul666 multiply -999 NaN33 -> NaN33
ddmul667 multiply Inf NaN2 -> NaN2
ddmul671 multiply sNaN99 -Inf -> NaN99 Invalid_operation
ddmul672 multiply sNaN98 -11 -> NaN98 Invalid_operation
ddmul673 multiply sNaN97 NaN -> NaN97 Invalid_operation
ddmul674 multiply sNaN16 sNaN94 -> NaN16 Invalid_operation
ddmul675 multiply NaN95 sNaN93 -> NaN93 Invalid_operation
ddmul676 multiply -Inf sNaN92 -> NaN92 Invalid_operation
ddmul677 multiply 088 sNaN91 -> NaN91 Invalid_operation
ddmul678 multiply Inf sNaN90 -> NaN90 Invalid_operation
ddmul679 multiply NaN sNaN89 -> NaN89 Invalid_operation
ddmul681 multiply -NaN9 -Inf -> -NaN9
ddmul682 multiply -NaN8 999 -> -NaN8
ddmul683 multiply -NaN71 Inf -> -NaN71
ddmul684 multiply -NaN6 -NaN5 -> -NaN6
ddmul685 multiply -Inf -NaN4 -> -NaN4
ddmul686 multiply -999 -NaN33 -> -NaN33
ddmul687 multiply Inf -NaN2 -> -NaN2
ddmul691 multiply -sNaN99 -Inf -> -NaN99 Invalid_operation
ddmul692 multiply -sNaN98 -11 -> -NaN98 Invalid_operation
ddmul693 multiply -sNaN97 NaN -> -NaN97 Invalid_operation
ddmul694 multiply -sNaN16 -sNaN94 -> -NaN16 Invalid_operation
ddmul695 multiply -NaN95 -sNaN93 -> -NaN93 Invalid_operation
ddmul696 multiply -Inf -sNaN92 -> -NaN92 Invalid_operation
ddmul697 multiply 088 -sNaN91 -> -NaN91 Invalid_operation
ddmul698 multiply Inf -sNaN90 -> -NaN90 Invalid_operation
ddmul699 multiply -NaN -sNaN89 -> -NaN89 Invalid_operation
ddmul701 multiply -NaN -Inf -> -NaN
ddmul702 multiply -NaN 999 -> -NaN
ddmul703 multiply -NaN Inf -> -NaN
ddmul704 multiply -NaN -NaN -> -NaN
ddmul705 multiply -Inf -NaN0 -> -NaN
ddmul706 multiply -999 -NaN -> -NaN
ddmul707 multiply Inf -NaN -> -NaN
ddmul711 multiply -sNaN -Inf -> -NaN Invalid_operation
ddmul712 multiply -sNaN -11 -> -NaN Invalid_operation
ddmul713 multiply -sNaN00 NaN -> -NaN Invalid_operation
ddmul714 multiply -sNaN -sNaN -> -NaN Invalid_operation
ddmul715 multiply -NaN -sNaN -> -NaN Invalid_operation
ddmul716 multiply -Inf -sNaN -> -NaN Invalid_operation
ddmul717 multiply 088 -sNaN -> -NaN Invalid_operation
ddmul718 multiply Inf -sNaN -> -NaN Invalid_operation
ddmul719 multiply -NaN -sNaN -> -NaN Invalid_operation
-- overflow and underflow tests .. note subnormal results
-- signs
ddmul751 multiply 1e+277 1e+311 -> Infinity Overflow Inexact Rounded
ddmul752 multiply 1e+277 -1e+311 -> -Infinity Overflow Inexact Rounded
ddmul753 multiply -1e+277 1e+311 -> -Infinity Overflow Inexact Rounded
ddmul754 multiply -1e+277 -1e+311 -> Infinity Overflow Inexact Rounded
ddmul755 multiply 1e-277 1e-311 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddmul756 multiply 1e-277 -1e-311 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddmul757 multiply -1e-277 1e-311 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddmul758 multiply -1e-277 -1e-311 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
ddmul760 multiply 1e-291 1e-101 -> 1E-392 Subnormal
ddmul761 multiply 1e-291 1e-102 -> 1E-393 Subnormal
ddmul762 multiply 1e-291 1e-103 -> 1E-394 Subnormal
ddmul763 multiply 1e-291 1e-104 -> 1E-395 Subnormal
ddmul764 multiply 1e-291 1e-105 -> 1E-396 Subnormal
ddmul765 multiply 1e-291 1e-106 -> 1E-397 Subnormal
ddmul766 multiply 1e-291 1e-107 -> 1E-398 Subnormal
ddmul767 multiply 1e-291 1e-108 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddmul768 multiply 1e-291 1e-109 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddmul769 multiply 1e-291 1e-110 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
-- [no equivalent of 'subnormal' for overflow]
ddmul770 multiply 1e+60 1e+321 -> 1.000000000000E+381 Clamped
ddmul771 multiply 1e+60 1e+322 -> 1.0000000000000E+382 Clamped
ddmul772 multiply 1e+60 1e+323 -> 1.00000000000000E+383 Clamped
ddmul773 multiply 1e+60 1e+324 -> 1.000000000000000E+384 Clamped
ddmul774 multiply 1e+60 1e+325 -> Infinity Overflow Inexact Rounded
ddmul775 multiply 1e+60 1e+326 -> Infinity Overflow Inexact Rounded
ddmul776 multiply 1e+60 1e+327 -> Infinity Overflow Inexact Rounded
ddmul777 multiply 1e+60 1e+328 -> Infinity Overflow Inexact Rounded
ddmul778 multiply 1e+60 1e+329 -> Infinity Overflow Inexact Rounded
ddmul779 multiply 1e+60 1e+330 -> Infinity Overflow Inexact Rounded
ddmul801 multiply 1.0000E-394 1 -> 1.0000E-394 Subnormal
ddmul802 multiply 1.000E-394 1e-1 -> 1.000E-395 Subnormal
ddmul803 multiply 1.00E-394 1e-2 -> 1.00E-396 Subnormal
ddmul804 multiply 1.0E-394 1e-3 -> 1.0E-397 Subnormal
ddmul805 multiply 1.0E-394 1e-4 -> 1E-398 Subnormal Rounded
ddmul806 multiply 1.3E-394 1e-4 -> 1E-398 Underflow Subnormal Inexact Rounded
ddmul807 multiply 1.5E-394 1e-4 -> 2E-398 Underflow Subnormal Inexact Rounded
ddmul808 multiply 1.7E-394 1e-4 -> 2E-398 Underflow Subnormal Inexact Rounded
ddmul809 multiply 2.3E-394 1e-4 -> 2E-398 Underflow Subnormal Inexact Rounded
ddmul810 multiply 2.5E-394 1e-4 -> 2E-398 Underflow Subnormal Inexact Rounded
ddmul811 multiply 2.7E-394 1e-4 -> 3E-398 Underflow Subnormal Inexact Rounded
ddmul812 multiply 1.49E-394 1e-4 -> 1E-398 Underflow Subnormal Inexact Rounded
ddmul813 multiply 1.50E-394 1e-4 -> 2E-398 Underflow Subnormal Inexact Rounded
ddmul814 multiply 1.51E-394 1e-4 -> 2E-398 Underflow Subnormal Inexact Rounded
ddmul815 multiply 2.49E-394 1e-4 -> 2E-398 Underflow Subnormal Inexact Rounded
ddmul816 multiply 2.50E-394 1e-4 -> 2E-398 Underflow Subnormal Inexact Rounded
ddmul817 multiply 2.51E-394 1e-4 -> 3E-398 Underflow Subnormal Inexact Rounded
ddmul818 multiply 1E-394 1e-4 -> 1E-398 Subnormal
ddmul819 multiply 3E-394 1e-5 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddmul820 multiply 5E-394 1e-5 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddmul821 multiply 7E-394 1e-5 -> 1E-398 Underflow Subnormal Inexact Rounded
ddmul822 multiply 9E-394 1e-5 -> 1E-398 Underflow Subnormal Inexact Rounded
ddmul823 multiply 9.9E-394 1e-5 -> 1E-398 Underflow Subnormal Inexact Rounded
ddmul824 multiply 1E-394 -1e-4 -> -1E-398 Subnormal
ddmul825 multiply 3E-394 -1e-5 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddmul826 multiply -5E-394 1e-5 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddmul827 multiply 7E-394 -1e-5 -> -1E-398 Underflow Subnormal Inexact Rounded
ddmul828 multiply -9E-394 1e-5 -> -1E-398 Underflow Subnormal Inexact Rounded
ddmul829 multiply 9.9E-394 -1e-5 -> -1E-398 Underflow Subnormal Inexact Rounded
ddmul830 multiply 3.0E-394 -1e-5 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddmul831 multiply 1.0E-199 1e-200 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddmul832 multiply 1.0E-199 1e-199 -> 1E-398 Subnormal Rounded
ddmul833 multiply 1.0E-199 1e-198 -> 1.0E-397 Subnormal
ddmul834 multiply 2.0E-199 2e-198 -> 4.0E-397 Subnormal
ddmul835 multiply 4.0E-199 4e-198 -> 1.60E-396 Subnormal
ddmul836 multiply 10.0E-199 10e-198 -> 1.000E-395 Subnormal
ddmul837 multiply 30.0E-199 30e-198 -> 9.000E-395 Subnormal
ddmul838 multiply 40.0E-199 40e-188 -> 1.6000E-384 Subnormal
ddmul839 multiply 40.0E-199 40e-187 -> 1.6000E-383
ddmul840 multiply 40.0E-199 40e-186 -> 1.6000E-382
-- Long operand overflow may be a different path
ddmul870 multiply 100 9.999E+383 -> Infinity Inexact Overflow Rounded
ddmul871 multiply 100 -9.999E+383 -> -Infinity Inexact Overflow Rounded
ddmul872 multiply 9.999E+383 100 -> Infinity Inexact Overflow Rounded
ddmul873 multiply -9.999E+383 100 -> -Infinity Inexact Overflow Rounded
-- check for double-rounded subnormals
ddmul881 multiply 1.2347E-355 1.2347E-40 -> 1.524E-395 Inexact Rounded Subnormal Underflow
ddmul882 multiply 1.234E-355 1.234E-40 -> 1.523E-395 Inexact Rounded Subnormal Underflow
ddmul883 multiply 1.23E-355 1.23E-40 -> 1.513E-395 Inexact Rounded Subnormal Underflow
ddmul884 multiply 1.2E-355 1.2E-40 -> 1.44E-395 Subnormal
ddmul885 multiply 1.2E-355 1.2E-41 -> 1.44E-396 Subnormal
ddmul886 multiply 1.2E-355 1.2E-42 -> 1.4E-397 Subnormal Inexact Rounded Underflow
ddmul887 multiply 1.2E-355 1.3E-42 -> 1.6E-397 Subnormal Inexact Rounded Underflow
ddmul888 multiply 1.3E-355 1.3E-42 -> 1.7E-397 Subnormal Inexact Rounded Underflow
ddmul889 multiply 1.3E-355 1.3E-43 -> 2E-398 Subnormal Inexact Rounded Underflow
ddmul890 multiply 1.3E-356 1.3E-43 -> 0E-398 Clamped Subnormal Inexact Rounded Underflow
ddmul891 multiply 1.2345E-39 1.234E-355 -> 1.5234E-394 Inexact Rounded Subnormal Underflow
ddmul892 multiply 1.23456E-39 1.234E-355 -> 1.5234E-394 Inexact Rounded Subnormal Underflow
ddmul893 multiply 1.2345E-40 1.234E-355 -> 1.523E-395 Inexact Rounded Subnormal Underflow
ddmul894 multiply 1.23456E-40 1.234E-355 -> 1.523E-395 Inexact Rounded Subnormal Underflow
ddmul895 multiply 1.2345E-41 1.234E-355 -> 1.52E-396 Inexact Rounded Subnormal Underflow
ddmul896 multiply 1.23456E-41 1.234E-355 -> 1.52E-396 Inexact Rounded Subnormal Underflow
-- Now explore the case where we get a normal result with Underflow
-- 1 234567890123456
ddmul900 multiply 0.3000000000E-191 0.3000000000E-191 -> 9.00000000000000E-384 Subnormal Rounded
ddmul901 multiply 0.3000000001E-191 0.3000000001E-191 -> 9.00000000600000E-384 Underflow Inexact Subnormal Rounded
ddmul902 multiply 9.999999999999999E-383 0.0999999999999 -> 9.99999999999000E-384 Underflow Inexact Subnormal Rounded
ddmul903 multiply 9.999999999999999E-383 0.09999999999999 -> 9.99999999999900E-384 Underflow Inexact Subnormal Rounded
ddmul904 multiply 9.999999999999999E-383 0.099999999999999 -> 9.99999999999990E-384 Underflow Inexact Subnormal Rounded
ddmul905 multiply 9.999999999999999E-383 0.0999999999999999 -> 9.99999999999999E-384 Underflow Inexact Subnormal Rounded
-- The next rounds to Nmin (b**emin); this is the distinguishing case
-- for detecting tininess (before or after rounding) -- if after
-- rounding then the result would be the same, but the Underflow flag
-- would not be set
ddmul906 multiply 9.999999999999999E-383 0.09999999999999999 -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded
-- prove those operands were exact
ddmul907 multiply 9.999999999999999E-383 1 -> 9.999999999999999E-383
ddmul908 multiply 1 0.09999999999999999 -> 0.09999999999999999
-- reducing tiniest
ddmul910 multiply 1e-398 0.99 -> 1E-398 Subnormal Inexact Rounded Underflow
ddmul911 multiply 1e-398 0.75 -> 1E-398 Subnormal Inexact Rounded Underflow
ddmul912 multiply 1e-398 0.5 -> 0E-398 Subnormal Inexact Rounded Underflow Clamped
ddmul913 multiply 1e-398 0.25 -> 0E-398 Subnormal Inexact Rounded Underflow Clamped
ddmul914 multiply 1e-398 0.01 -> 0E-398 Subnormal Inexact Rounded Underflow Clamped
-- hugest
ddmul920 multiply 9999999999999999 9999999999999999 -> 9.999999999999998E+31 Inexact Rounded
-- power-of-ten edge cases
ddmul1001 multiply 1 10 -> 10
ddmul1002 multiply 1 100 -> 100
ddmul1003 multiply 1 1000 -> 1000
ddmul1004 multiply 1 10000 -> 10000
ddmul1005 multiply 1 100000 -> 100000
ddmul1006 multiply 1 1000000 -> 1000000
ddmul1007 multiply 1 10000000 -> 10000000
ddmul1008 multiply 1 100000000 -> 100000000
ddmul1009 multiply 1 1000000000 -> 1000000000
ddmul1010 multiply 1 10000000000 -> 10000000000
ddmul1011 multiply 1 100000000000 -> 100000000000
ddmul1012 multiply 1 1000000000000 -> 1000000000000
ddmul1013 multiply 1 10000000000000 -> 10000000000000
ddmul1014 multiply 1 100000000000000 -> 100000000000000
ddmul1015 multiply 1 1000000000000000 -> 1000000000000000
ddmul1021 multiply 10 1 -> 10
ddmul1022 multiply 10 10 -> 100
ddmul1023 multiply 10 100 -> 1000
ddmul1024 multiply 10 1000 -> 10000
ddmul1025 multiply 10 10000 -> 100000
ddmul1026 multiply 10 100000 -> 1000000
ddmul1027 multiply 10 1000000 -> 10000000
ddmul1028 multiply 10 10000000 -> 100000000
ddmul1029 multiply 10 100000000 -> 1000000000
ddmul1030 multiply 10 1000000000 -> 10000000000
ddmul1031 multiply 10 10000000000 -> 100000000000
ddmul1032 multiply 10 100000000000 -> 1000000000000
ddmul1033 multiply 10 1000000000000 -> 10000000000000
ddmul1034 multiply 10 10000000000000 -> 100000000000000
ddmul1035 multiply 10 100000000000000 -> 1000000000000000
ddmul1041 multiply 100 0.1 -> 10.0
ddmul1042 multiply 100 1 -> 100
ddmul1043 multiply 100 10 -> 1000
ddmul1044 multiply 100 100 -> 10000
ddmul1045 multiply 100 1000 -> 100000
ddmul1046 multiply 100 10000 -> 1000000
ddmul1047 multiply 100 100000 -> 10000000
ddmul1048 multiply 100 1000000 -> 100000000
ddmul1049 multiply 100 10000000 -> 1000000000
ddmul1050 multiply 100 100000000 -> 10000000000
ddmul1051 multiply 100 1000000000 -> 100000000000
ddmul1052 multiply 100 10000000000 -> 1000000000000
ddmul1053 multiply 100 100000000000 -> 10000000000000
ddmul1054 multiply 100 1000000000000 -> 100000000000000
ddmul1055 multiply 100 10000000000000 -> 1000000000000000
ddmul1061 multiply 1000 0.01 -> 10.00
ddmul1062 multiply 1000 0.1 -> 100.0
ddmul1063 multiply 1000 1 -> 1000
ddmul1064 multiply 1000 10 -> 10000
ddmul1065 multiply 1000 100 -> 100000
ddmul1066 multiply 1000 1000 -> 1000000
ddmul1067 multiply 1000 10000 -> 10000000
ddmul1068 multiply 1000 100000 -> 100000000
ddmul1069 multiply 1000 1000000 -> 1000000000
ddmul1070 multiply 1000 10000000 -> 10000000000
ddmul1071 multiply 1000 100000000 -> 100000000000
ddmul1072 multiply 1000 1000000000 -> 1000000000000
ddmul1073 multiply 1000 10000000000 -> 10000000000000
ddmul1074 multiply 1000 100000000000 -> 100000000000000
ddmul1075 multiply 1000 1000000000000 -> 1000000000000000
ddmul1081 multiply 10000 0.001 -> 10.000
ddmul1082 multiply 10000 0.01 -> 100.00
ddmul1083 multiply 10000 0.1 -> 1000.0
ddmul1084 multiply 10000 1 -> 10000
ddmul1085 multiply 10000 10 -> 100000
ddmul1086 multiply 10000 100 -> 1000000
ddmul1087 multiply 10000 1000 -> 10000000
ddmul1088 multiply 10000 10000 -> 100000000
ddmul1089 multiply 10000 100000 -> 1000000000
ddmul1090 multiply 10000 1000000 -> 10000000000
ddmul1091 multiply 10000 10000000 -> 100000000000
ddmul1092 multiply 10000 100000000 -> 1000000000000
ddmul1093 multiply 10000 1000000000 -> 10000000000000
ddmul1094 multiply 10000 10000000000 -> 100000000000000
ddmul1095 multiply 10000 100000000000 -> 1000000000000000
ddmul1097 multiply 10000 99999999999 -> 999999999990000
ddmul1098 multiply 10000 99999999999 -> 999999999990000
-- Null tests
ddmul9990 multiply 10 # -> NaN Invalid_operation
ddmul9991 multiply # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,374 @@
------------------------------------------------------------------------
-- ddNextToward.decTest -- decDouble next toward rhs [754r nextafter] --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decDoubles.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check with a scattering of numerics
ddnextt001 nexttoward 10 10 -> 10
ddnextt002 nexttoward -10 -10 -> -10
ddnextt003 nexttoward 1 10 -> 1.000000000000001
ddnextt004 nexttoward 1 -10 -> 0.9999999999999999
ddnextt005 nexttoward -1 10 -> -0.9999999999999999
ddnextt006 nexttoward -1 -10 -> -1.000000000000001
ddnextt007 nexttoward 0 10 -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt008 nexttoward 0 -10 -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt009 nexttoward 9.999999999999999E+384 +Infinity -> Infinity Overflow Inexact Rounded
ddnextt010 nexttoward -9.999999999999999E+384 -Infinity -> -Infinity Overflow Inexact Rounded
ddnextt011 nexttoward 9.999999999999999 10 -> 10.00000000000000
ddnextt012 nexttoward 10 9.999999999999999 -> 9.999999999999999
ddnextt013 nexttoward -9.999999999999999 -10 -> -10.00000000000000
ddnextt014 nexttoward -10 -9.999999999999999 -> -9.999999999999999
ddnextt015 nexttoward 9.999999999999998 10 -> 9.999999999999999
ddnextt016 nexttoward 10 9.999999999999998 -> 9.999999999999999
ddnextt017 nexttoward -9.999999999999998 -10 -> -9.999999999999999
ddnextt018 nexttoward -10 -9.999999999999998 -> -9.999999999999999
------- lhs=rhs
-- finites
ddnextt101 nexttoward 7 7 -> 7
ddnextt102 nexttoward -7 -7 -> -7
ddnextt103 nexttoward 75 75 -> 75
ddnextt104 nexttoward -75 -75 -> -75
ddnextt105 nexttoward 7.50 7.5 -> 7.50
ddnextt106 nexttoward -7.50 -7.50 -> -7.50
ddnextt107 nexttoward 7.500 7.5000 -> 7.500
ddnextt108 nexttoward -7.500 -7.5 -> -7.500
-- zeros
ddnextt111 nexttoward 0 0 -> 0
ddnextt112 nexttoward -0 -0 -> -0
ddnextt113 nexttoward 0E+4 0 -> 0E+4
ddnextt114 nexttoward -0E+4 -0 -> -0E+4
ddnextt115 nexttoward 0.00000000000 0.000000000000 -> 0E-11
ddnextt116 nexttoward -0.00000000000 -0.00 -> -0E-11
ddnextt117 nexttoward 0E-141 0 -> 0E-141
ddnextt118 nexttoward -0E-141 -000 -> -0E-141
-- full coefficients, alternating bits
ddnextt121 nexttoward 268268268 268268268 -> 268268268
ddnextt122 nexttoward -268268268 -268268268 -> -268268268
ddnextt123 nexttoward 134134134 134134134 -> 134134134
ddnextt124 nexttoward -134134134 -134134134 -> -134134134
-- Nmax, Nmin, Ntiny
ddnextt131 nexttoward 9.999999999999999E+384 9.999999999999999E+384 -> 9.999999999999999E+384
ddnextt132 nexttoward 1E-383 1E-383 -> 1E-383
ddnextt133 nexttoward 1.000000000000000E-383 1.000000000000000E-383 -> 1.000000000000000E-383
ddnextt134 nexttoward 1E-398 1E-398 -> 1E-398
ddnextt135 nexttoward -1E-398 -1E-398 -> -1E-398
ddnextt136 nexttoward -1.000000000000000E-383 -1.000000000000000E-383 -> -1.000000000000000E-383
ddnextt137 nexttoward -1E-383 -1E-383 -> -1E-383
ddnextt138 nexttoward -9.999999999999999E+384 -9.999999999999999E+384 -> -9.999999999999999E+384
------- lhs<rhs
ddnextt201 nexttoward 0.9999999999999995 Infinity -> 0.9999999999999996
ddnextt202 nexttoward 0.9999999999999996 Infinity -> 0.9999999999999997
ddnextt203 nexttoward 0.9999999999999997 Infinity -> 0.9999999999999998
ddnextt204 nexttoward 0.9999999999999998 Infinity -> 0.9999999999999999
ddnextt205 nexttoward 0.9999999999999999 Infinity -> 1.000000000000000
ddnextt206 nexttoward 1.000000000000000 Infinity -> 1.000000000000001
ddnextt207 nexttoward 1.0 Infinity -> 1.000000000000001
ddnextt208 nexttoward 1 Infinity -> 1.000000000000001
ddnextt209 nexttoward 1.000000000000001 Infinity -> 1.000000000000002
ddnextt210 nexttoward 1.000000000000002 Infinity -> 1.000000000000003
ddnextt211 nexttoward 1.000000000000003 Infinity -> 1.000000000000004
ddnextt212 nexttoward 1.000000000000004 Infinity -> 1.000000000000005
ddnextt213 nexttoward 1.000000000000005 Infinity -> 1.000000000000006
ddnextt214 nexttoward 1.000000000000006 Infinity -> 1.000000000000007
ddnextt215 nexttoward 1.000000000000007 Infinity -> 1.000000000000008
ddnextt216 nexttoward 1.000000000000008 Infinity -> 1.000000000000009
ddnextt217 nexttoward 1.000000000000009 Infinity -> 1.000000000000010
ddnextt218 nexttoward 1.000000000000010 Infinity -> 1.000000000000011
ddnextt219 nexttoward 1.000000000000011 Infinity -> 1.000000000000012
ddnextt221 nexttoward -0.9999999999999995 Infinity -> -0.9999999999999994
ddnextt222 nexttoward -0.9999999999999996 Infinity -> -0.9999999999999995
ddnextt223 nexttoward -0.9999999999999997 Infinity -> -0.9999999999999996
ddnextt224 nexttoward -0.9999999999999998 Infinity -> -0.9999999999999997
ddnextt225 nexttoward -0.9999999999999999 Infinity -> -0.9999999999999998
ddnextt226 nexttoward -1.000000000000000 Infinity -> -0.9999999999999999
ddnextt227 nexttoward -1.0 Infinity -> -0.9999999999999999
ddnextt228 nexttoward -1 Infinity -> -0.9999999999999999
ddnextt229 nexttoward -1.000000000000001 Infinity -> -1.000000000000000
ddnextt230 nexttoward -1.000000000000002 Infinity -> -1.000000000000001
ddnextt231 nexttoward -1.000000000000003 Infinity -> -1.000000000000002
ddnextt232 nexttoward -1.000000000000004 Infinity -> -1.000000000000003
ddnextt233 nexttoward -1.000000000000005 Infinity -> -1.000000000000004
ddnextt234 nexttoward -1.000000000000006 Infinity -> -1.000000000000005
ddnextt235 nexttoward -1.000000000000007 Infinity -> -1.000000000000006
ddnextt236 nexttoward -1.000000000000008 Infinity -> -1.000000000000007
ddnextt237 nexttoward -1.000000000000009 Infinity -> -1.000000000000008
ddnextt238 nexttoward -1.000000000000010 Infinity -> -1.000000000000009
ddnextt239 nexttoward -1.000000000000011 Infinity -> -1.000000000000010
ddnextt240 nexttoward -1.000000000000012 Infinity -> -1.000000000000011
-- Zeros
ddnextt300 nexttoward 0 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt301 nexttoward 0.00 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt302 nexttoward 0E-300 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt303 nexttoward 0E+300 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt304 nexttoward 0E+30000 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt305 nexttoward -0 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt306 nexttoward -0.00 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt307 nexttoward -0E-300 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt308 nexttoward -0E+300 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt309 nexttoward -0E+30000 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
-- specials
ddnextt350 nexttoward Inf Infinity -> Infinity
ddnextt351 nexttoward -Inf Infinity -> -9.999999999999999E+384
ddnextt352 nexttoward NaN Infinity -> NaN
ddnextt353 nexttoward sNaN Infinity -> NaN Invalid_operation
ddnextt354 nexttoward NaN77 Infinity -> NaN77
ddnextt355 nexttoward sNaN88 Infinity -> NaN88 Invalid_operation
ddnextt356 nexttoward -NaN Infinity -> -NaN
ddnextt357 nexttoward -sNaN Infinity -> -NaN Invalid_operation
ddnextt358 nexttoward -NaN77 Infinity -> -NaN77
ddnextt359 nexttoward -sNaN88 Infinity -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
ddnextt370 nexttoward -9.999999999999999E+384 Infinity -> -9.999999999999998E+384
ddnextt371 nexttoward -9.999999999999998E+384 Infinity -> -9.999999999999997E+384
ddnextt372 nexttoward -1E-383 Infinity -> -9.99999999999999E-384 Underflow Subnormal Inexact Rounded
ddnextt373 nexttoward -1.000000000000000E-383 Infinity -> -9.99999999999999E-384 Underflow Subnormal Inexact Rounded
ddnextt374 nexttoward -9E-398 Infinity -> -8E-398 Underflow Subnormal Inexact Rounded
ddnextt375 nexttoward -9.9E-397 Infinity -> -9.8E-397 Underflow Subnormal Inexact Rounded
ddnextt376 nexttoward -9.99999999999E-387 Infinity -> -9.99999999998E-387 Underflow Subnormal Inexact Rounded
ddnextt377 nexttoward -9.99999999999999E-384 Infinity -> -9.99999999999998E-384 Underflow Subnormal Inexact Rounded
ddnextt378 nexttoward -9.99999999999998E-384 Infinity -> -9.99999999999997E-384 Underflow Subnormal Inexact Rounded
ddnextt379 nexttoward -9.99999999999997E-384 Infinity -> -9.99999999999996E-384 Underflow Subnormal Inexact Rounded
ddnextt380 nexttoward -0E-398 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt381 nexttoward -1E-398 Infinity -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddnextt382 nexttoward -2E-398 Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt383 nexttoward 0E-398 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt384 nexttoward 1E-398 Infinity -> 2E-398 Underflow Subnormal Inexact Rounded
ddnextt385 nexttoward 2E-398 Infinity -> 3E-398 Underflow Subnormal Inexact Rounded
ddnextt386 nexttoward 10E-398 Infinity -> 1.1E-397 Underflow Subnormal Inexact Rounded
ddnextt387 nexttoward 100E-398 Infinity -> 1.01E-396 Underflow Subnormal Inexact Rounded
ddnextt388 nexttoward 100000E-398 Infinity -> 1.00001E-393 Underflow Subnormal Inexact Rounded
ddnextt389 nexttoward 1.00000000000E-383 Infinity -> 1.000000000000001E-383
ddnextt390 nexttoward 1.000000000000000E-383 Infinity -> 1.000000000000001E-383
ddnextt391 nexttoward 1E-383 Infinity -> 1.000000000000001E-383
ddnextt392 nexttoward 9.999999999999997E+384 Infinity -> 9.999999999999998E+384
ddnextt393 nexttoward 9.999999999999998E+384 Infinity -> 9.999999999999999E+384
ddnextt394 nexttoward 9.999999999999999E+384 Infinity -> Infinity Overflow Inexact Rounded
------- lhs>rhs
ddnextt401 nexttoward 0.9999999999999995 -Infinity -> 0.9999999999999994
ddnextt402 nexttoward 0.9999999999999996 -Infinity -> 0.9999999999999995
ddnextt403 nexttoward 0.9999999999999997 -Infinity -> 0.9999999999999996
ddnextt404 nexttoward 0.9999999999999998 -Infinity -> 0.9999999999999997
ddnextt405 nexttoward 0.9999999999999999 -Infinity -> 0.9999999999999998
ddnextt406 nexttoward 1.000000000000000 -Infinity -> 0.9999999999999999
ddnextt407 nexttoward 1.0 -Infinity -> 0.9999999999999999
ddnextt408 nexttoward 1 -Infinity -> 0.9999999999999999
ddnextt409 nexttoward 1.000000000000001 -Infinity -> 1.000000000000000
ddnextt410 nexttoward 1.000000000000002 -Infinity -> 1.000000000000001
ddnextt411 nexttoward 1.000000000000003 -Infinity -> 1.000000000000002
ddnextt412 nexttoward 1.000000000000004 -Infinity -> 1.000000000000003
ddnextt413 nexttoward 1.000000000000005 -Infinity -> 1.000000000000004
ddnextt414 nexttoward 1.000000000000006 -Infinity -> 1.000000000000005
ddnextt415 nexttoward 1.000000000000007 -Infinity -> 1.000000000000006
ddnextt416 nexttoward 1.000000000000008 -Infinity -> 1.000000000000007
ddnextt417 nexttoward 1.000000000000009 -Infinity -> 1.000000000000008
ddnextt418 nexttoward 1.000000000000010 -Infinity -> 1.000000000000009
ddnextt419 nexttoward 1.000000000000011 -Infinity -> 1.000000000000010
ddnextt420 nexttoward 1.000000000000012 -Infinity -> 1.000000000000011
ddnextt421 nexttoward -0.9999999999999995 -Infinity -> -0.9999999999999996
ddnextt422 nexttoward -0.9999999999999996 -Infinity -> -0.9999999999999997
ddnextt423 nexttoward -0.9999999999999997 -Infinity -> -0.9999999999999998
ddnextt424 nexttoward -0.9999999999999998 -Infinity -> -0.9999999999999999
ddnextt425 nexttoward -0.9999999999999999 -Infinity -> -1.000000000000000
ddnextt426 nexttoward -1.000000000000000 -Infinity -> -1.000000000000001
ddnextt427 nexttoward -1.0 -Infinity -> -1.000000000000001
ddnextt428 nexttoward -1 -Infinity -> -1.000000000000001
ddnextt429 nexttoward -1.000000000000001 -Infinity -> -1.000000000000002
ddnextt430 nexttoward -1.000000000000002 -Infinity -> -1.000000000000003
ddnextt431 nexttoward -1.000000000000003 -Infinity -> -1.000000000000004
ddnextt432 nexttoward -1.000000000000004 -Infinity -> -1.000000000000005
ddnextt433 nexttoward -1.000000000000005 -Infinity -> -1.000000000000006
ddnextt434 nexttoward -1.000000000000006 -Infinity -> -1.000000000000007
ddnextt435 nexttoward -1.000000000000007 -Infinity -> -1.000000000000008
ddnextt436 nexttoward -1.000000000000008 -Infinity -> -1.000000000000009
ddnextt437 nexttoward -1.000000000000009 -Infinity -> -1.000000000000010
ddnextt438 nexttoward -1.000000000000010 -Infinity -> -1.000000000000011
ddnextt439 nexttoward -1.000000000000011 -Infinity -> -1.000000000000012
-- Zeros
ddnextt500 nexttoward -0 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt501 nexttoward 0 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt502 nexttoward 0.00 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt503 nexttoward -0.00 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt504 nexttoward 0E-300 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt505 nexttoward 0E+300 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt506 nexttoward 0E+30000 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt507 nexttoward -0E+30000 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
-- specials
ddnextt550 nexttoward Inf -Infinity -> 9.999999999999999E+384
ddnextt551 nexttoward -Inf -Infinity -> -Infinity
ddnextt552 nexttoward NaN -Infinity -> NaN
ddnextt553 nexttoward sNaN -Infinity -> NaN Invalid_operation
ddnextt554 nexttoward NaN77 -Infinity -> NaN77
ddnextt555 nexttoward sNaN88 -Infinity -> NaN88 Invalid_operation
ddnextt556 nexttoward -NaN -Infinity -> -NaN
ddnextt557 nexttoward -sNaN -Infinity -> -NaN Invalid_operation
ddnextt558 nexttoward -NaN77 -Infinity -> -NaN77
ddnextt559 nexttoward -sNaN88 -Infinity -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
ddnextt670 nexttoward 9.999999999999999E+384 -Infinity -> 9.999999999999998E+384
ddnextt671 nexttoward 9.999999999999998E+384 -Infinity -> 9.999999999999997E+384
ddnextt672 nexttoward 1E-383 -Infinity -> 9.99999999999999E-384 Underflow Subnormal Inexact Rounded
ddnextt673 nexttoward 1.000000000000000E-383 -Infinity -> 9.99999999999999E-384 Underflow Subnormal Inexact Rounded
ddnextt674 nexttoward 9E-398 -Infinity -> 8E-398 Underflow Subnormal Inexact Rounded
ddnextt675 nexttoward 9.9E-397 -Infinity -> 9.8E-397 Underflow Subnormal Inexact Rounded
ddnextt676 nexttoward 9.99999999999E-387 -Infinity -> 9.99999999998E-387 Underflow Subnormal Inexact Rounded
ddnextt677 nexttoward 9.99999999999999E-384 -Infinity -> 9.99999999999998E-384 Underflow Subnormal Inexact Rounded
ddnextt678 nexttoward 9.99999999999998E-384 -Infinity -> 9.99999999999997E-384 Underflow Subnormal Inexact Rounded
ddnextt679 nexttoward 9.99999999999997E-384 -Infinity -> 9.99999999999996E-384 Underflow Subnormal Inexact Rounded
ddnextt680 nexttoward 0E-398 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt681 nexttoward 1E-398 -Infinity -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddnextt682 nexttoward 2E-398 -Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt683 nexttoward -0E-398 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt684 nexttoward -1E-398 -Infinity -> -2E-398 Underflow Subnormal Inexact Rounded
ddnextt685 nexttoward -2E-398 -Infinity -> -3E-398 Underflow Subnormal Inexact Rounded
ddnextt686 nexttoward -10E-398 -Infinity -> -1.1E-397 Underflow Subnormal Inexact Rounded
ddnextt687 nexttoward -100E-398 -Infinity -> -1.01E-396 Underflow Subnormal Inexact Rounded
ddnextt688 nexttoward -100000E-398 -Infinity -> -1.00001E-393 Underflow Subnormal Inexact Rounded
ddnextt689 nexttoward -1.00000000000E-383 -Infinity -> -1.000000000000001E-383
ddnextt690 nexttoward -1.000000000000000E-383 -Infinity -> -1.000000000000001E-383
ddnextt691 nexttoward -1E-383 -Infinity -> -1.000000000000001E-383
ddnextt692 nexttoward -9.999999999999998E+384 -Infinity -> -9.999999999999999E+384
ddnextt693 nexttoward -9.999999999999999E+384 -Infinity -> -Infinity Overflow Inexact Rounded
------- Specials
ddnextt780 nexttoward -Inf -Inf -> -Infinity
ddnextt781 nexttoward -Inf -1000 -> -9.999999999999999E+384
ddnextt782 nexttoward -Inf -1 -> -9.999999999999999E+384
ddnextt783 nexttoward -Inf -0 -> -9.999999999999999E+384
ddnextt784 nexttoward -Inf 0 -> -9.999999999999999E+384
ddnextt785 nexttoward -Inf 1 -> -9.999999999999999E+384
ddnextt786 nexttoward -Inf 1000 -> -9.999999999999999E+384
ddnextt787 nexttoward -1000 -Inf -> -1000.000000000001
ddnextt788 nexttoward -Inf -Inf -> -Infinity
ddnextt789 nexttoward -1 -Inf -> -1.000000000000001
ddnextt790 nexttoward -0 -Inf -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt791 nexttoward 0 -Inf -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt792 nexttoward 1 -Inf -> 0.9999999999999999
ddnextt793 nexttoward 1000 -Inf -> 999.9999999999999
ddnextt794 nexttoward Inf -Inf -> 9.999999999999999E+384
ddnextt800 nexttoward Inf -Inf -> 9.999999999999999E+384
ddnextt801 nexttoward Inf -1000 -> 9.999999999999999E+384
ddnextt802 nexttoward Inf -1 -> 9.999999999999999E+384
ddnextt803 nexttoward Inf -0 -> 9.999999999999999E+384
ddnextt804 nexttoward Inf 0 -> 9.999999999999999E+384
ddnextt805 nexttoward Inf 1 -> 9.999999999999999E+384
ddnextt806 nexttoward Inf 1000 -> 9.999999999999999E+384
ddnextt807 nexttoward Inf Inf -> Infinity
ddnextt808 nexttoward -1000 Inf -> -999.9999999999999
ddnextt809 nexttoward -Inf Inf -> -9.999999999999999E+384
ddnextt810 nexttoward -1 Inf -> -0.9999999999999999
ddnextt811 nexttoward -0 Inf -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt812 nexttoward 0 Inf -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt813 nexttoward 1 Inf -> 1.000000000000001
ddnextt814 nexttoward 1000 Inf -> 1000.000000000001
ddnextt815 nexttoward Inf Inf -> Infinity
ddnextt821 nexttoward NaN -Inf -> NaN
ddnextt822 nexttoward NaN -1000 -> NaN
ddnextt823 nexttoward NaN -1 -> NaN
ddnextt824 nexttoward NaN -0 -> NaN
ddnextt825 nexttoward NaN 0 -> NaN
ddnextt826 nexttoward NaN 1 -> NaN
ddnextt827 nexttoward NaN 1000 -> NaN
ddnextt828 nexttoward NaN Inf -> NaN
ddnextt829 nexttoward NaN NaN -> NaN
ddnextt830 nexttoward -Inf NaN -> NaN
ddnextt831 nexttoward -1000 NaN -> NaN
ddnextt832 nexttoward -1 NaN -> NaN
ddnextt833 nexttoward -0 NaN -> NaN
ddnextt834 nexttoward 0 NaN -> NaN
ddnextt835 nexttoward 1 NaN -> NaN
ddnextt836 nexttoward 1000 NaN -> NaN
ddnextt837 nexttoward Inf NaN -> NaN
ddnextt841 nexttoward sNaN -Inf -> NaN Invalid_operation
ddnextt842 nexttoward sNaN -1000 -> NaN Invalid_operation
ddnextt843 nexttoward sNaN -1 -> NaN Invalid_operation
ddnextt844 nexttoward sNaN -0 -> NaN Invalid_operation
ddnextt845 nexttoward sNaN 0 -> NaN Invalid_operation
ddnextt846 nexttoward sNaN 1 -> NaN Invalid_operation
ddnextt847 nexttoward sNaN 1000 -> NaN Invalid_operation
ddnextt848 nexttoward sNaN NaN -> NaN Invalid_operation
ddnextt849 nexttoward sNaN sNaN -> NaN Invalid_operation
ddnextt850 nexttoward NaN sNaN -> NaN Invalid_operation
ddnextt851 nexttoward -Inf sNaN -> NaN Invalid_operation
ddnextt852 nexttoward -1000 sNaN -> NaN Invalid_operation
ddnextt853 nexttoward -1 sNaN -> NaN Invalid_operation
ddnextt854 nexttoward -0 sNaN -> NaN Invalid_operation
ddnextt855 nexttoward 0 sNaN -> NaN Invalid_operation
ddnextt856 nexttoward 1 sNaN -> NaN Invalid_operation
ddnextt857 nexttoward 1000 sNaN -> NaN Invalid_operation
ddnextt858 nexttoward Inf sNaN -> NaN Invalid_operation
ddnextt859 nexttoward NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddnextt861 nexttoward NaN1 -Inf -> NaN1
ddnextt862 nexttoward +NaN2 -1000 -> NaN2
ddnextt863 nexttoward NaN3 1000 -> NaN3
ddnextt864 nexttoward NaN4 Inf -> NaN4
ddnextt865 nexttoward NaN5 +NaN6 -> NaN5
ddnextt866 nexttoward -Inf NaN7 -> NaN7
ddnextt867 nexttoward -1000 NaN8 -> NaN8
ddnextt868 nexttoward 1000 NaN9 -> NaN9
ddnextt869 nexttoward Inf +NaN10 -> NaN10
ddnextt871 nexttoward sNaN11 -Inf -> NaN11 Invalid_operation
ddnextt872 nexttoward sNaN12 -1000 -> NaN12 Invalid_operation
ddnextt873 nexttoward sNaN13 1000 -> NaN13 Invalid_operation
ddnextt874 nexttoward sNaN14 NaN17 -> NaN14 Invalid_operation
ddnextt875 nexttoward sNaN15 sNaN18 -> NaN15 Invalid_operation
ddnextt876 nexttoward NaN16 sNaN19 -> NaN19 Invalid_operation
ddnextt877 nexttoward -Inf +sNaN20 -> NaN20 Invalid_operation
ddnextt878 nexttoward -1000 sNaN21 -> NaN21 Invalid_operation
ddnextt879 nexttoward 1000 sNaN22 -> NaN22 Invalid_operation
ddnextt880 nexttoward Inf sNaN23 -> NaN23 Invalid_operation
ddnextt881 nexttoward +NaN25 +sNaN24 -> NaN24 Invalid_operation
ddnextt882 nexttoward -NaN26 NaN28 -> -NaN26
ddnextt883 nexttoward -sNaN27 sNaN29 -> -NaN27 Invalid_operation
ddnextt884 nexttoward 1000 -NaN30 -> -NaN30
ddnextt885 nexttoward 1000 -sNaN31 -> -NaN31 Invalid_operation
-- Null tests
ddnextt900 nexttoward 1 # -> NaN Invalid_operation
ddnextt901 nexttoward # 1 -> NaN Invalid_operation

View File

@@ -0,0 +1,292 @@
------------------------------------------------------------------------
-- ddOr.decTest -- digitwise logical OR for decDoubles --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check (truth table)
ddor001 or 0 0 -> 0
ddor002 or 0 1 -> 1
ddor003 or 1 0 -> 1
ddor004 or 1 1 -> 1
ddor005 or 1100 1010 -> 1110
-- and at msd and msd-1
ddor006 or 0000000000000000 0000000000000000 -> 0
ddor007 or 0000000000000000 1000000000000000 -> 1000000000000000
ddor008 or 1000000000000000 0000000000000000 -> 1000000000000000
ddor009 or 1000000000000000 1000000000000000 -> 1000000000000000
ddor010 or 0000000000000000 0000000000000000 -> 0
ddor011 or 0000000000000000 0100000000000000 -> 100000000000000
ddor012 or 0100000000000000 0000000000000000 -> 100000000000000
ddor013 or 0100000000000000 0100000000000000 -> 100000000000000
-- Various lengths
-- 1234567890123456 1234567890123456 1234567890123456
ddor020 or 1111111111111111 1111111111111111 -> 1111111111111111
ddor021 or 111111111111111 111111111111111 -> 111111111111111
ddor022 or 11111111111111 11111111111111 -> 11111111111111
ddor023 or 1111111111111 1111111111111 -> 1111111111111
ddor024 or 111111111111 111111111111 -> 111111111111
ddor025 or 11111111111 11111111111 -> 11111111111
ddor026 or 1111111111 1111111111 -> 1111111111
ddor027 or 111111111 111111111 -> 111111111
ddor028 or 11111111 11111111 -> 11111111
ddor029 or 1111111 1111111 -> 1111111
ddor030 or 111111 111111 -> 111111
ddor031 or 11111 11111 -> 11111
ddor032 or 1111 1111 -> 1111
ddor033 or 111 111 -> 111
ddor034 or 11 11 -> 11
ddor035 or 1 1 -> 1
ddor036 or 0 0 -> 0
ddor042 or 111111110000000 1111111110000000 -> 1111111110000000
ddor043 or 11111110000000 1000000100000000 -> 1011111110000000
ddor044 or 1111110000000 1000001000000000 -> 1001111110000000
ddor045 or 111110000000 1000010000000000 -> 1000111110000000
ddor046 or 11110000000 1000100000000000 -> 1000111110000000
ddor047 or 1110000000 1001000000000000 -> 1001001110000000
ddor048 or 110000000 1010000000000000 -> 1010000110000000
ddor049 or 10000000 1100000000000000 -> 1100000010000000
ddor090 or 011111111 111101111 -> 111111111
ddor091 or 101111111 111101111 -> 111111111
ddor092 or 110111111 111101111 -> 111111111
ddor093 or 111011111 111101111 -> 111111111
ddor094 or 111101111 111101111 -> 111101111
ddor095 or 111110111 111101111 -> 111111111
ddor096 or 111111011 111101111 -> 111111111
ddor097 or 111111101 111101111 -> 111111111
ddor098 or 111111110 111101111 -> 111111111
ddor100 or 111101111 011111111 -> 111111111
ddor101 or 111101111 101111111 -> 111111111
ddor102 or 111101111 110111111 -> 111111111
ddor103 or 111101111 111011111 -> 111111111
ddor104 or 111101111 111101111 -> 111101111
ddor105 or 111101111 111110111 -> 111111111
ddor106 or 111101111 111111011 -> 111111111
ddor107 or 111101111 111111101 -> 111111111
ddor108 or 111101111 111111110 -> 111111111
-- non-0/1 should not be accepted, nor should signs
ddor220 or 111111112 111111111 -> NaN Invalid_operation
ddor221 or 333333333 333333333 -> NaN Invalid_operation
ddor222 or 555555555 555555555 -> NaN Invalid_operation
ddor223 or 777777777 777777777 -> NaN Invalid_operation
ddor224 or 999999999 999999999 -> NaN Invalid_operation
ddor225 or 222222222 999999999 -> NaN Invalid_operation
ddor226 or 444444444 999999999 -> NaN Invalid_operation
ddor227 or 666666666 999999999 -> NaN Invalid_operation
ddor228 or 888888888 999999999 -> NaN Invalid_operation
ddor229 or 999999999 222222222 -> NaN Invalid_operation
ddor230 or 999999999 444444444 -> NaN Invalid_operation
ddor231 or 999999999 666666666 -> NaN Invalid_operation
ddor232 or 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
ddor240 or 567468689 -934981942 -> NaN Invalid_operation
ddor241 or 567367689 934981942 -> NaN Invalid_operation
ddor242 or -631917772 -706014634 -> NaN Invalid_operation
ddor243 or -756253257 138579234 -> NaN Invalid_operation
ddor244 or 835590149 567435400 -> NaN Invalid_operation
-- test MSD
ddor250 or 2000000000000000 1000000000000000 -> NaN Invalid_operation
ddor251 or 7000000000000000 1000000000000000 -> NaN Invalid_operation
ddor252 or 8000000000000000 1000000000000000 -> NaN Invalid_operation
ddor253 or 9000000000000000 1000000000000000 -> NaN Invalid_operation
ddor254 or 2000000000000000 0000000000000000 -> NaN Invalid_operation
ddor255 or 7000000000000000 0000000000000000 -> NaN Invalid_operation
ddor256 or 8000000000000000 0000000000000000 -> NaN Invalid_operation
ddor257 or 9000000000000000 0000000000000000 -> NaN Invalid_operation
ddor258 or 1000000000000000 2000000000000000 -> NaN Invalid_operation
ddor259 or 1000000000000000 7000000000000000 -> NaN Invalid_operation
ddor260 or 1000000000000000 8000000000000000 -> NaN Invalid_operation
ddor261 or 1000000000000000 9000000000000000 -> NaN Invalid_operation
ddor262 or 0000000000000000 2000000000000000 -> NaN Invalid_operation
ddor263 or 0000000000000000 7000000000000000 -> NaN Invalid_operation
ddor264 or 0000000000000000 8000000000000000 -> NaN Invalid_operation
ddor265 or 0000000000000000 9000000000000000 -> NaN Invalid_operation
-- test MSD-1
ddor270 or 0200001000000000 1000100000000010 -> NaN Invalid_operation
ddor271 or 0700000100000000 1000010000000100 -> NaN Invalid_operation
ddor272 or 0800000010000000 1000001000001000 -> NaN Invalid_operation
ddor273 or 0900000001000000 1000000100010000 -> NaN Invalid_operation
ddor274 or 1000000000100000 0200000010100000 -> NaN Invalid_operation
ddor275 or 1000000000010000 0700000001000000 -> NaN Invalid_operation
ddor276 or 1000000000001000 0800000010100000 -> NaN Invalid_operation
ddor277 or 1000000000000100 0900000000010000 -> NaN Invalid_operation
-- test LSD
ddor280 or 0010000000000002 1000000100000001 -> NaN Invalid_operation
ddor281 or 0001000000000007 1000001000000011 -> NaN Invalid_operation
ddor282 or 0000100000000008 1000010000000001 -> NaN Invalid_operation
ddor283 or 0000010000000009 1000100000000001 -> NaN Invalid_operation
ddor284 or 1000001000000000 0001000000000002 -> NaN Invalid_operation
ddor285 or 1000000100000000 0010000000000007 -> NaN Invalid_operation
ddor286 or 1000000010000000 0100000000000008 -> NaN Invalid_operation
ddor287 or 1000000001000000 1000000000000009 -> NaN Invalid_operation
-- test Middie
ddor288 or 0010000020000000 1000001000000000 -> NaN Invalid_operation
ddor289 or 0001000070000001 1000000100000000 -> NaN Invalid_operation
ddor290 or 0000100080000010 1000000010000000 -> NaN Invalid_operation
ddor291 or 0000010090000100 1000000001000000 -> NaN Invalid_operation
ddor292 or 1000001000001000 0000000020100000 -> NaN Invalid_operation
ddor293 or 1000000100010000 0000000070010000 -> NaN Invalid_operation
ddor294 or 1000000010100000 0000000080001000 -> NaN Invalid_operation
ddor295 or 1000000001000000 0000000090000100 -> NaN Invalid_operation
-- signs
ddor296 or -1000000001000000 -0000010000000100 -> NaN Invalid_operation
ddor297 or -1000000001000000 0000000010000100 -> NaN Invalid_operation
ddor298 or 1000000001000000 -0000001000000100 -> NaN Invalid_operation
ddor299 or 1000000001000000 0000000011000100 -> 1000000011000100
-- Nmax, Nmin, Ntiny-like
ddor331 or 2 9.99999999E+199 -> NaN Invalid_operation
ddor332 or 3 1E-199 -> NaN Invalid_operation
ddor333 or 4 1.00000000E-199 -> NaN Invalid_operation
ddor334 or 5 1E-100 -> NaN Invalid_operation
ddor335 or 6 -1E-100 -> NaN Invalid_operation
ddor336 or 7 -1.00000000E-199 -> NaN Invalid_operation
ddor337 or 8 -1E-199 -> NaN Invalid_operation
ddor338 or 9 -9.99999999E+199 -> NaN Invalid_operation
ddor341 or 9.99999999E+299 -18 -> NaN Invalid_operation
ddor342 or 1E-299 01 -> NaN Invalid_operation
ddor343 or 1.00000000E-299 -18 -> NaN Invalid_operation
ddor344 or 1E-100 18 -> NaN Invalid_operation
ddor345 or -1E-100 -10 -> NaN Invalid_operation
ddor346 or -1.00000000E-299 18 -> NaN Invalid_operation
ddor347 or -1E-299 10 -> NaN Invalid_operation
ddor348 or -9.99999999E+299 -18 -> NaN Invalid_operation
-- A few other non-integers
ddor361 or 1.0 1 -> NaN Invalid_operation
ddor362 or 1E+1 1 -> NaN Invalid_operation
ddor363 or 0.0 1 -> NaN Invalid_operation
ddor364 or 0E+1 1 -> NaN Invalid_operation
ddor365 or 9.9 1 -> NaN Invalid_operation
ddor366 or 9E+1 1 -> NaN Invalid_operation
ddor371 or 0 1.0 -> NaN Invalid_operation
ddor372 or 0 1E+1 -> NaN Invalid_operation
ddor373 or 0 0.0 -> NaN Invalid_operation
ddor374 or 0 0E+1 -> NaN Invalid_operation
ddor375 or 0 9.9 -> NaN Invalid_operation
ddor376 or 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
ddor780 or -Inf -Inf -> NaN Invalid_operation
ddor781 or -Inf -1000 -> NaN Invalid_operation
ddor782 or -Inf -1 -> NaN Invalid_operation
ddor783 or -Inf -0 -> NaN Invalid_operation
ddor784 or -Inf 0 -> NaN Invalid_operation
ddor785 or -Inf 1 -> NaN Invalid_operation
ddor786 or -Inf 1000 -> NaN Invalid_operation
ddor787 or -1000 -Inf -> NaN Invalid_operation
ddor788 or -Inf -Inf -> NaN Invalid_operation
ddor789 or -1 -Inf -> NaN Invalid_operation
ddor790 or -0 -Inf -> NaN Invalid_operation
ddor791 or 0 -Inf -> NaN Invalid_operation
ddor792 or 1 -Inf -> NaN Invalid_operation
ddor793 or 1000 -Inf -> NaN Invalid_operation
ddor794 or Inf -Inf -> NaN Invalid_operation
ddor800 or Inf -Inf -> NaN Invalid_operation
ddor801 or Inf -1000 -> NaN Invalid_operation
ddor802 or Inf -1 -> NaN Invalid_operation
ddor803 or Inf -0 -> NaN Invalid_operation
ddor804 or Inf 0 -> NaN Invalid_operation
ddor805 or Inf 1 -> NaN Invalid_operation
ddor806 or Inf 1000 -> NaN Invalid_operation
ddor807 or Inf Inf -> NaN Invalid_operation
ddor808 or -1000 Inf -> NaN Invalid_operation
ddor809 or -Inf Inf -> NaN Invalid_operation
ddor810 or -1 Inf -> NaN Invalid_operation
ddor811 or -0 Inf -> NaN Invalid_operation
ddor812 or 0 Inf -> NaN Invalid_operation
ddor813 or 1 Inf -> NaN Invalid_operation
ddor814 or 1000 Inf -> NaN Invalid_operation
ddor815 or Inf Inf -> NaN Invalid_operation
ddor821 or NaN -Inf -> NaN Invalid_operation
ddor822 or NaN -1000 -> NaN Invalid_operation
ddor823 or NaN -1 -> NaN Invalid_operation
ddor824 or NaN -0 -> NaN Invalid_operation
ddor825 or NaN 0 -> NaN Invalid_operation
ddor826 or NaN 1 -> NaN Invalid_operation
ddor827 or NaN 1000 -> NaN Invalid_operation
ddor828 or NaN Inf -> NaN Invalid_operation
ddor829 or NaN NaN -> NaN Invalid_operation
ddor830 or -Inf NaN -> NaN Invalid_operation
ddor831 or -1000 NaN -> NaN Invalid_operation
ddor832 or -1 NaN -> NaN Invalid_operation
ddor833 or -0 NaN -> NaN Invalid_operation
ddor834 or 0 NaN -> NaN Invalid_operation
ddor835 or 1 NaN -> NaN Invalid_operation
ddor836 or 1000 NaN -> NaN Invalid_operation
ddor837 or Inf NaN -> NaN Invalid_operation
ddor841 or sNaN -Inf -> NaN Invalid_operation
ddor842 or sNaN -1000 -> NaN Invalid_operation
ddor843 or sNaN -1 -> NaN Invalid_operation
ddor844 or sNaN -0 -> NaN Invalid_operation
ddor845 or sNaN 0 -> NaN Invalid_operation
ddor846 or sNaN 1 -> NaN Invalid_operation
ddor847 or sNaN 1000 -> NaN Invalid_operation
ddor848 or sNaN NaN -> NaN Invalid_operation
ddor849 or sNaN sNaN -> NaN Invalid_operation
ddor850 or NaN sNaN -> NaN Invalid_operation
ddor851 or -Inf sNaN -> NaN Invalid_operation
ddor852 or -1000 sNaN -> NaN Invalid_operation
ddor853 or -1 sNaN -> NaN Invalid_operation
ddor854 or -0 sNaN -> NaN Invalid_operation
ddor855 or 0 sNaN -> NaN Invalid_operation
ddor856 or 1 sNaN -> NaN Invalid_operation
ddor857 or 1000 sNaN -> NaN Invalid_operation
ddor858 or Inf sNaN -> NaN Invalid_operation
ddor859 or NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddor861 or NaN1 -Inf -> NaN Invalid_operation
ddor862 or +NaN2 -1000 -> NaN Invalid_operation
ddor863 or NaN3 1000 -> NaN Invalid_operation
ddor864 or NaN4 Inf -> NaN Invalid_operation
ddor865 or NaN5 +NaN6 -> NaN Invalid_operation
ddor866 or -Inf NaN7 -> NaN Invalid_operation
ddor867 or -1000 NaN8 -> NaN Invalid_operation
ddor868 or 1000 NaN9 -> NaN Invalid_operation
ddor869 or Inf +NaN10 -> NaN Invalid_operation
ddor871 or sNaN11 -Inf -> NaN Invalid_operation
ddor872 or sNaN12 -1000 -> NaN Invalid_operation
ddor873 or sNaN13 1000 -> NaN Invalid_operation
ddor874 or sNaN14 NaN17 -> NaN Invalid_operation
ddor875 or sNaN15 sNaN18 -> NaN Invalid_operation
ddor876 or NaN16 sNaN19 -> NaN Invalid_operation
ddor877 or -Inf +sNaN20 -> NaN Invalid_operation
ddor878 or -1000 sNaN21 -> NaN Invalid_operation
ddor879 or 1000 sNaN22 -> NaN Invalid_operation
ddor880 or Inf sNaN23 -> NaN Invalid_operation
ddor881 or +NaN25 +sNaN24 -> NaN Invalid_operation
ddor882 or -NaN26 NaN28 -> NaN Invalid_operation
ddor883 or -sNaN27 sNaN29 -> NaN Invalid_operation
ddor884 or 1000 -NaN30 -> NaN Invalid_operation
ddor885 or 1000 -sNaN31 -> NaN Invalid_operation

View File

@@ -0,0 +1,88 @@
------------------------------------------------------------------------
-- ddPlus.decTest -- decDouble 0+x --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decDoubles.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check
ddpls001 plus +7.50 -> 7.50
-- Infinities
ddpls011 plus Infinity -> Infinity
ddpls012 plus -Infinity -> -Infinity
-- NaNs, 0 payload
ddpls021 plus NaN -> NaN
ddpls022 plus -NaN -> -NaN
ddpls023 plus sNaN -> NaN Invalid_operation
ddpls024 plus -sNaN -> -NaN Invalid_operation
-- NaNs, non-0 payload
ddpls031 plus NaN13 -> NaN13
ddpls032 plus -NaN13 -> -NaN13
ddpls033 plus sNaN13 -> NaN13 Invalid_operation
ddpls034 plus -sNaN13 -> -NaN13 Invalid_operation
ddpls035 plus NaN70 -> NaN70
ddpls036 plus -NaN70 -> -NaN70
ddpls037 plus sNaN101 -> NaN101 Invalid_operation
ddpls038 plus -sNaN101 -> -NaN101 Invalid_operation
-- finites
ddpls101 plus 7 -> 7
ddpls102 plus -7 -> -7
ddpls103 plus 75 -> 75
ddpls104 plus -75 -> -75
ddpls105 plus 7.50 -> 7.50
ddpls106 plus -7.50 -> -7.50
ddpls107 plus 7.500 -> 7.500
ddpls108 plus -7.500 -> -7.500
-- zeros
ddpls111 plus 0 -> 0
ddpls112 plus -0 -> 0
ddpls113 plus 0E+4 -> 0E+4
ddpls114 plus -0E+4 -> 0E+4
ddpls115 plus 0.0000 -> 0.0000
ddpls116 plus -0.0000 -> 0.0000
ddpls117 plus 0E-141 -> 0E-141
ddpls118 plus -0E-141 -> 0E-141
-- full coefficients, alternating bits
ddpls121 plus 2682682682682682 -> 2682682682682682
ddpls122 plus -2682682682682682 -> -2682682682682682
ddpls123 plus 1341341341341341 -> 1341341341341341
ddpls124 plus -1341341341341341 -> -1341341341341341
-- Nmax, Nmin, Ntiny
ddpls131 plus 9.999999999999999E+384 -> 9.999999999999999E+384
ddpls132 plus 1E-383 -> 1E-383
ddpls133 plus 1.000000000000000E-383 -> 1.000000000000000E-383
ddpls134 plus 1E-398 -> 1E-398 Subnormal
ddpls135 plus -1E-398 -> -1E-398 Subnormal
ddpls136 plus -1.000000000000000E-383 -> -1.000000000000000E-383
ddpls137 plus -1E-383 -> -1E-383
ddpls138 plus -9.999999999999999E+384 -> -9.999999999999999E+384

View File

@@ -0,0 +1,833 @@
------------------------------------------------------------------------
-- ddQuantize.decTest -- decDouble quantize operation --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Most of the tests here assume a "regular pattern", where the
-- sign and coefficient are +1.
-- 2004.03.15 Underflow for quantize is suppressed
-- 2005.06.08 More extensive tests for 'does not fit'
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- sanity checks
ddqua001 quantize 0 1e0 -> 0
ddqua002 quantize 1 1e0 -> 1
ddqua003 quantize 0.1 1e+2 -> 0E+2 Inexact Rounded
ddqua005 quantize 0.1 1e+1 -> 0E+1 Inexact Rounded
ddqua006 quantize 0.1 1e0 -> 0 Inexact Rounded
ddqua007 quantize 0.1 1e-1 -> 0.1
ddqua008 quantize 0.1 1e-2 -> 0.10
ddqua009 quantize 0.1 1e-3 -> 0.100
ddqua010 quantize 0.9 1e+2 -> 0E+2 Inexact Rounded
ddqua011 quantize 0.9 1e+1 -> 0E+1 Inexact Rounded
ddqua012 quantize 0.9 1e+0 -> 1 Inexact Rounded
ddqua013 quantize 0.9 1e-1 -> 0.9
ddqua014 quantize 0.9 1e-2 -> 0.90
ddqua015 quantize 0.9 1e-3 -> 0.900
-- negatives
ddqua021 quantize -0 1e0 -> -0
ddqua022 quantize -1 1e0 -> -1
ddqua023 quantize -0.1 1e+2 -> -0E+2 Inexact Rounded
ddqua025 quantize -0.1 1e+1 -> -0E+1 Inexact Rounded
ddqua026 quantize -0.1 1e0 -> -0 Inexact Rounded
ddqua027 quantize -0.1 1e-1 -> -0.1
ddqua028 quantize -0.1 1e-2 -> -0.10
ddqua029 quantize -0.1 1e-3 -> -0.100
ddqua030 quantize -0.9 1e+2 -> -0E+2 Inexact Rounded
ddqua031 quantize -0.9 1e+1 -> -0E+1 Inexact Rounded
ddqua032 quantize -0.9 1e+0 -> -1 Inexact Rounded
ddqua033 quantize -0.9 1e-1 -> -0.9
ddqua034 quantize -0.9 1e-2 -> -0.90
ddqua035 quantize -0.9 1e-3 -> -0.900
ddqua036 quantize -0.5 1e+2 -> -0E+2 Inexact Rounded
ddqua037 quantize -0.5 1e+1 -> -0E+1 Inexact Rounded
ddqua038 quantize -0.5 1e+0 -> -0 Inexact Rounded
ddqua039 quantize -0.5 1e-1 -> -0.5
ddqua040 quantize -0.5 1e-2 -> -0.50
ddqua041 quantize -0.5 1e-3 -> -0.500
ddqua042 quantize -0.9 1e+2 -> -0E+2 Inexact Rounded
ddqua043 quantize -0.9 1e+1 -> -0E+1 Inexact Rounded
ddqua044 quantize -0.9 1e+0 -> -1 Inexact Rounded
ddqua045 quantize -0.9 1e-1 -> -0.9
ddqua046 quantize -0.9 1e-2 -> -0.90
ddqua047 quantize -0.9 1e-3 -> -0.900
-- examples from Specification
ddqua060 quantize 2.17 0.001 -> 2.170
ddqua061 quantize 2.17 0.01 -> 2.17
ddqua062 quantize 2.17 0.1 -> 2.2 Inexact Rounded
ddqua063 quantize 2.17 1e+0 -> 2 Inexact Rounded
ddqua064 quantize 2.17 1e+1 -> 0E+1 Inexact Rounded
ddqua065 quantize -Inf Inf -> -Infinity
ddqua066 quantize 2 Inf -> NaN Invalid_operation
ddqua067 quantize -0.1 1 -> -0 Inexact Rounded
ddqua068 quantize -0 1e+5 -> -0E+5
ddqua069 quantize +123456789012345.6 1e-2 -> NaN Invalid_operation
ddqua070 quantize -987654335236450.6 1e-2 -> NaN Invalid_operation
ddqua071 quantize 217 1e-1 -> 217.0
ddqua072 quantize 217 1e+0 -> 217
ddqua073 quantize 217 1e+1 -> 2.2E+2 Inexact Rounded
ddqua074 quantize 217 1e+2 -> 2E+2 Inexact Rounded
-- general tests ..
ddqua089 quantize 12 1e+4 -> 0E+4 Inexact Rounded
ddqua090 quantize 12 1e+3 -> 0E+3 Inexact Rounded
ddqua091 quantize 12 1e+2 -> 0E+2 Inexact Rounded
ddqua092 quantize 12 1e+1 -> 1E+1 Inexact Rounded
ddqua093 quantize 1.2345 1e-2 -> 1.23 Inexact Rounded
ddqua094 quantize 1.2355 1e-2 -> 1.24 Inexact Rounded
ddqua095 quantize 1.2345 1e-6 -> 1.234500
ddqua096 quantize 9.9999 1e-2 -> 10.00 Inexact Rounded
ddqua097 quantize 0.0001 1e-2 -> 0.00 Inexact Rounded
ddqua098 quantize 0.001 1e-2 -> 0.00 Inexact Rounded
ddqua099 quantize 0.009 1e-2 -> 0.01 Inexact Rounded
ddqua100 quantize 92 1e+2 -> 1E+2 Inexact Rounded
ddqua101 quantize -1 1e0 -> -1
ddqua102 quantize -1 1e-1 -> -1.0
ddqua103 quantize -1 1e-2 -> -1.00
ddqua104 quantize 0 1e0 -> 0
ddqua105 quantize 0 1e-1 -> 0.0
ddqua106 quantize 0 1e-2 -> 0.00
ddqua107 quantize 0.00 1e0 -> 0
ddqua108 quantize 0 1e+1 -> 0E+1
ddqua109 quantize 0 1e+2 -> 0E+2
ddqua110 quantize +1 1e0 -> 1
ddqua111 quantize +1 1e-1 -> 1.0
ddqua112 quantize +1 1e-2 -> 1.00
ddqua120 quantize 1.04 1e-3 -> 1.040
ddqua121 quantize 1.04 1e-2 -> 1.04
ddqua122 quantize 1.04 1e-1 -> 1.0 Inexact Rounded
ddqua123 quantize 1.04 1e0 -> 1 Inexact Rounded
ddqua124 quantize 1.05 1e-3 -> 1.050
ddqua125 quantize 1.05 1e-2 -> 1.05
ddqua126 quantize 1.05 1e-1 -> 1.0 Inexact Rounded
ddqua131 quantize 1.05 1e0 -> 1 Inexact Rounded
ddqua132 quantize 1.06 1e-3 -> 1.060
ddqua133 quantize 1.06 1e-2 -> 1.06
ddqua134 quantize 1.06 1e-1 -> 1.1 Inexact Rounded
ddqua135 quantize 1.06 1e0 -> 1 Inexact Rounded
ddqua140 quantize -10 1e-2 -> -10.00
ddqua141 quantize +1 1e-2 -> 1.00
ddqua142 quantize +10 1e-2 -> 10.00
ddqua143 quantize 1E+17 1e-2 -> NaN Invalid_operation
ddqua144 quantize 1E-17 1e-2 -> 0.00 Inexact Rounded
ddqua145 quantize 1E-3 1e-2 -> 0.00 Inexact Rounded
ddqua146 quantize 1E-2 1e-2 -> 0.01
ddqua147 quantize 1E-1 1e-2 -> 0.10
ddqua148 quantize 0E-17 1e-2 -> 0.00
ddqua150 quantize 1.0600 1e-5 -> 1.06000
ddqua151 quantize 1.0600 1e-4 -> 1.0600
ddqua152 quantize 1.0600 1e-3 -> 1.060 Rounded
ddqua153 quantize 1.0600 1e-2 -> 1.06 Rounded
ddqua154 quantize 1.0600 1e-1 -> 1.1 Inexact Rounded
ddqua155 quantize 1.0600 1e0 -> 1 Inexact Rounded
-- a couple where rounding was different in base tests
rounding: half_up
ddqua157 quantize -0.5 1e+0 -> -1 Inexact Rounded
ddqua158 quantize 1.05 1e-1 -> 1.1 Inexact Rounded
ddqua159 quantize 1.06 1e0 -> 1 Inexact Rounded
rounding: half_even
-- base tests with non-1 coefficients
ddqua161 quantize 0 -9e0 -> 0
ddqua162 quantize 1 -7e0 -> 1
ddqua163 quantize 0.1 -1e+2 -> 0E+2 Inexact Rounded
ddqua165 quantize 0.1 0e+1 -> 0E+1 Inexact Rounded
ddqua166 quantize 0.1 2e0 -> 0 Inexact Rounded
ddqua167 quantize 0.1 3e-1 -> 0.1
ddqua168 quantize 0.1 44e-2 -> 0.10
ddqua169 quantize 0.1 555e-3 -> 0.100
ddqua170 quantize 0.9 6666e+2 -> 0E+2 Inexact Rounded
ddqua171 quantize 0.9 -777e+1 -> 0E+1 Inexact Rounded
ddqua172 quantize 0.9 -88e+0 -> 1 Inexact Rounded
ddqua173 quantize 0.9 -9e-1 -> 0.9
ddqua174 quantize 0.9 0e-2 -> 0.90
ddqua175 quantize 0.9 1.1e-3 -> 0.9000
-- negatives
ddqua181 quantize -0 1.1e0 -> -0.0
ddqua182 quantize -1 -1e0 -> -1
ddqua183 quantize -0.1 11e+2 -> -0E+2 Inexact Rounded
ddqua185 quantize -0.1 111e+1 -> -0E+1 Inexact Rounded
ddqua186 quantize -0.1 71e0 -> -0 Inexact Rounded
ddqua187 quantize -0.1 -91e-1 -> -0.1
ddqua188 quantize -0.1 -.1e-2 -> -0.100
ddqua189 quantize -0.1 -1e-3 -> -0.100
ddqua190 quantize -0.9 0e+2 -> -0E+2 Inexact Rounded
ddqua191 quantize -0.9 -0e+1 -> -0E+1 Inexact Rounded
ddqua192 quantize -0.9 -10e+0 -> -1 Inexact Rounded
ddqua193 quantize -0.9 100e-1 -> -0.9
ddqua194 quantize -0.9 999e-2 -> -0.90
-- +ve exponents ..
ddqua201 quantize -1 1e+0 -> -1
ddqua202 quantize -1 1e+1 -> -0E+1 Inexact Rounded
ddqua203 quantize -1 1e+2 -> -0E+2 Inexact Rounded
ddqua204 quantize 0 1e+0 -> 0
ddqua205 quantize 0 1e+1 -> 0E+1
ddqua206 quantize 0 1e+2 -> 0E+2
ddqua207 quantize +1 1e+0 -> 1
ddqua208 quantize +1 1e+1 -> 0E+1 Inexact Rounded
ddqua209 quantize +1 1e+2 -> 0E+2 Inexact Rounded
ddqua220 quantize 1.04 1e+3 -> 0E+3 Inexact Rounded
ddqua221 quantize 1.04 1e+2 -> 0E+2 Inexact Rounded
ddqua222 quantize 1.04 1e+1 -> 0E+1 Inexact Rounded
ddqua223 quantize 1.04 1e+0 -> 1 Inexact Rounded
ddqua224 quantize 1.05 1e+3 -> 0E+3 Inexact Rounded
ddqua225 quantize 1.05 1e+2 -> 0E+2 Inexact Rounded
ddqua226 quantize 1.05 1e+1 -> 0E+1 Inexact Rounded
ddqua227 quantize 1.05 1e+0 -> 1 Inexact Rounded
ddqua228 quantize 1.05 1e+3 -> 0E+3 Inexact Rounded
ddqua229 quantize 1.05 1e+2 -> 0E+2 Inexact Rounded
ddqua230 quantize 1.05 1e+1 -> 0E+1 Inexact Rounded
ddqua231 quantize 1.05 1e+0 -> 1 Inexact Rounded
ddqua232 quantize 1.06 1e+3 -> 0E+3 Inexact Rounded
ddqua233 quantize 1.06 1e+2 -> 0E+2 Inexact Rounded
ddqua234 quantize 1.06 1e+1 -> 0E+1 Inexact Rounded
ddqua235 quantize 1.06 1e+0 -> 1 Inexact Rounded
ddqua240 quantize -10 1e+1 -> -1E+1 Rounded
ddqua241 quantize +1 1e+1 -> 0E+1 Inexact Rounded
ddqua242 quantize +10 1e+1 -> 1E+1 Rounded
ddqua243 quantize 1E+1 1e+1 -> 1E+1 -- underneath this is E+1
ddqua244 quantize 1E+2 1e+1 -> 1.0E+2 -- underneath this is E+1
ddqua245 quantize 1E+3 1e+1 -> 1.00E+3 -- underneath this is E+1
ddqua246 quantize 1E+4 1e+1 -> 1.000E+4 -- underneath this is E+1
ddqua247 quantize 1E+5 1e+1 -> 1.0000E+5 -- underneath this is E+1
ddqua248 quantize 1E+6 1e+1 -> 1.00000E+6 -- underneath this is E+1
ddqua249 quantize 1E+7 1e+1 -> 1.000000E+7 -- underneath this is E+1
ddqua250 quantize 1E+8 1e+1 -> 1.0000000E+8 -- underneath this is E+1
ddqua251 quantize 1E+9 1e+1 -> 1.00000000E+9 -- underneath this is E+1
-- next one tries to add 9 zeros
ddqua252 quantize 1E+17 1e+1 -> NaN Invalid_operation
ddqua253 quantize 1E-17 1e+1 -> 0E+1 Inexact Rounded
ddqua254 quantize 1E-2 1e+1 -> 0E+1 Inexact Rounded
ddqua255 quantize 0E-17 1e+1 -> 0E+1
ddqua256 quantize -0E-17 1e+1 -> -0E+1
ddqua257 quantize -0E-1 1e+1 -> -0E+1
ddqua258 quantize -0 1e+1 -> -0E+1
ddqua259 quantize -0E+1 1e+1 -> -0E+1
ddqua260 quantize -10 1e+2 -> -0E+2 Inexact Rounded
ddqua261 quantize +1 1e+2 -> 0E+2 Inexact Rounded
ddqua262 quantize +10 1e+2 -> 0E+2 Inexact Rounded
ddqua263 quantize 1E+1 1e+2 -> 0E+2 Inexact Rounded
ddqua264 quantize 1E+2 1e+2 -> 1E+2
ddqua265 quantize 1E+3 1e+2 -> 1.0E+3
ddqua266 quantize 1E+4 1e+2 -> 1.00E+4
ddqua267 quantize 1E+5 1e+2 -> 1.000E+5
ddqua268 quantize 1E+6 1e+2 -> 1.0000E+6
ddqua269 quantize 1E+7 1e+2 -> 1.00000E+7
ddqua270 quantize 1E+8 1e+2 -> 1.000000E+8
ddqua271 quantize 1E+9 1e+2 -> 1.0000000E+9
ddqua272 quantize 1E+10 1e+2 -> 1.00000000E+10
ddqua273 quantize 1E-10 1e+2 -> 0E+2 Inexact Rounded
ddqua274 quantize 1E-2 1e+2 -> 0E+2 Inexact Rounded
ddqua275 quantize 0E-10 1e+2 -> 0E+2
ddqua280 quantize -10 1e+3 -> -0E+3 Inexact Rounded
ddqua281 quantize +1 1e+3 -> 0E+3 Inexact Rounded
ddqua282 quantize +10 1e+3 -> 0E+3 Inexact Rounded
ddqua283 quantize 1E+1 1e+3 -> 0E+3 Inexact Rounded
ddqua284 quantize 1E+2 1e+3 -> 0E+3 Inexact Rounded
ddqua285 quantize 1E+3 1e+3 -> 1E+3
ddqua286 quantize 1E+4 1e+3 -> 1.0E+4
ddqua287 quantize 1E+5 1e+3 -> 1.00E+5
ddqua288 quantize 1E+6 1e+3 -> 1.000E+6
ddqua289 quantize 1E+7 1e+3 -> 1.0000E+7
ddqua290 quantize 1E+8 1e+3 -> 1.00000E+8
ddqua291 quantize 1E+9 1e+3 -> 1.000000E+9
ddqua292 quantize 1E+10 1e+3 -> 1.0000000E+10
ddqua293 quantize 1E-10 1e+3 -> 0E+3 Inexact Rounded
ddqua294 quantize 1E-2 1e+3 -> 0E+3 Inexact Rounded
ddqua295 quantize 0E-10 1e+3 -> 0E+3
-- round up from below [sign wrong in JIT compiler once]
ddqua300 quantize 0.0078 1e-5 -> 0.00780
ddqua301 quantize 0.0078 1e-4 -> 0.0078
ddqua302 quantize 0.0078 1e-3 -> 0.008 Inexact Rounded
ddqua303 quantize 0.0078 1e-2 -> 0.01 Inexact Rounded
ddqua304 quantize 0.0078 1e-1 -> 0.0 Inexact Rounded
ddqua305 quantize 0.0078 1e0 -> 0 Inexact Rounded
ddqua306 quantize 0.0078 1e+1 -> 0E+1 Inexact Rounded
ddqua307 quantize 0.0078 1e+2 -> 0E+2 Inexact Rounded
ddqua310 quantize -0.0078 1e-5 -> -0.00780
ddqua311 quantize -0.0078 1e-4 -> -0.0078
ddqua312 quantize -0.0078 1e-3 -> -0.008 Inexact Rounded
ddqua313 quantize -0.0078 1e-2 -> -0.01 Inexact Rounded
ddqua314 quantize -0.0078 1e-1 -> -0.0 Inexact Rounded
ddqua315 quantize -0.0078 1e0 -> -0 Inexact Rounded
ddqua316 quantize -0.0078 1e+1 -> -0E+1 Inexact Rounded
ddqua317 quantize -0.0078 1e+2 -> -0E+2 Inexact Rounded
ddqua320 quantize 0.078 1e-5 -> 0.07800
ddqua321 quantize 0.078 1e-4 -> 0.0780
ddqua322 quantize 0.078 1e-3 -> 0.078
ddqua323 quantize 0.078 1e-2 -> 0.08 Inexact Rounded
ddqua324 quantize 0.078 1e-1 -> 0.1 Inexact Rounded
ddqua325 quantize 0.078 1e0 -> 0 Inexact Rounded
ddqua326 quantize 0.078 1e+1 -> 0E+1 Inexact Rounded
ddqua327 quantize 0.078 1e+2 -> 0E+2 Inexact Rounded
ddqua330 quantize -0.078 1e-5 -> -0.07800
ddqua331 quantize -0.078 1e-4 -> -0.0780
ddqua332 quantize -0.078 1e-3 -> -0.078
ddqua333 quantize -0.078 1e-2 -> -0.08 Inexact Rounded
ddqua334 quantize -0.078 1e-1 -> -0.1 Inexact Rounded
ddqua335 quantize -0.078 1e0 -> -0 Inexact Rounded
ddqua336 quantize -0.078 1e+1 -> -0E+1 Inexact Rounded
ddqua337 quantize -0.078 1e+2 -> -0E+2 Inexact Rounded
ddqua340 quantize 0.78 1e-5 -> 0.78000
ddqua341 quantize 0.78 1e-4 -> 0.7800
ddqua342 quantize 0.78 1e-3 -> 0.780
ddqua343 quantize 0.78 1e-2 -> 0.78
ddqua344 quantize 0.78 1e-1 -> 0.8 Inexact Rounded
ddqua345 quantize 0.78 1e0 -> 1 Inexact Rounded
ddqua346 quantize 0.78 1e+1 -> 0E+1 Inexact Rounded
ddqua347 quantize 0.78 1e+2 -> 0E+2 Inexact Rounded
ddqua350 quantize -0.78 1e-5 -> -0.78000
ddqua351 quantize -0.78 1e-4 -> -0.7800
ddqua352 quantize -0.78 1e-3 -> -0.780
ddqua353 quantize -0.78 1e-2 -> -0.78
ddqua354 quantize -0.78 1e-1 -> -0.8 Inexact Rounded
ddqua355 quantize -0.78 1e0 -> -1 Inexact Rounded
ddqua356 quantize -0.78 1e+1 -> -0E+1 Inexact Rounded
ddqua357 quantize -0.78 1e+2 -> -0E+2 Inexact Rounded
ddqua360 quantize 7.8 1e-5 -> 7.80000
ddqua361 quantize 7.8 1e-4 -> 7.8000
ddqua362 quantize 7.8 1e-3 -> 7.800
ddqua363 quantize 7.8 1e-2 -> 7.80
ddqua364 quantize 7.8 1e-1 -> 7.8
ddqua365 quantize 7.8 1e0 -> 8 Inexact Rounded
ddqua366 quantize 7.8 1e+1 -> 1E+1 Inexact Rounded
ddqua367 quantize 7.8 1e+2 -> 0E+2 Inexact Rounded
ddqua368 quantize 7.8 1e+3 -> 0E+3 Inexact Rounded
ddqua370 quantize -7.8 1e-5 -> -7.80000
ddqua371 quantize -7.8 1e-4 -> -7.8000
ddqua372 quantize -7.8 1e-3 -> -7.800
ddqua373 quantize -7.8 1e-2 -> -7.80
ddqua374 quantize -7.8 1e-1 -> -7.8
ddqua375 quantize -7.8 1e0 -> -8 Inexact Rounded
ddqua376 quantize -7.8 1e+1 -> -1E+1 Inexact Rounded
ddqua377 quantize -7.8 1e+2 -> -0E+2 Inexact Rounded
ddqua378 quantize -7.8 1e+3 -> -0E+3 Inexact Rounded
-- some individuals
ddqua380 quantize 1234567352364.506 1e-2 -> 1234567352364.51 Inexact Rounded
ddqua381 quantize 12345673523645.06 1e-2 -> 12345673523645.06
ddqua382 quantize 123456735236450.6 1e-2 -> NaN Invalid_operation
ddqua383 quantize 1234567352364506 1e-2 -> NaN Invalid_operation
ddqua384 quantize -1234567352364.506 1e-2 -> -1234567352364.51 Inexact Rounded
ddqua385 quantize -12345673523645.06 1e-2 -> -12345673523645.06
ddqua386 quantize -123456735236450.6 1e-2 -> NaN Invalid_operation
ddqua387 quantize -1234567352364506 1e-2 -> NaN Invalid_operation
rounding: down
ddqua389 quantize 123456735236450.6 1e-2 -> NaN Invalid_operation
-- ? should that one instead have been:
-- ddqua389 quantize 123456735236450.6 1e-2 -> NaN Invalid_operation
rounding: half_up
-- and a few more from e-mail discussions
ddqua391 quantize 12345678912.34567 1e-3 -> 12345678912.346 Inexact Rounded
ddqua392 quantize 123456789123.4567 1e-3 -> 123456789123.457 Inexact Rounded
ddqua393 quantize 1234567891234.567 1e-3 -> 1234567891234.567
ddqua394 quantize 12345678912345.67 1e-3 -> NaN Invalid_operation
ddqua395 quantize 123456789123456.7 1e-3 -> NaN Invalid_operation
ddqua396 quantize 1234567891234567. 1e-3 -> NaN Invalid_operation
-- some 9999 round-up cases
ddqua400 quantize 9.999 1e-5 -> 9.99900
ddqua401 quantize 9.999 1e-4 -> 9.9990
ddqua402 quantize 9.999 1e-3 -> 9.999
ddqua403 quantize 9.999 1e-2 -> 10.00 Inexact Rounded
ddqua404 quantize 9.999 1e-1 -> 10.0 Inexact Rounded
ddqua405 quantize 9.999 1e0 -> 10 Inexact Rounded
ddqua406 quantize 9.999 1e1 -> 1E+1 Inexact Rounded
ddqua407 quantize 9.999 1e2 -> 0E+2 Inexact Rounded
ddqua410 quantize 0.999 1e-5 -> 0.99900
ddqua411 quantize 0.999 1e-4 -> 0.9990
ddqua412 quantize 0.999 1e-3 -> 0.999
ddqua413 quantize 0.999 1e-2 -> 1.00 Inexact Rounded
ddqua414 quantize 0.999 1e-1 -> 1.0 Inexact Rounded
ddqua415 quantize 0.999 1e0 -> 1 Inexact Rounded
ddqua416 quantize 0.999 1e1 -> 0E+1 Inexact Rounded
ddqua420 quantize 0.0999 1e-5 -> 0.09990
ddqua421 quantize 0.0999 1e-4 -> 0.0999
ddqua422 quantize 0.0999 1e-3 -> 0.100 Inexact Rounded
ddqua423 quantize 0.0999 1e-2 -> 0.10 Inexact Rounded
ddqua424 quantize 0.0999 1e-1 -> 0.1 Inexact Rounded
ddqua425 quantize 0.0999 1e0 -> 0 Inexact Rounded
ddqua426 quantize 0.0999 1e1 -> 0E+1 Inexact Rounded
ddqua430 quantize 0.00999 1e-5 -> 0.00999
ddqua431 quantize 0.00999 1e-4 -> 0.0100 Inexact Rounded
ddqua432 quantize 0.00999 1e-3 -> 0.010 Inexact Rounded
ddqua433 quantize 0.00999 1e-2 -> 0.01 Inexact Rounded
ddqua434 quantize 0.00999 1e-1 -> 0.0 Inexact Rounded
ddqua435 quantize 0.00999 1e0 -> 0 Inexact Rounded
ddqua436 quantize 0.00999 1e1 -> 0E+1 Inexact Rounded
ddqua440 quantize 0.000999 1e-5 -> 0.00100 Inexact Rounded
ddqua441 quantize 0.000999 1e-4 -> 0.0010 Inexact Rounded
ddqua442 quantize 0.000999 1e-3 -> 0.001 Inexact Rounded
ddqua443 quantize 0.000999 1e-2 -> 0.00 Inexact Rounded
ddqua444 quantize 0.000999 1e-1 -> 0.0 Inexact Rounded
ddqua445 quantize 0.000999 1e0 -> 0 Inexact Rounded
ddqua446 quantize 0.000999 1e1 -> 0E+1 Inexact Rounded
ddqua1001 quantize 0.000 0.001 -> 0.000
ddqua1002 quantize 0.001 0.001 -> 0.001
ddqua1003 quantize 0.0012 0.001 -> 0.001 Inexact Rounded
ddqua1004 quantize 0.0018 0.001 -> 0.002 Inexact Rounded
ddqua1005 quantize 0.501 0.001 -> 0.501
ddqua1006 quantize 0.5012 0.001 -> 0.501 Inexact Rounded
ddqua1007 quantize 0.5018 0.001 -> 0.502 Inexact Rounded
ddqua1008 quantize 0.999 0.001 -> 0.999
ddqua481 quantize 12345678000 1e+3 -> 1.2345678E+10 Rounded
ddqua482 quantize 1234567800 1e+1 -> 1.23456780E+9 Rounded
ddqua483 quantize 1234567890 1e+1 -> 1.23456789E+9 Rounded
ddqua484 quantize 1234567891 1e+1 -> 1.23456789E+9 Inexact Rounded
ddqua485 quantize 12345678901 1e+2 -> 1.23456789E+10 Inexact Rounded
ddqua486 quantize 1234567896 1e+1 -> 1.23456790E+9 Inexact Rounded
-- a potential double-round
ddqua487 quantize 1234.987643 1e-4 -> 1234.9876 Inexact Rounded
ddqua488 quantize 1234.987647 1e-4 -> 1234.9876 Inexact Rounded
ddqua491 quantize 12345678000 1e+3 -> 1.2345678E+10 Rounded
ddqua492 quantize 1234567800 1e+1 -> 1.23456780E+9 Rounded
ddqua493 quantize 1234567890 1e+1 -> 1.23456789E+9 Rounded
ddqua494 quantize 1234567891 1e+1 -> 1.23456789E+9 Inexact Rounded
ddqua495 quantize 12345678901 1e+2 -> 1.23456789E+10 Inexact Rounded
ddqua496 quantize 1234567896 1e+1 -> 1.23456790E+9 Inexact Rounded
ddqua497 quantize 1234.987643 1e-4 -> 1234.9876 Inexact Rounded
ddqua498 quantize 1234.987647 1e-4 -> 1234.9876 Inexact Rounded
-- Zeros
ddqua500 quantize 0 1e1 -> 0E+1
ddqua501 quantize 0 1e0 -> 0
ddqua502 quantize 0 1e-1 -> 0.0
ddqua503 quantize 0.0 1e-1 -> 0.0
ddqua504 quantize 0.0 1e0 -> 0
ddqua505 quantize 0.0 1e+1 -> 0E+1
ddqua506 quantize 0E+1 1e-1 -> 0.0
ddqua507 quantize 0E+1 1e0 -> 0
ddqua508 quantize 0E+1 1e+1 -> 0E+1
ddqua509 quantize -0 1e1 -> -0E+1
ddqua510 quantize -0 1e0 -> -0
ddqua511 quantize -0 1e-1 -> -0.0
ddqua512 quantize -0.0 1e-1 -> -0.0
ddqua513 quantize -0.0 1e0 -> -0
ddqua514 quantize -0.0 1e+1 -> -0E+1
ddqua515 quantize -0E+1 1e-1 -> -0.0
ddqua516 quantize -0E+1 1e0 -> -0
ddqua517 quantize -0E+1 1e+1 -> -0E+1
-- Suspicious RHS values
ddqua520 quantize 1.234 1e359 -> 0E+359 Inexact Rounded
ddqua521 quantize 123.456 1e359 -> 0E+359 Inexact Rounded
ddqua522 quantize 1.234 1e359 -> 0E+359 Inexact Rounded
ddqua523 quantize 123.456 1e359 -> 0E+359 Inexact Rounded
-- next four are "won't fit" overflow
ddqua526 quantize 1.234 1e-299 -> NaN Invalid_operation
ddqua527 quantize 123.456 1e-299 -> NaN Invalid_operation
ddqua528 quantize 1.234 1e-299 -> NaN Invalid_operation
ddqua529 quantize 123.456 1e-299 -> NaN Invalid_operation
ddqua532 quantize 1.234E+299 1e299 -> 1E+299 Inexact Rounded
ddqua533 quantize 1.234E+298 1e299 -> 0E+299 Inexact Rounded
ddqua534 quantize 1.234 1e299 -> 0E+299 Inexact Rounded
ddqua537 quantize 0 1e-299 -> 0E-299
-- next two are "won't fit" overflows
ddqua538 quantize 1.234 1e-299 -> NaN Invalid_operation
ddqua539 quantize 1.234 1e-300 -> NaN Invalid_operation
-- [more below]
-- Specials
ddqua580 quantize Inf -Inf -> Infinity
ddqua581 quantize Inf 1e-299 -> NaN Invalid_operation
ddqua582 quantize Inf 1e-1 -> NaN Invalid_operation
ddqua583 quantize Inf 1e0 -> NaN Invalid_operation
ddqua584 quantize Inf 1e1 -> NaN Invalid_operation
ddqua585 quantize Inf 1e299 -> NaN Invalid_operation
ddqua586 quantize Inf Inf -> Infinity
ddqua587 quantize -1000 Inf -> NaN Invalid_operation
ddqua588 quantize -Inf Inf -> -Infinity
ddqua589 quantize -1 Inf -> NaN Invalid_operation
ddqua590 quantize 0 Inf -> NaN Invalid_operation
ddqua591 quantize 1 Inf -> NaN Invalid_operation
ddqua592 quantize 1000 Inf -> NaN Invalid_operation
ddqua593 quantize Inf Inf -> Infinity
ddqua594 quantize Inf 1e-0 -> NaN Invalid_operation
ddqua595 quantize -0 Inf -> NaN Invalid_operation
ddqua600 quantize -Inf -Inf -> -Infinity
ddqua601 quantize -Inf 1e-299 -> NaN Invalid_operation
ddqua602 quantize -Inf 1e-1 -> NaN Invalid_operation
ddqua603 quantize -Inf 1e0 -> NaN Invalid_operation
ddqua604 quantize -Inf 1e1 -> NaN Invalid_operation
ddqua605 quantize -Inf 1e299 -> NaN Invalid_operation
ddqua606 quantize -Inf Inf -> -Infinity
ddqua607 quantize -1000 Inf -> NaN Invalid_operation
ddqua608 quantize -Inf -Inf -> -Infinity
ddqua609 quantize -1 -Inf -> NaN Invalid_operation
ddqua610 quantize 0 -Inf -> NaN Invalid_operation
ddqua611 quantize 1 -Inf -> NaN Invalid_operation
ddqua612 quantize 1000 -Inf -> NaN Invalid_operation
ddqua613 quantize Inf -Inf -> Infinity
ddqua614 quantize -Inf 1e-0 -> NaN Invalid_operation
ddqua615 quantize -0 -Inf -> NaN Invalid_operation
ddqua621 quantize NaN -Inf -> NaN
ddqua622 quantize NaN 1e-299 -> NaN
ddqua623 quantize NaN 1e-1 -> NaN
ddqua624 quantize NaN 1e0 -> NaN
ddqua625 quantize NaN 1e1 -> NaN
ddqua626 quantize NaN 1e299 -> NaN
ddqua627 quantize NaN Inf -> NaN
ddqua628 quantize NaN NaN -> NaN
ddqua629 quantize -Inf NaN -> NaN
ddqua630 quantize -1000 NaN -> NaN
ddqua631 quantize -1 NaN -> NaN
ddqua632 quantize 0 NaN -> NaN
ddqua633 quantize 1 NaN -> NaN
ddqua634 quantize 1000 NaN -> NaN
ddqua635 quantize Inf NaN -> NaN
ddqua636 quantize NaN 1e-0 -> NaN
ddqua637 quantize -0 NaN -> NaN
ddqua641 quantize sNaN -Inf -> NaN Invalid_operation
ddqua642 quantize sNaN 1e-299 -> NaN Invalid_operation
ddqua643 quantize sNaN 1e-1 -> NaN Invalid_operation
ddqua644 quantize sNaN 1e0 -> NaN Invalid_operation
ddqua645 quantize sNaN 1e1 -> NaN Invalid_operation
ddqua646 quantize sNaN 1e299 -> NaN Invalid_operation
ddqua647 quantize sNaN NaN -> NaN Invalid_operation
ddqua648 quantize sNaN sNaN -> NaN Invalid_operation
ddqua649 quantize NaN sNaN -> NaN Invalid_operation
ddqua650 quantize -Inf sNaN -> NaN Invalid_operation
ddqua651 quantize -1000 sNaN -> NaN Invalid_operation
ddqua652 quantize -1 sNaN -> NaN Invalid_operation
ddqua653 quantize 0 sNaN -> NaN Invalid_operation
ddqua654 quantize 1 sNaN -> NaN Invalid_operation
ddqua655 quantize 1000 sNaN -> NaN Invalid_operation
ddqua656 quantize Inf sNaN -> NaN Invalid_operation
ddqua657 quantize NaN sNaN -> NaN Invalid_operation
ddqua658 quantize sNaN 1e-0 -> NaN Invalid_operation
ddqua659 quantize -0 sNaN -> NaN Invalid_operation
-- propagating NaNs
ddqua661 quantize NaN9 -Inf -> NaN9
ddqua662 quantize NaN8 919 -> NaN8
ddqua663 quantize NaN71 Inf -> NaN71
ddqua664 quantize NaN6 NaN5 -> NaN6
ddqua665 quantize -Inf NaN4 -> NaN4
ddqua666 quantize -919 NaN31 -> NaN31
ddqua667 quantize Inf NaN2 -> NaN2
ddqua671 quantize sNaN99 -Inf -> NaN99 Invalid_operation
ddqua672 quantize sNaN98 -11 -> NaN98 Invalid_operation
ddqua673 quantize sNaN97 NaN -> NaN97 Invalid_operation
ddqua674 quantize sNaN16 sNaN94 -> NaN16 Invalid_operation
ddqua675 quantize NaN95 sNaN93 -> NaN93 Invalid_operation
ddqua676 quantize -Inf sNaN92 -> NaN92 Invalid_operation
ddqua677 quantize 088 sNaN91 -> NaN91 Invalid_operation
ddqua678 quantize Inf sNaN90 -> NaN90 Invalid_operation
ddqua679 quantize NaN sNaN88 -> NaN88 Invalid_operation
ddqua681 quantize -NaN9 -Inf -> -NaN9
ddqua682 quantize -NaN8 919 -> -NaN8
ddqua683 quantize -NaN71 Inf -> -NaN71
ddqua684 quantize -NaN6 -NaN5 -> -NaN6
ddqua685 quantize -Inf -NaN4 -> -NaN4
ddqua686 quantize -919 -NaN31 -> -NaN31
ddqua687 quantize Inf -NaN2 -> -NaN2
ddqua691 quantize -sNaN99 -Inf -> -NaN99 Invalid_operation
ddqua692 quantize -sNaN98 -11 -> -NaN98 Invalid_operation
ddqua693 quantize -sNaN97 NaN -> -NaN97 Invalid_operation
ddqua694 quantize -sNaN16 sNaN94 -> -NaN16 Invalid_operation
ddqua695 quantize -NaN95 -sNaN93 -> -NaN93 Invalid_operation
ddqua696 quantize -Inf -sNaN92 -> -NaN92 Invalid_operation
ddqua697 quantize 088 -sNaN91 -> -NaN91 Invalid_operation
ddqua698 quantize Inf -sNaN90 -> -NaN90 Invalid_operation
ddqua699 quantize NaN -sNaN88 -> -NaN88 Invalid_operation
-- subnormals and underflow
ddqua710 quantize 1.00E-383 1e-383 -> 1E-383 Rounded
ddqua711 quantize 0.1E-383 2e-384 -> 1E-384 Subnormal
ddqua712 quantize 0.10E-383 3e-384 -> 1E-384 Subnormal Rounded
ddqua713 quantize 0.100E-383 4e-384 -> 1E-384 Subnormal Rounded
ddqua714 quantize 0.01E-383 5e-385 -> 1E-385 Subnormal
-- next is rounded to Emin
ddqua715 quantize 0.999E-383 1e-383 -> 1E-383 Inexact Rounded
ddqua716 quantize 0.099E-383 10e-384 -> 1E-384 Inexact Rounded Subnormal
ddqua717 quantize 0.009E-383 1e-385 -> 1E-385 Inexact Rounded Subnormal
ddqua718 quantize 0.001E-383 1e-385 -> 0E-385 Inexact Rounded
ddqua719 quantize 0.0009E-383 1e-385 -> 0E-385 Inexact Rounded
ddqua720 quantize 0.0001E-383 1e-385 -> 0E-385 Inexact Rounded
ddqua730 quantize -1.00E-383 1e-383 -> -1E-383 Rounded
ddqua731 quantize -0.1E-383 1e-383 -> -0E-383 Rounded Inexact
ddqua732 quantize -0.10E-383 1e-383 -> -0E-383 Rounded Inexact
ddqua733 quantize -0.100E-383 1e-383 -> -0E-383 Rounded Inexact
ddqua734 quantize -0.01E-383 1e-383 -> -0E-383 Inexact Rounded
-- next is rounded to Emin
ddqua735 quantize -0.999E-383 90e-383 -> -1E-383 Inexact Rounded
ddqua736 quantize -0.099E-383 -1e-383 -> -0E-383 Inexact Rounded
ddqua737 quantize -0.009E-383 -1e-383 -> -0E-383 Inexact Rounded
ddqua738 quantize -0.001E-383 -0e-383 -> -0E-383 Inexact Rounded
ddqua739 quantize -0.0001E-383 0e-383 -> -0E-383 Inexact Rounded
ddqua740 quantize -1.00E-383 1e-384 -> -1.0E-383 Rounded
ddqua741 quantize -0.1E-383 1e-384 -> -1E-384 Subnormal
ddqua742 quantize -0.10E-383 1e-384 -> -1E-384 Subnormal Rounded
ddqua743 quantize -0.100E-383 1e-384 -> -1E-384 Subnormal Rounded
ddqua744 quantize -0.01E-383 1e-384 -> -0E-384 Inexact Rounded
-- next is rounded to Emin
ddqua745 quantize -0.999E-383 1e-384 -> -1.0E-383 Inexact Rounded
ddqua746 quantize -0.099E-383 1e-384 -> -1E-384 Inexact Rounded Subnormal
ddqua747 quantize -0.009E-383 1e-384 -> -0E-384 Inexact Rounded
ddqua748 quantize -0.001E-383 1e-384 -> -0E-384 Inexact Rounded
ddqua749 quantize -0.0001E-383 1e-384 -> -0E-384 Inexact Rounded
ddqua750 quantize -1.00E-383 1e-385 -> -1.00E-383
ddqua751 quantize -0.1E-383 1e-385 -> -1.0E-384 Subnormal
ddqua752 quantize -0.10E-383 1e-385 -> -1.0E-384 Subnormal
ddqua753 quantize -0.100E-383 1e-385 -> -1.0E-384 Subnormal Rounded
ddqua754 quantize -0.01E-383 1e-385 -> -1E-385 Subnormal
-- next is rounded to Emin
ddqua755 quantize -0.999E-383 1e-385 -> -1.00E-383 Inexact Rounded
ddqua756 quantize -0.099E-383 1e-385 -> -1.0E-384 Inexact Rounded Subnormal
ddqua757 quantize -0.009E-383 1e-385 -> -1E-385 Inexact Rounded Subnormal
ddqua758 quantize -0.001E-383 1e-385 -> -0E-385 Inexact Rounded
ddqua759 quantize -0.0001E-383 1e-385 -> -0E-385 Inexact Rounded
ddqua760 quantize -1.00E-383 1e-386 -> -1.000E-383
ddqua761 quantize -0.1E-383 1e-386 -> -1.00E-384 Subnormal
ddqua762 quantize -0.10E-383 1e-386 -> -1.00E-384 Subnormal
ddqua763 quantize -0.100E-383 1e-386 -> -1.00E-384 Subnormal
ddqua764 quantize -0.01E-383 1e-386 -> -1.0E-385 Subnormal
ddqua765 quantize -0.999E-383 1e-386 -> -9.99E-384 Subnormal
ddqua766 quantize -0.099E-383 1e-386 -> -9.9E-385 Subnormal
ddqua767 quantize -0.009E-383 1e-386 -> -9E-386 Subnormal
ddqua768 quantize -0.001E-383 1e-386 -> -1E-386 Subnormal
ddqua769 quantize -0.0001E-383 1e-386 -> -0E-386 Inexact Rounded
-- More from Fung Lee
ddqua1021 quantize 8.666666666666000E+384 1.000000000000000E+384 -> 8.666666666666000E+384
ddqua1022 quantize -8.666666666666000E+384 1.000000000000000E+384 -> -8.666666666666000E+384
ddqua1027 quantize 8.666666666666000E+323 1E+31 -> NaN Invalid_operation
ddqua1029 quantize 8.66666666E+3 1E+3 -> 9E+3 Inexact Rounded
--ddqua1030 quantize 8.666666666666000E+384 1E+384 -> 9.000000000000000E+384 Rounded Inexact
--ddqua1031 quantize 8.666666666666000E+384 1E+384 -> 8.666666666666000E+384 Rounded
--ddqua1032 quantize 8.666666666666000E+384 1E+383 -> 8.666666666666000E+384 Rounded
--ddqua1033 quantize 8.666666666666000E+384 1E+382 -> 8.666666666666000E+384 Rounded
--ddqua1034 quantize 8.666666666666000E+384 1E+381 -> 8.666666666666000E+384 Rounded
--ddqua1035 quantize 8.666666666666000E+384 1E+380 -> 8.666666666666000E+384 Rounded
-- Int and uInt32 edge values for testing conversions
ddqua1040 quantize -2147483646 0 -> -2147483646
ddqua1041 quantize -2147483647 0 -> -2147483647
ddqua1042 quantize -2147483648 0 -> -2147483648
ddqua1043 quantize -2147483649 0 -> -2147483649
ddqua1044 quantize 2147483646 0 -> 2147483646
ddqua1045 quantize 2147483647 0 -> 2147483647
ddqua1046 quantize 2147483648 0 -> 2147483648
ddqua1047 quantize 2147483649 0 -> 2147483649
ddqua1048 quantize 4294967294 0 -> 4294967294
ddqua1049 quantize 4294967295 0 -> 4294967295
ddqua1050 quantize 4294967296 0 -> 4294967296
ddqua1051 quantize 4294967297 0 -> 4294967297
-- Rounding swathe
rounding: half_even
ddqua1100 quantize 1.2300 1.00 -> 1.23 Rounded
ddqua1101 quantize 1.2301 1.00 -> 1.23 Inexact Rounded
ddqua1102 quantize 1.2310 1.00 -> 1.23 Inexact Rounded
ddqua1103 quantize 1.2350 1.00 -> 1.24 Inexact Rounded
ddqua1104 quantize 1.2351 1.00 -> 1.24 Inexact Rounded
ddqua1105 quantize 1.2450 1.00 -> 1.24 Inexact Rounded
ddqua1106 quantize 1.2451 1.00 -> 1.25 Inexact Rounded
ddqua1107 quantize 1.2360 1.00 -> 1.24 Inexact Rounded
ddqua1108 quantize 1.2370 1.00 -> 1.24 Inexact Rounded
ddqua1109 quantize 1.2399 1.00 -> 1.24 Inexact Rounded
rounding: half_up
ddqua1200 quantize 1.2300 1.00 -> 1.23 Rounded
ddqua1201 quantize 1.2301 1.00 -> 1.23 Inexact Rounded
ddqua1202 quantize 1.2310 1.00 -> 1.23 Inexact Rounded
ddqua1203 quantize 1.2350 1.00 -> 1.24 Inexact Rounded
ddqua1204 quantize 1.2351 1.00 -> 1.24 Inexact Rounded
ddqua1205 quantize 1.2450 1.00 -> 1.25 Inexact Rounded
ddqua1206 quantize 1.2451 1.00 -> 1.25 Inexact Rounded
ddqua1207 quantize 1.2360 1.00 -> 1.24 Inexact Rounded
ddqua1208 quantize 1.2370 1.00 -> 1.24 Inexact Rounded
ddqua1209 quantize 1.2399 1.00 -> 1.24 Inexact Rounded
rounding: half_down
ddqua1300 quantize 1.2300 1.00 -> 1.23 Rounded
ddqua1301 quantize 1.2301 1.00 -> 1.23 Inexact Rounded
ddqua1302 quantize 1.2310 1.00 -> 1.23 Inexact Rounded
ddqua1303 quantize 1.2350 1.00 -> 1.23 Inexact Rounded
ddqua1304 quantize 1.2351 1.00 -> 1.24 Inexact Rounded
ddqua1305 quantize 1.2450 1.00 -> 1.24 Inexact Rounded
ddqua1306 quantize 1.2451 1.00 -> 1.25 Inexact Rounded
ddqua1307 quantize 1.2360 1.00 -> 1.24 Inexact Rounded
ddqua1308 quantize 1.2370 1.00 -> 1.24 Inexact Rounded
ddqua1309 quantize 1.2399 1.00 -> 1.24 Inexact Rounded
rounding: up
ddqua1400 quantize 1.2300 1.00 -> 1.23 Rounded
ddqua1401 quantize 1.2301 1.00 -> 1.24 Inexact Rounded
ddqua1402 quantize 1.2310 1.00 -> 1.24 Inexact Rounded
ddqua1403 quantize 1.2350 1.00 -> 1.24 Inexact Rounded
ddqua1404 quantize 1.2351 1.00 -> 1.24 Inexact Rounded
ddqua1405 quantize 1.2450 1.00 -> 1.25 Inexact Rounded
ddqua1406 quantize 1.2451 1.00 -> 1.25 Inexact Rounded
ddqua1407 quantize 1.2360 1.00 -> 1.24 Inexact Rounded
ddqua1408 quantize 1.2370 1.00 -> 1.24 Inexact Rounded
ddqua1409 quantize 1.2399 1.00 -> 1.24 Inexact Rounded
ddqua1411 quantize -1.2399 1.00 -> -1.24 Inexact Rounded
rounding: down
ddqua1500 quantize 1.2300 1.00 -> 1.23 Rounded
ddqua1501 quantize 1.2301 1.00 -> 1.23 Inexact Rounded
ddqua1502 quantize 1.2310 1.00 -> 1.23 Inexact Rounded
ddqua1503 quantize 1.2350 1.00 -> 1.23 Inexact Rounded
ddqua1504 quantize 1.2351 1.00 -> 1.23 Inexact Rounded
ddqua1505 quantize 1.2450 1.00 -> 1.24 Inexact Rounded
ddqua1506 quantize 1.2451 1.00 -> 1.24 Inexact Rounded
ddqua1507 quantize 1.2360 1.00 -> 1.23 Inexact Rounded
ddqua1508 quantize 1.2370 1.00 -> 1.23 Inexact Rounded
ddqua1509 quantize 1.2399 1.00 -> 1.23 Inexact Rounded
ddqua1511 quantize -1.2399 1.00 -> -1.23 Inexact Rounded
rounding: ceiling
ddqua1600 quantize 1.2300 1.00 -> 1.23 Rounded
ddqua1601 quantize 1.2301 1.00 -> 1.24 Inexact Rounded
ddqua1602 quantize 1.2310 1.00 -> 1.24 Inexact Rounded
ddqua1603 quantize 1.2350 1.00 -> 1.24 Inexact Rounded
ddqua1604 quantize 1.2351 1.00 -> 1.24 Inexact Rounded
ddqua1605 quantize 1.2450 1.00 -> 1.25 Inexact Rounded
ddqua1606 quantize 1.2451 1.00 -> 1.25 Inexact Rounded
ddqua1607 quantize 1.2360 1.00 -> 1.24 Inexact Rounded
ddqua1608 quantize 1.2370 1.00 -> 1.24 Inexact Rounded
ddqua1609 quantize 1.2399 1.00 -> 1.24 Inexact Rounded
ddqua1611 quantize -1.2399 1.00 -> -1.23 Inexact Rounded
rounding: floor
ddqua1700 quantize 1.2300 1.00 -> 1.23 Rounded
ddqua1701 quantize 1.2301 1.00 -> 1.23 Inexact Rounded
ddqua1702 quantize 1.2310 1.00 -> 1.23 Inexact Rounded
ddqua1703 quantize 1.2350 1.00 -> 1.23 Inexact Rounded
ddqua1704 quantize 1.2351 1.00 -> 1.23 Inexact Rounded
ddqua1705 quantize 1.2450 1.00 -> 1.24 Inexact Rounded
ddqua1706 quantize 1.2451 1.00 -> 1.24 Inexact Rounded
ddqua1707 quantize 1.2360 1.00 -> 1.23 Inexact Rounded
ddqua1708 quantize 1.2370 1.00 -> 1.23 Inexact Rounded
ddqua1709 quantize 1.2399 1.00 -> 1.23 Inexact Rounded
ddqua1711 quantize -1.2399 1.00 -> -1.24 Inexact Rounded
rounding: 05up
ddqua1800 quantize 1.2000 1.00 -> 1.20 Rounded
ddqua1801 quantize 1.2001 1.00 -> 1.21 Inexact Rounded
ddqua1802 quantize 1.2010 1.00 -> 1.21 Inexact Rounded
ddqua1803 quantize 1.2050 1.00 -> 1.21 Inexact Rounded
ddqua1804 quantize 1.2051 1.00 -> 1.21 Inexact Rounded
ddqua1807 quantize 1.2060 1.00 -> 1.21 Inexact Rounded
ddqua1808 quantize 1.2070 1.00 -> 1.21 Inexact Rounded
ddqua1809 quantize 1.2099 1.00 -> 1.21 Inexact Rounded
ddqua1811 quantize -1.2099 1.00 -> -1.21 Inexact Rounded
ddqua1900 quantize 1.2100 1.00 -> 1.21 Rounded
ddqua1901 quantize 1.2101 1.00 -> 1.21 Inexact Rounded
ddqua1902 quantize 1.2110 1.00 -> 1.21 Inexact Rounded
ddqua1903 quantize 1.2150 1.00 -> 1.21 Inexact Rounded
ddqua1904 quantize 1.2151 1.00 -> 1.21 Inexact Rounded
ddqua1907 quantize 1.2160 1.00 -> 1.21 Inexact Rounded
ddqua1908 quantize 1.2170 1.00 -> 1.21 Inexact Rounded
ddqua1909 quantize 1.2199 1.00 -> 1.21 Inexact Rounded
ddqua1911 quantize -1.2199 1.00 -> -1.21 Inexact Rounded
ddqua2000 quantize 1.2400 1.00 -> 1.24 Rounded
ddqua2001 quantize 1.2401 1.00 -> 1.24 Inexact Rounded
ddqua2002 quantize 1.2410 1.00 -> 1.24 Inexact Rounded
ddqua2003 quantize 1.2450 1.00 -> 1.24 Inexact Rounded
ddqua2004 quantize 1.2451 1.00 -> 1.24 Inexact Rounded
ddqua2007 quantize 1.2460 1.00 -> 1.24 Inexact Rounded
ddqua2008 quantize 1.2470 1.00 -> 1.24 Inexact Rounded
ddqua2009 quantize 1.2499 1.00 -> 1.24 Inexact Rounded
ddqua2011 quantize -1.2499 1.00 -> -1.24 Inexact Rounded
ddqua2100 quantize 1.2500 1.00 -> 1.25 Rounded
ddqua2101 quantize 1.2501 1.00 -> 1.26 Inexact Rounded
ddqua2102 quantize 1.2510 1.00 -> 1.26 Inexact Rounded
ddqua2103 quantize 1.2550 1.00 -> 1.26 Inexact Rounded
ddqua2104 quantize 1.2551 1.00 -> 1.26 Inexact Rounded
ddqua2107 quantize 1.2560 1.00 -> 1.26 Inexact Rounded
ddqua2108 quantize 1.2570 1.00 -> 1.26 Inexact Rounded
ddqua2109 quantize 1.2599 1.00 -> 1.26 Inexact Rounded
ddqua2111 quantize -1.2599 1.00 -> -1.26 Inexact Rounded
ddqua2200 quantize 1.2600 1.00 -> 1.26 Rounded
ddqua2201 quantize 1.2601 1.00 -> 1.26 Inexact Rounded
ddqua2202 quantize 1.2610 1.00 -> 1.26 Inexact Rounded
ddqua2203 quantize 1.2650 1.00 -> 1.26 Inexact Rounded
ddqua2204 quantize 1.2651 1.00 -> 1.26 Inexact Rounded
ddqua2207 quantize 1.2660 1.00 -> 1.26 Inexact Rounded
ddqua2208 quantize 1.2670 1.00 -> 1.26 Inexact Rounded
ddqua2209 quantize 1.2699 1.00 -> 1.26 Inexact Rounded
ddqua2211 quantize -1.2699 1.00 -> -1.26 Inexact Rounded
ddqua2300 quantize 1.2900 1.00 -> 1.29 Rounded
ddqua2301 quantize 1.2901 1.00 -> 1.29 Inexact Rounded
ddqua2302 quantize 1.2910 1.00 -> 1.29 Inexact Rounded
ddqua2303 quantize 1.2950 1.00 -> 1.29 Inexact Rounded
ddqua2304 quantize 1.2951 1.00 -> 1.29 Inexact Rounded
ddqua2307 quantize 1.2960 1.00 -> 1.29 Inexact Rounded
ddqua2308 quantize 1.2970 1.00 -> 1.29 Inexact Rounded
ddqua2309 quantize 1.2999 1.00 -> 1.29 Inexact Rounded
ddqua2311 quantize -1.2999 1.00 -> -1.29 Inexact Rounded
-- Null tests
rounding: half_even
ddqua998 quantize 10 # -> NaN Invalid_operation
ddqua999 quantize # 1e10 -> NaN Invalid_operation

View File

@@ -0,0 +1,182 @@
------------------------------------------------------------------------
-- ddReduce.decTest -- remove trailing zeros from a decDouble --
-- Copyright (c) IBM Corporation, 2003, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
ddred001 reduce '1' -> '1'
ddred002 reduce '-1' -> '-1'
ddred003 reduce '1.00' -> '1'
ddred004 reduce '-1.00' -> '-1'
ddred005 reduce '0' -> '0'
ddred006 reduce '0.00' -> '0'
ddred007 reduce '00.0' -> '0'
ddred008 reduce '00.00' -> '0'
ddred009 reduce '00' -> '0'
ddred010 reduce '0E+1' -> '0'
ddred011 reduce '0E+5' -> '0'
ddred012 reduce '-2' -> '-2'
ddred013 reduce '2' -> '2'
ddred014 reduce '-2.00' -> '-2'
ddred015 reduce '2.00' -> '2'
ddred016 reduce '-0' -> '-0'
ddred017 reduce '-0.00' -> '-0'
ddred018 reduce '-00.0' -> '-0'
ddred019 reduce '-00.00' -> '-0'
ddred020 reduce '-00' -> '-0'
ddred021 reduce '-0E+5' -> '-0'
ddred022 reduce '-0E+1' -> '-0'
ddred030 reduce '+0.1' -> '0.1'
ddred031 reduce '-0.1' -> '-0.1'
ddred032 reduce '+0.01' -> '0.01'
ddred033 reduce '-0.01' -> '-0.01'
ddred034 reduce '+0.001' -> '0.001'
ddred035 reduce '-0.001' -> '-0.001'
ddred036 reduce '+0.000001' -> '0.000001'
ddred037 reduce '-0.000001' -> '-0.000001'
ddred038 reduce '+0.000000000001' -> '1E-12'
ddred039 reduce '-0.000000000001' -> '-1E-12'
ddred041 reduce 1.1 -> 1.1
ddred042 reduce 1.10 -> 1.1
ddred043 reduce 1.100 -> 1.1
ddred044 reduce 1.110 -> 1.11
ddred045 reduce -1.1 -> -1.1
ddred046 reduce -1.10 -> -1.1
ddred047 reduce -1.100 -> -1.1
ddred048 reduce -1.110 -> -1.11
ddred049 reduce 9.9 -> 9.9
ddred050 reduce 9.90 -> 9.9
ddred051 reduce 9.900 -> 9.9
ddred052 reduce 9.990 -> 9.99
ddred053 reduce -9.9 -> -9.9
ddred054 reduce -9.90 -> -9.9
ddred055 reduce -9.900 -> -9.9
ddred056 reduce -9.990 -> -9.99
-- some trailing fractional zeros with zeros in units
ddred060 reduce 10.0 -> 1E+1
ddred061 reduce 10.00 -> 1E+1
ddred062 reduce 100.0 -> 1E+2
ddred063 reduce 100.00 -> 1E+2
ddred064 reduce 1.1000E+3 -> 1.1E+3
ddred065 reduce 1.10000E+3 -> 1.1E+3
ddred066 reduce -10.0 -> -1E+1
ddred067 reduce -10.00 -> -1E+1
ddred068 reduce -100.0 -> -1E+2
ddred069 reduce -100.00 -> -1E+2
ddred070 reduce -1.1000E+3 -> -1.1E+3
ddred071 reduce -1.10000E+3 -> -1.1E+3
-- some insignificant trailing zeros with positive exponent
ddred080 reduce 10E+1 -> 1E+2
ddred081 reduce 100E+1 -> 1E+3
ddred082 reduce 1.0E+2 -> 1E+2
ddred083 reduce 1.0E+3 -> 1E+3
ddred084 reduce 1.1E+3 -> 1.1E+3
ddred085 reduce 1.00E+3 -> 1E+3
ddred086 reduce 1.10E+3 -> 1.1E+3
ddred087 reduce -10E+1 -> -1E+2
ddred088 reduce -100E+1 -> -1E+3
ddred089 reduce -1.0E+2 -> -1E+2
ddred090 reduce -1.0E+3 -> -1E+3
ddred091 reduce -1.1E+3 -> -1.1E+3
ddred092 reduce -1.00E+3 -> -1E+3
ddred093 reduce -1.10E+3 -> -1.1E+3
-- some significant trailing zeros, were we to be trimming
ddred100 reduce 11 -> 11
ddred101 reduce 10 -> 1E+1
ddred102 reduce 10. -> 1E+1
ddred103 reduce 1.1E+1 -> 11
ddred104 reduce 1.0E+1 -> 1E+1
ddred105 reduce 1.10E+2 -> 1.1E+2
ddred106 reduce 1.00E+2 -> 1E+2
ddred107 reduce 1.100E+3 -> 1.1E+3
ddred108 reduce 1.000E+3 -> 1E+3
ddred109 reduce 1.000000E+6 -> 1E+6
ddred110 reduce -11 -> -11
ddred111 reduce -10 -> -1E+1
ddred112 reduce -10. -> -1E+1
ddred113 reduce -1.1E+1 -> -11
ddred114 reduce -1.0E+1 -> -1E+1
ddred115 reduce -1.10E+2 -> -1.1E+2
ddred116 reduce -1.00E+2 -> -1E+2
ddred117 reduce -1.100E+3 -> -1.1E+3
ddred118 reduce -1.000E+3 -> -1E+3
ddred119 reduce -1.00000E+5 -> -1E+5
ddred120 reduce -1.000000E+6 -> -1E+6
ddred121 reduce -10.00000E+6 -> -1E+7
ddred122 reduce -100.0000E+6 -> -1E+8
ddred123 reduce -1000.000E+6 -> -1E+9
ddred124 reduce -10000.00E+6 -> -1E+10
ddred125 reduce -100000.0E+6 -> -1E+11
ddred126 reduce -1000000.E+6 -> -1E+12
-- examples from decArith
ddred140 reduce '2.1' -> '2.1'
ddred141 reduce '-2.0' -> '-2'
ddred142 reduce '1.200' -> '1.2'
ddred143 reduce '-120' -> '-1.2E+2'
ddred144 reduce '120.00' -> '1.2E+2'
ddred145 reduce '0.00' -> '0'
-- Nmax, Nmin, Ntiny
-- note origami effect on some of these
ddred151 reduce 9.999999999999999E+384 -> 9.999999999999999E+384
ddred152 reduce 9.999999000000000E+380 -> 9.99999900000E+380
ddred153 reduce 9.999999999990000E+384 -> 9.999999999990000E+384
ddred154 reduce 1E-383 -> 1E-383
ddred155 reduce 1.000000000000000E-383 -> 1E-383
ddred156 reduce 2.000E-395 -> 2E-395 Subnormal
ddred157 reduce 1E-398 -> 1E-398 Subnormal
ddred161 reduce -1E-398 -> -1E-398 Subnormal
ddred162 reduce -2.000E-395 -> -2E-395 Subnormal
ddred163 reduce -1.000000000000000E-383 -> -1E-383
ddred164 reduce -1E-383 -> -1E-383
ddred165 reduce -9.999999000000000E+380 -> -9.99999900000E+380
ddred166 reduce -9.999999999990000E+384 -> -9.999999999990000E+384
ddred167 reduce -9.999999999999990E+384 -> -9.999999999999990E+384
ddred168 reduce -9.999999999999999E+384 -> -9.999999999999999E+384
ddred169 reduce -9.999999999999990E+384 -> -9.999999999999990E+384
-- specials (reduce does not affect payload)
ddred820 reduce 'Inf' -> 'Infinity'
ddred821 reduce '-Inf' -> '-Infinity'
ddred822 reduce NaN -> NaN
ddred823 reduce sNaN -> NaN Invalid_operation
ddred824 reduce NaN101 -> NaN101
ddred825 reduce sNaN010 -> NaN10 Invalid_operation
ddred827 reduce -NaN -> -NaN
ddred828 reduce -sNaN -> -NaN Invalid_operation
ddred829 reduce -NaN101 -> -NaN101
ddred830 reduce -sNaN010 -> -NaN10 Invalid_operation
-- Null test
ddred900 reduce # -> NaN Invalid_operation

View File

@@ -0,0 +1,600 @@
------------------------------------------------------------------------
-- ddRemainder.decTest -- decDouble remainder --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- sanity checks (as base, above)
ddrem001 remainder 1 1 -> 0
ddrem002 remainder 2 1 -> 0
ddrem003 remainder 1 2 -> 1
ddrem004 remainder 2 2 -> 0
ddrem005 remainder 0 1 -> 0
ddrem006 remainder 0 2 -> 0
ddrem007 remainder 1 3 -> 1
ddrem008 remainder 2 3 -> 2
ddrem009 remainder 3 3 -> 0
ddrem010 remainder 2.4 1 -> 0.4
ddrem011 remainder 2.4 -1 -> 0.4
ddrem012 remainder -2.4 1 -> -0.4
ddrem013 remainder -2.4 -1 -> -0.4
ddrem014 remainder 2.40 1 -> 0.40
ddrem015 remainder 2.400 1 -> 0.400
ddrem016 remainder 2.4 2 -> 0.4
ddrem017 remainder 2.400 2 -> 0.400
ddrem018 remainder 2. 2 -> 0
ddrem019 remainder 20 20 -> 0
ddrem020 remainder 187 187 -> 0
ddrem021 remainder 5 2 -> 1
ddrem022 remainder 5 2.0 -> 1.0
ddrem023 remainder 5 2.000 -> 1.000
ddrem024 remainder 5 0.200 -> 0.000
ddrem025 remainder 5 0.200 -> 0.000
ddrem030 remainder 1 2 -> 1
ddrem031 remainder 1 4 -> 1
ddrem032 remainder 1 8 -> 1
ddrem033 remainder 1 16 -> 1
ddrem034 remainder 1 32 -> 1
ddrem035 remainder 1 64 -> 1
ddrem040 remainder 1 -2 -> 1
ddrem041 remainder 1 -4 -> 1
ddrem042 remainder 1 -8 -> 1
ddrem043 remainder 1 -16 -> 1
ddrem044 remainder 1 -32 -> 1
ddrem045 remainder 1 -64 -> 1
ddrem050 remainder -1 2 -> -1
ddrem051 remainder -1 4 -> -1
ddrem052 remainder -1 8 -> -1
ddrem053 remainder -1 16 -> -1
ddrem054 remainder -1 32 -> -1
ddrem055 remainder -1 64 -> -1
ddrem060 remainder -1 -2 -> -1
ddrem061 remainder -1 -4 -> -1
ddrem062 remainder -1 -8 -> -1
ddrem063 remainder -1 -16 -> -1
ddrem064 remainder -1 -32 -> -1
ddrem065 remainder -1 -64 -> -1
ddrem066 remainder 999999999 1 -> 0
ddrem067 remainder 999999999.4 1 -> 0.4
ddrem068 remainder 999999999.5 1 -> 0.5
ddrem069 remainder 999999999.9 1 -> 0.9
ddrem070 remainder 999999999.999 1 -> 0.999
ddrem071 remainder 999999.999999 1 -> 0.999999
ddrem072 remainder 9 1 -> 0
ddrem073 remainder 9999999999999999 1 -> 0
ddrem074 remainder 9999999999999999 2 -> 1
ddrem075 remainder 9999999999999999 3 -> 0
ddrem076 remainder 9999999999999999 4 -> 3
ddrem080 remainder 0. 1 -> 0
ddrem081 remainder .0 1 -> 0.0
ddrem082 remainder 0.00 1 -> 0.00
ddrem083 remainder 0.00E+9 1 -> 0
ddrem084 remainder 0.00E+3 1 -> 0
ddrem085 remainder 0.00E+2 1 -> 0
ddrem086 remainder 0.00E+1 1 -> 0.0
ddrem087 remainder 0.00E+0 1 -> 0.00
ddrem088 remainder 0.00E-0 1 -> 0.00
ddrem089 remainder 0.00E-1 1 -> 0.000
ddrem090 remainder 0.00E-2 1 -> 0.0000
ddrem091 remainder 0.00E-3 1 -> 0.00000
ddrem092 remainder 0.00E-4 1 -> 0.000000
ddrem093 remainder 0.00E-5 1 -> 0E-7
ddrem094 remainder 0.00E-6 1 -> 0E-8
ddrem095 remainder 0.0000E-50 1 -> 0E-54
-- Various flavours of remainder by 0
ddrem101 remainder 0 0 -> NaN Division_undefined
ddrem102 remainder 0 -0 -> NaN Division_undefined
ddrem103 remainder -0 0 -> NaN Division_undefined
ddrem104 remainder -0 -0 -> NaN Division_undefined
ddrem105 remainder 0.0E5 0 -> NaN Division_undefined
ddrem106 remainder 0.000 0 -> NaN Division_undefined
-- [Some think this next group should be Division_by_zero exception, but
-- IEEE 854 is explicit that it is Invalid operation .. for
-- remainder-near, anyway]
ddrem107 remainder 0.0001 0 -> NaN Invalid_operation
ddrem108 remainder 0.01 0 -> NaN Invalid_operation
ddrem109 remainder 0.1 0 -> NaN Invalid_operation
ddrem110 remainder 1 0 -> NaN Invalid_operation
ddrem111 remainder 1 0.0 -> NaN Invalid_operation
ddrem112 remainder 10 0.0 -> NaN Invalid_operation
ddrem113 remainder 1E+100 0.0 -> NaN Invalid_operation
ddrem114 remainder 1E+380 0 -> NaN Invalid_operation
ddrem115 remainder 0.0001 -0 -> NaN Invalid_operation
ddrem116 remainder 0.01 -0 -> NaN Invalid_operation
ddrem119 remainder 0.1 -0 -> NaN Invalid_operation
ddrem120 remainder 1 -0 -> NaN Invalid_operation
ddrem121 remainder 1 -0.0 -> NaN Invalid_operation
ddrem122 remainder 10 -0.0 -> NaN Invalid_operation
ddrem123 remainder 1E+100 -0.0 -> NaN Invalid_operation
ddrem124 remainder 1E+384 -0 -> NaN Invalid_operation
-- and zeros on left
ddrem130 remainder 0 1 -> 0
ddrem131 remainder 0 -1 -> 0
ddrem132 remainder 0.0 1 -> 0.0
ddrem133 remainder 0.0 -1 -> 0.0
ddrem134 remainder -0 1 -> -0
ddrem135 remainder -0 -1 -> -0
ddrem136 remainder -0.0 1 -> -0.0
ddrem137 remainder -0.0 -1 -> -0.0
-- 0.5ers
ddrem143 remainder 0.5 2 -> 0.5
ddrem144 remainder 0.5 2.1 -> 0.5
ddrem145 remainder 0.5 2.01 -> 0.50
ddrem146 remainder 0.5 2.001 -> 0.500
ddrem147 remainder 0.50 2 -> 0.50
ddrem148 remainder 0.50 2.01 -> 0.50
ddrem149 remainder 0.50 2.001 -> 0.500
-- steadies
ddrem150 remainder 1 1 -> 0
ddrem151 remainder 1 2 -> 1
ddrem152 remainder 1 3 -> 1
ddrem153 remainder 1 4 -> 1
ddrem154 remainder 1 5 -> 1
ddrem155 remainder 1 6 -> 1
ddrem156 remainder 1 7 -> 1
ddrem157 remainder 1 8 -> 1
ddrem158 remainder 1 9 -> 1
ddrem159 remainder 1 10 -> 1
ddrem160 remainder 1 1 -> 0
ddrem161 remainder 2 1 -> 0
ddrem162 remainder 3 1 -> 0
ddrem163 remainder 4 1 -> 0
ddrem164 remainder 5 1 -> 0
ddrem165 remainder 6 1 -> 0
ddrem166 remainder 7 1 -> 0
ddrem167 remainder 8 1 -> 0
ddrem168 remainder 9 1 -> 0
ddrem169 remainder 10 1 -> 0
-- some differences from remainderNear
ddrem171 remainder 0.4 1.020 -> 0.400
ddrem172 remainder 0.50 1.020 -> 0.500
ddrem173 remainder 0.51 1.020 -> 0.510
ddrem174 remainder 0.52 1.020 -> 0.520
ddrem175 remainder 0.6 1.020 -> 0.600
-- More flavours of remainder by 0
ddrem201 remainder 0 0 -> NaN Division_undefined
ddrem202 remainder 0.0E5 0 -> NaN Division_undefined
ddrem203 remainder 0.000 0 -> NaN Division_undefined
ddrem204 remainder 0.0001 0 -> NaN Invalid_operation
ddrem205 remainder 0.01 0 -> NaN Invalid_operation
ddrem206 remainder 0.1 0 -> NaN Invalid_operation
ddrem207 remainder 1 0 -> NaN Invalid_operation
ddrem208 remainder 1 0.0 -> NaN Invalid_operation
ddrem209 remainder 10 0.0 -> NaN Invalid_operation
ddrem210 remainder 1E+100 0.0 -> NaN Invalid_operation
ddrem211 remainder 1E+380 0 -> NaN Invalid_operation
-- some differences from remainderNear
ddrem231 remainder -0.4 1.020 -> -0.400
ddrem232 remainder -0.50 1.020 -> -0.500
ddrem233 remainder -0.51 1.020 -> -0.510
ddrem234 remainder -0.52 1.020 -> -0.520
ddrem235 remainder -0.6 1.020 -> -0.600
-- high Xs
ddrem240 remainder 1E+2 1.00 -> 0.00
-- ddrem3xx are from DiagBigDecimal
ddrem301 remainder 1 3 -> 1
ddrem302 remainder 5 5 -> 0
ddrem303 remainder 13 10 -> 3
ddrem304 remainder 13 50 -> 13
ddrem305 remainder 13 100 -> 13
ddrem306 remainder 13 1000 -> 13
ddrem307 remainder .13 1 -> 0.13
ddrem308 remainder 0.133 1 -> 0.133
ddrem309 remainder 0.1033 1 -> 0.1033
ddrem310 remainder 1.033 1 -> 0.033
ddrem311 remainder 10.33 1 -> 0.33
ddrem312 remainder 10.33 10 -> 0.33
ddrem313 remainder 103.3 1 -> 0.3
ddrem314 remainder 133 10 -> 3
ddrem315 remainder 1033 10 -> 3
ddrem316 remainder 1033 50 -> 33
ddrem317 remainder 101.0 3 -> 2.0
ddrem318 remainder 102.0 3 -> 0.0
ddrem319 remainder 103.0 3 -> 1.0
ddrem320 remainder 2.40 1 -> 0.40
ddrem321 remainder 2.400 1 -> 0.400
ddrem322 remainder 2.4 1 -> 0.4
ddrem323 remainder 2.4 2 -> 0.4
ddrem324 remainder 2.400 2 -> 0.400
ddrem325 remainder 1 0.3 -> 0.1
ddrem326 remainder 1 0.30 -> 0.10
ddrem327 remainder 1 0.300 -> 0.100
ddrem328 remainder 1 0.3000 -> 0.1000
ddrem329 remainder 1.0 0.3 -> 0.1
ddrem330 remainder 1.00 0.3 -> 0.10
ddrem331 remainder 1.000 0.3 -> 0.100
ddrem332 remainder 1.0000 0.3 -> 0.1000
ddrem333 remainder 0.5 2 -> 0.5
ddrem334 remainder 0.5 2.1 -> 0.5
ddrem335 remainder 0.5 2.01 -> 0.50
ddrem336 remainder 0.5 2.001 -> 0.500
ddrem337 remainder 0.50 2 -> 0.50
ddrem338 remainder 0.50 2.01 -> 0.50
ddrem339 remainder 0.50 2.001 -> 0.500
ddrem340 remainder 0.5 0.5000001 -> 0.5000000
ddrem341 remainder 0.5 0.50000001 -> 0.50000000
ddrem342 remainder 0.5 0.500000001 -> 0.500000000
ddrem343 remainder 0.5 0.5000000001 -> 0.5000000000
ddrem344 remainder 0.5 0.50000000001 -> 0.50000000000
ddrem345 remainder 0.5 0.4999999 -> 1E-7
ddrem346 remainder 0.5 0.49999999 -> 1E-8
ddrem347 remainder 0.5 0.499999999 -> 1E-9
ddrem348 remainder 0.5 0.4999999999 -> 1E-10
ddrem349 remainder 0.5 0.49999999999 -> 1E-11
ddrem350 remainder 0.5 0.499999999999 -> 1E-12
ddrem351 remainder 0.03 7 -> 0.03
ddrem352 remainder 5 2 -> 1
ddrem353 remainder 4.1 2 -> 0.1
ddrem354 remainder 4.01 2 -> 0.01
ddrem355 remainder 4.001 2 -> 0.001
ddrem356 remainder 4.0001 2 -> 0.0001
ddrem357 remainder 4.00001 2 -> 0.00001
ddrem358 remainder 4.000001 2 -> 0.000001
ddrem359 remainder 4.0000001 2 -> 1E-7
ddrem360 remainder 1.2 0.7345 -> 0.4655
ddrem361 remainder 0.8 12 -> 0.8
ddrem362 remainder 0.8 0.2 -> 0.0
ddrem363 remainder 0.8 0.3 -> 0.2
ddrem364 remainder 0.800 12 -> 0.800
ddrem365 remainder 0.800 1.7 -> 0.800
ddrem366 remainder 2.400 2 -> 0.400
ddrem371 remainder 2.400 2 -> 0.400
ddrem381 remainder 12345 1 -> 0
ddrem382 remainder 12345 1.0001 -> 0.7657
ddrem383 remainder 12345 1.001 -> 0.668
ddrem384 remainder 12345 1.01 -> 0.78
ddrem385 remainder 12345 1.1 -> 0.8
ddrem386 remainder 12355 4 -> 3
ddrem387 remainder 12345 4 -> 1
ddrem388 remainder 12355 4.0001 -> 2.6912
ddrem389 remainder 12345 4.0001 -> 0.6914
ddrem390 remainder 12345 4.9 -> 1.9
ddrem391 remainder 12345 4.99 -> 4.73
ddrem392 remainder 12345 4.999 -> 2.469
ddrem393 remainder 12345 4.9999 -> 0.2469
ddrem394 remainder 12345 5 -> 0
ddrem395 remainder 12345 5.0001 -> 4.7532
ddrem396 remainder 12345 5.001 -> 2.532
ddrem397 remainder 12345 5.01 -> 0.36
ddrem398 remainder 12345 5.1 -> 3.0
-- the nasty division-by-1 cases
ddrem401 remainder 0.5 1 -> 0.5
ddrem402 remainder 0.55 1 -> 0.55
ddrem403 remainder 0.555 1 -> 0.555
ddrem404 remainder 0.5555 1 -> 0.5555
ddrem405 remainder 0.55555 1 -> 0.55555
ddrem406 remainder 0.555555 1 -> 0.555555
ddrem407 remainder 0.5555555 1 -> 0.5555555
ddrem408 remainder 0.55555555 1 -> 0.55555555
ddrem409 remainder 0.555555555 1 -> 0.555555555
-- folddowns
ddrem421 remainder 1E+384 1 -> NaN Division_impossible
ddrem422 remainder 1E+384 1E+383 -> 0E+369 Clamped
ddrem423 remainder 1E+384 2E+383 -> 0E+369 Clamped
ddrem424 remainder 1E+384 3E+383 -> 1.00000000000000E+383 Clamped
ddrem425 remainder 1E+384 4E+383 -> 2.00000000000000E+383 Clamped
ddrem426 remainder 1E+384 5E+383 -> 0E+369 Clamped
ddrem427 remainder 1E+384 6E+383 -> 4.00000000000000E+383 Clamped
ddrem428 remainder 1E+384 7E+383 -> 3.00000000000000E+383 Clamped
ddrem429 remainder 1E+384 8E+383 -> 2.00000000000000E+383 Clamped
ddrem430 remainder 1E+384 9E+383 -> 1.00000000000000E+383 Clamped
-- tinies
ddrem431 remainder 1E-397 1E-398 -> 0E-398
ddrem432 remainder 1E-397 2E-398 -> 0E-398
ddrem433 remainder 1E-397 3E-398 -> 1E-398 Subnormal
ddrem434 remainder 1E-397 4E-398 -> 2E-398 Subnormal
ddrem435 remainder 1E-397 5E-398 -> 0E-398
ddrem436 remainder 1E-397 6E-398 -> 4E-398 Subnormal
ddrem437 remainder 1E-397 7E-398 -> 3E-398 Subnormal
ddrem438 remainder 1E-397 8E-398 -> 2E-398 Subnormal
ddrem439 remainder 1E-397 9E-398 -> 1E-398 Subnormal
ddrem440 remainder 1E-397 10E-398 -> 0E-398
ddrem441 remainder 1E-397 11E-398 -> 1.0E-397 Subnormal
ddrem442 remainder 100E-397 11E-398 -> 1.0E-397 Subnormal
ddrem443 remainder 100E-397 20E-398 -> 0E-398
ddrem444 remainder 100E-397 21E-398 -> 1.3E-397 Subnormal
ddrem445 remainder 100E-397 30E-398 -> 1.0E-397 Subnormal
-- zero signs
ddrem650 remainder 1 1 -> 0
ddrem651 remainder -1 1 -> -0
ddrem652 remainder 1 -1 -> 0
ddrem653 remainder -1 -1 -> -0
ddrem654 remainder 0 1 -> 0
ddrem655 remainder -0 1 -> -0
ddrem656 remainder 0 -1 -> 0
ddrem657 remainder -0 -1 -> -0
ddrem658 remainder 0.00 1 -> 0.00
ddrem659 remainder -0.00 1 -> -0.00
-- Specials
ddrem680 remainder Inf -Inf -> NaN Invalid_operation
ddrem681 remainder Inf -1000 -> NaN Invalid_operation
ddrem682 remainder Inf -1 -> NaN Invalid_operation
ddrem683 remainder Inf 0 -> NaN Invalid_operation
ddrem684 remainder Inf -0 -> NaN Invalid_operation
ddrem685 remainder Inf 1 -> NaN Invalid_operation
ddrem686 remainder Inf 1000 -> NaN Invalid_operation
ddrem687 remainder Inf Inf -> NaN Invalid_operation
ddrem688 remainder -1000 Inf -> -1000
ddrem689 remainder -Inf Inf -> NaN Invalid_operation
ddrem691 remainder -1 Inf -> -1
ddrem692 remainder 0 Inf -> 0
ddrem693 remainder -0 Inf -> -0
ddrem694 remainder 1 Inf -> 1
ddrem695 remainder 1000 Inf -> 1000
ddrem696 remainder Inf Inf -> NaN Invalid_operation
ddrem700 remainder -Inf -Inf -> NaN Invalid_operation
ddrem701 remainder -Inf -1000 -> NaN Invalid_operation
ddrem702 remainder -Inf -1 -> NaN Invalid_operation
ddrem703 remainder -Inf -0 -> NaN Invalid_operation
ddrem704 remainder -Inf 0 -> NaN Invalid_operation
ddrem705 remainder -Inf 1 -> NaN Invalid_operation
ddrem706 remainder -Inf 1000 -> NaN Invalid_operation
ddrem707 remainder -Inf Inf -> NaN Invalid_operation
ddrem708 remainder -Inf -Inf -> NaN Invalid_operation
ddrem709 remainder -1000 Inf -> -1000
ddrem710 remainder -1 -Inf -> -1
ddrem711 remainder -0 -Inf -> -0
ddrem712 remainder 0 -Inf -> 0
ddrem713 remainder 1 -Inf -> 1
ddrem714 remainder 1000 -Inf -> 1000
ddrem715 remainder Inf -Inf -> NaN Invalid_operation
ddrem721 remainder NaN -Inf -> NaN
ddrem722 remainder NaN -1000 -> NaN
ddrem723 remainder NaN -1 -> NaN
ddrem724 remainder NaN -0 -> NaN
ddrem725 remainder -NaN 0 -> -NaN
ddrem726 remainder NaN 1 -> NaN
ddrem727 remainder NaN 1000 -> NaN
ddrem728 remainder NaN Inf -> NaN
ddrem729 remainder NaN -NaN -> NaN
ddrem730 remainder -Inf NaN -> NaN
ddrem731 remainder -1000 NaN -> NaN
ddrem732 remainder -1 NaN -> NaN
ddrem733 remainder -0 -NaN -> -NaN
ddrem734 remainder 0 NaN -> NaN
ddrem735 remainder 1 -NaN -> -NaN
ddrem736 remainder 1000 NaN -> NaN
ddrem737 remainder Inf NaN -> NaN
ddrem741 remainder sNaN -Inf -> NaN Invalid_operation
ddrem742 remainder sNaN -1000 -> NaN Invalid_operation
ddrem743 remainder -sNaN -1 -> -NaN Invalid_operation
ddrem744 remainder sNaN -0 -> NaN Invalid_operation
ddrem745 remainder sNaN 0 -> NaN Invalid_operation
ddrem746 remainder sNaN 1 -> NaN Invalid_operation
ddrem747 remainder sNaN 1000 -> NaN Invalid_operation
ddrem749 remainder sNaN NaN -> NaN Invalid_operation
ddrem750 remainder sNaN sNaN -> NaN Invalid_operation
ddrem751 remainder NaN sNaN -> NaN Invalid_operation
ddrem752 remainder -Inf sNaN -> NaN Invalid_operation
ddrem753 remainder -1000 sNaN -> NaN Invalid_operation
ddrem754 remainder -1 sNaN -> NaN Invalid_operation
ddrem755 remainder -0 sNaN -> NaN Invalid_operation
ddrem756 remainder 0 sNaN -> NaN Invalid_operation
ddrem757 remainder 1 sNaN -> NaN Invalid_operation
ddrem758 remainder 1000 sNaN -> NaN Invalid_operation
ddrem759 remainder Inf -sNaN -> -NaN Invalid_operation
-- propagating NaNs
ddrem760 remainder NaN1 NaN7 -> NaN1
ddrem761 remainder sNaN2 NaN8 -> NaN2 Invalid_operation
ddrem762 remainder NaN3 sNaN9 -> NaN9 Invalid_operation
ddrem763 remainder sNaN4 sNaN10 -> NaN4 Invalid_operation
ddrem764 remainder 15 NaN11 -> NaN11
ddrem765 remainder NaN6 NaN12 -> NaN6
ddrem766 remainder Inf NaN13 -> NaN13
ddrem767 remainder NaN14 -Inf -> NaN14
ddrem768 remainder 0 NaN15 -> NaN15
ddrem769 remainder NaN16 -0 -> NaN16
-- edge cases of impossible
ddrem770 remainder 1234567890123456 10 -> 6
ddrem771 remainder 1234567890123456 1 -> 0
ddrem772 remainder 1234567890123456 0.1 -> NaN Division_impossible
ddrem773 remainder 1234567890123456 0.01 -> NaN Division_impossible
-- long operand checks
ddrem801 remainder 12345678000 100 -> 0
ddrem802 remainder 1 12345678000 -> 1
ddrem803 remainder 1234567800 10 -> 0
ddrem804 remainder 1 1234567800 -> 1
ddrem805 remainder 1234567890 10 -> 0
ddrem806 remainder 1 1234567890 -> 1
ddrem807 remainder 1234567891 10 -> 1
ddrem808 remainder 1 1234567891 -> 1
ddrem809 remainder 12345678901 100 -> 1
ddrem810 remainder 1 12345678901 -> 1
ddrem811 remainder 1234567896 10 -> 6
ddrem812 remainder 1 1234567896 -> 1
ddrem821 remainder 12345678000 100 -> 0
ddrem822 remainder 1 12345678000 -> 1
ddrem823 remainder 1234567800 10 -> 0
ddrem824 remainder 1 1234567800 -> 1
ddrem825 remainder 1234567890 10 -> 0
ddrem826 remainder 1 1234567890 -> 1
ddrem827 remainder 1234567891 10 -> 1
ddrem828 remainder 1 1234567891 -> 1
ddrem829 remainder 12345678901 100 -> 1
ddrem830 remainder 1 12345678901 -> 1
ddrem831 remainder 1234567896 10 -> 6
ddrem832 remainder 1 1234567896 -> 1
-- from divideint
ddrem840 remainder 100000000.0 1 -> 0.0
ddrem841 remainder 100000000.4 1 -> 0.4
ddrem842 remainder 100000000.5 1 -> 0.5
ddrem843 remainder 100000000.9 1 -> 0.9
ddrem844 remainder 100000000.999 1 -> 0.999
ddrem850 remainder 100000003 5 -> 3
ddrem851 remainder 10000003 5 -> 3
ddrem852 remainder 1000003 5 -> 3
ddrem853 remainder 100003 5 -> 3
ddrem854 remainder 10003 5 -> 3
ddrem855 remainder 1003 5 -> 3
ddrem856 remainder 103 5 -> 3
ddrem857 remainder 13 5 -> 3
ddrem858 remainder 1 5 -> 1
-- Vladimir's cases 1234567890123456
ddrem860 remainder 123.0e1 1000000000000000 -> 1230
ddrem861 remainder 1230 1000000000000000 -> 1230
ddrem862 remainder 12.3e2 1000000000000000 -> 1230
ddrem863 remainder 1.23e3 1000000000000000 -> 1230
ddrem864 remainder 123e1 1000000000000000 -> 1230
ddrem870 remainder 123e1 1000000000000000 -> 1230
ddrem871 remainder 123e1 100000000000000 -> 1230
ddrem872 remainder 123e1 10000000000000 -> 1230
ddrem873 remainder 123e1 1000000000000 -> 1230
ddrem874 remainder 123e1 100000000000 -> 1230
ddrem875 remainder 123e1 10000000000 -> 1230
ddrem876 remainder 123e1 1000000000 -> 1230
ddrem877 remainder 123e1 100000000 -> 1230
ddrem878 remainder 1230 100000000 -> 1230
ddrem879 remainder 123e1 10000000 -> 1230
ddrem880 remainder 123e1 1000000 -> 1230
ddrem881 remainder 123e1 100000 -> 1230
ddrem882 remainder 123e1 10000 -> 1230
ddrem883 remainder 123e1 1000 -> 230
ddrem884 remainder 123e1 100 -> 30
ddrem885 remainder 123e1 10 -> 0
ddrem886 remainder 123e1 1 -> 0
ddrem890 remainder 123e1 2000000000000000 -> 1230
ddrem891 remainder 123e1 200000000000000 -> 1230
ddrem892 remainder 123e1 20000000000000 -> 1230
ddrem893 remainder 123e1 2000000000000 -> 1230
ddrem894 remainder 123e1 200000000000 -> 1230
ddrem895 remainder 123e1 20000000000 -> 1230
ddrem896 remainder 123e1 2000000000 -> 1230
ddrem897 remainder 123e1 200000000 -> 1230
ddrem899 remainder 123e1 20000000 -> 1230
ddrem900 remainder 123e1 2000000 -> 1230
ddrem901 remainder 123e1 200000 -> 1230
ddrem902 remainder 123e1 20000 -> 1230
ddrem903 remainder 123e1 2000 -> 1230
ddrem904 remainder 123e1 200 -> 30
ddrem905 remainder 123e1 20 -> 10
ddrem906 remainder 123e1 2 -> 0
ddrem910 remainder 123e1 5000000000000000 -> 1230
ddrem911 remainder 123e1 500000000000000 -> 1230
ddrem912 remainder 123e1 50000000000000 -> 1230
ddrem913 remainder 123e1 5000000000000 -> 1230
ddrem914 remainder 123e1 500000000000 -> 1230
ddrem915 remainder 123e1 50000000000 -> 1230
ddrem916 remainder 123e1 5000000000 -> 1230
ddrem917 remainder 123e1 500000000 -> 1230
ddrem919 remainder 123e1 50000000 -> 1230
ddrem920 remainder 123e1 5000000 -> 1230
ddrem921 remainder 123e1 500000 -> 1230
ddrem922 remainder 123e1 50000 -> 1230
ddrem923 remainder 123e1 5000 -> 1230
ddrem924 remainder 123e1 500 -> 230
ddrem925 remainder 123e1 50 -> 30
ddrem926 remainder 123e1 5 -> 0
ddrem930 remainder 123e1 9000000000000000 -> 1230
ddrem931 remainder 123e1 900000000000000 -> 1230
ddrem932 remainder 123e1 90000000000000 -> 1230
ddrem933 remainder 123e1 9000000000000 -> 1230
ddrem934 remainder 123e1 900000000000 -> 1230
ddrem935 remainder 123e1 90000000000 -> 1230
ddrem936 remainder 123e1 9000000000 -> 1230
ddrem937 remainder 123e1 900000000 -> 1230
ddrem939 remainder 123e1 90000000 -> 1230
ddrem940 remainder 123e1 9000000 -> 1230
ddrem941 remainder 123e1 900000 -> 1230
ddrem942 remainder 123e1 90000 -> 1230
ddrem943 remainder 123e1 9000 -> 1230
ddrem944 remainder 123e1 900 -> 330
ddrem945 remainder 123e1 90 -> 60
ddrem946 remainder 123e1 9 -> 6
ddrem950 remainder 123e1 1000000000000000 -> 1230
ddrem961 remainder 123e1 2999999999999999 -> 1230
ddrem962 remainder 123e1 3999999999999999 -> 1230
ddrem963 remainder 123e1 4999999999999999 -> 1230
ddrem964 remainder 123e1 5999999999999999 -> 1230
ddrem965 remainder 123e1 6999999999999999 -> 1230
ddrem966 remainder 123e1 7999999999999999 -> 1230
ddrem967 remainder 123e1 8999999999999999 -> 1230
ddrem968 remainder 123e1 9999999999999999 -> 1230
ddrem969 remainder 123e1 9876543210987654 -> 1230
ddrem980 remainder 123e1 1000E299 -> 1.23E+3 -- 123E+1 internally
-- overflow and underflow tests [from divide]
ddrem1051 remainder 1e+277 1e-311 -> NaN Division_impossible
ddrem1052 remainder 1e+277 -1e-311 -> NaN Division_impossible
ddrem1053 remainder -1e+277 1e-311 -> NaN Division_impossible
ddrem1054 remainder -1e+277 -1e-311 -> NaN Division_impossible
ddrem1055 remainder 1e-277 1e+311 -> 1E-277
ddrem1056 remainder 1e-277 -1e+311 -> 1E-277
ddrem1057 remainder -1e-277 1e+311 -> -1E-277
ddrem1058 remainder -1e-277 -1e+311 -> -1E-277
-- destructive subtract
ddrem1101 remainder 1234567890123456 1.000000000000001 -> 0.765432109876546
ddrem1102 remainder 1234567890123456 1.00000000000001 -> 0.65432109876557
ddrem1103 remainder 1234567890123456 1.0000000000001 -> 0.5432109876668
ddrem1104 remainder 1234567890123455 4.000000000000001 -> 2.691358027469137
ddrem1105 remainder 1234567890123456 4.000000000000001 -> 3.691358027469137
ddrem1106 remainder 1234567890123456 4.9999999999999 -> 0.6913578024696
ddrem1107 remainder 1234567890123456 4.99999999999999 -> 3.46913578024691
ddrem1108 remainder 1234567890123456 4.999999999999999 -> 1.246913578024691
ddrem1109 remainder 1234567890123456 5.000000000000001 -> 0.753086421975309
ddrem1110 remainder 1234567890123456 5.00000000000001 -> 3.53086421975310
ddrem1111 remainder 1234567890123456 5.0000000000001 -> 1.3086421975314
-- Null tests
ddrem1000 remainder 10 # -> NaN Invalid_operation
ddrem1001 remainder # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,629 @@
------------------------------------------------------------------------
-- ddRemainderNear.decTest -- decDouble remainder-near --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- sanity checks (as base, above)
ddrmn001 remaindernear 1 1 -> 0
ddrmn002 remaindernear 2 1 -> 0
ddrmn003 remaindernear 1 2 -> 1
ddrmn004 remaindernear 2 2 -> 0
ddrmn005 remaindernear 0 1 -> 0
ddrmn006 remaindernear 0 2 -> 0
ddrmn007 remaindernear 1 3 -> 1
ddrmn008 remaindernear 2 3 -> -1
ddrmn009 remaindernear 3 3 -> 0
ddrmn010 remaindernear 2.4 1 -> 0.4
ddrmn011 remaindernear 2.4 -1 -> 0.4
ddrmn012 remaindernear -2.4 1 -> -0.4
ddrmn013 remaindernear -2.4 -1 -> -0.4
ddrmn014 remaindernear 2.40 1 -> 0.40
ddrmn015 remaindernear 2.400 1 -> 0.400
ddrmn016 remaindernear 2.4 2 -> 0.4
ddrmn017 remaindernear 2.400 2 -> 0.400
ddrmn018 remaindernear 2. 2 -> 0
ddrmn019 remaindernear 20 20 -> 0
ddrmn020 remaindernear 187 187 -> 0
ddrmn021 remaindernear 5 2 -> 1
ddrmn022 remaindernear 5 2.0 -> 1.0
ddrmn023 remaindernear 5 2.000 -> 1.000
ddrmn024 remaindernear 5 0.200 -> 0.000
ddrmn025 remaindernear 5 0.200 -> 0.000
ddrmn030 remaindernear 1 2 -> 1
ddrmn031 remaindernear 1 4 -> 1
ddrmn032 remaindernear 1 8 -> 1
ddrmn033 remaindernear 1 16 -> 1
ddrmn034 remaindernear 1 32 -> 1
ddrmn035 remaindernear 1 64 -> 1
ddrmn040 remaindernear 1 -2 -> 1
ddrmn041 remaindernear 1 -4 -> 1
ddrmn042 remaindernear 1 -8 -> 1
ddrmn043 remaindernear 1 -16 -> 1
ddrmn044 remaindernear 1 -32 -> 1
ddrmn045 remaindernear 1 -64 -> 1
ddrmn050 remaindernear -1 2 -> -1
ddrmn051 remaindernear -1 4 -> -1
ddrmn052 remaindernear -1 8 -> -1
ddrmn053 remaindernear -1 16 -> -1
ddrmn054 remaindernear -1 32 -> -1
ddrmn055 remaindernear -1 64 -> -1
ddrmn060 remaindernear -1 -2 -> -1
ddrmn061 remaindernear -1 -4 -> -1
ddrmn062 remaindernear -1 -8 -> -1
ddrmn063 remaindernear -1 -16 -> -1
ddrmn064 remaindernear -1 -32 -> -1
ddrmn065 remaindernear -1 -64 -> -1
ddrmn066 remaindernear 9.9 1 -> -0.1
ddrmn067 remaindernear 99.7 1 -> -0.3
ddrmn068 remaindernear 999999999 1 -> 0
ddrmn069 remaindernear 999999999.4 1 -> 0.4
ddrmn070 remaindernear 999999999.5 1 -> -0.5
ddrmn071 remaindernear 999999999.9 1 -> -0.1
ddrmn072 remaindernear 999999999.999 1 -> -0.001
ddrmn073 remaindernear 999999.999999 1 -> -0.000001
ddrmn074 remaindernear 9 1 -> 0
ddrmn075 remaindernear 9999999999999999 1 -> 0
ddrmn076 remaindernear 9999999999999999 2 -> -1
ddrmn077 remaindernear 9999999999999999 3 -> 0
ddrmn078 remaindernear 9999999999999999 4 -> -1
ddrmn080 remaindernear 0. 1 -> 0
ddrmn081 remaindernear .0 1 -> 0.0
ddrmn082 remaindernear 0.00 1 -> 0.00
ddrmn083 remaindernear 0.00E+9 1 -> 0
ddrmn084 remaindernear 0.00E+3 1 -> 0
ddrmn085 remaindernear 0.00E+2 1 -> 0
ddrmn086 remaindernear 0.00E+1 1 -> 0.0
ddrmn087 remaindernear 0.00E+0 1 -> 0.00
ddrmn088 remaindernear 0.00E-0 1 -> 0.00
ddrmn089 remaindernear 0.00E-1 1 -> 0.000
ddrmn090 remaindernear 0.00E-2 1 -> 0.0000
ddrmn091 remaindernear 0.00E-3 1 -> 0.00000
ddrmn092 remaindernear 0.00E-4 1 -> 0.000000
ddrmn093 remaindernear 0.00E-5 1 -> 0E-7
ddrmn094 remaindernear 0.00E-6 1 -> 0E-8
ddrmn095 remaindernear 0.0000E-50 1 -> 0E-54
-- Various flavours of remaindernear by 0
ddrmn101 remaindernear 0 0 -> NaN Division_undefined
ddrmn102 remaindernear 0 -0 -> NaN Division_undefined
ddrmn103 remaindernear -0 0 -> NaN Division_undefined
ddrmn104 remaindernear -0 -0 -> NaN Division_undefined
ddrmn105 remaindernear 0.0E5 0 -> NaN Division_undefined
ddrmn106 remaindernear 0.000 0 -> NaN Division_undefined
-- [Some think this next group should be Division_by_zero exception, but
-- IEEE 854 is explicit that it is Invalid operation .. for
-- remainder-near, anyway]
ddrmn107 remaindernear 0.0001 0 -> NaN Invalid_operation
ddrmn108 remaindernear 0.01 0 -> NaN Invalid_operation
ddrmn109 remaindernear 0.1 0 -> NaN Invalid_operation
ddrmn110 remaindernear 1 0 -> NaN Invalid_operation
ddrmn111 remaindernear 1 0.0 -> NaN Invalid_operation
ddrmn112 remaindernear 10 0.0 -> NaN Invalid_operation
ddrmn113 remaindernear 1E+100 0.0 -> NaN Invalid_operation
ddrmn114 remaindernear 1E+380 0 -> NaN Invalid_operation
ddrmn115 remaindernear 0.0001 -0 -> NaN Invalid_operation
ddrmn116 remaindernear 0.01 -0 -> NaN Invalid_operation
ddrmn119 remaindernear 0.1 -0 -> NaN Invalid_operation
ddrmn120 remaindernear 1 -0 -> NaN Invalid_operation
ddrmn121 remaindernear 1 -0.0 -> NaN Invalid_operation
ddrmn122 remaindernear 10 -0.0 -> NaN Invalid_operation
ddrmn123 remaindernear 1E+100 -0.0 -> NaN Invalid_operation
ddrmn124 remaindernear 1E+384 -0 -> NaN Invalid_operation
-- and zeros on left
ddrmn130 remaindernear 0 1 -> 0
ddrmn131 remaindernear 0 -1 -> 0
ddrmn132 remaindernear 0.0 1 -> 0.0
ddrmn133 remaindernear 0.0 -1 -> 0.0
ddrmn134 remaindernear -0 1 -> -0
ddrmn135 remaindernear -0 -1 -> -0
ddrmn136 remaindernear -0.0 1 -> -0.0
ddrmn137 remaindernear -0.0 -1 -> -0.0
-- 0.5ers
ddrmn143 remaindernear 0.5 2 -> 0.5
ddrmn144 remaindernear 0.5 2.1 -> 0.5
ddrmn145 remaindernear 0.5 2.01 -> 0.50
ddrmn146 remaindernear 0.5 2.001 -> 0.500
ddrmn147 remaindernear 0.50 2 -> 0.50
ddrmn148 remaindernear 0.50 2.01 -> 0.50
ddrmn149 remaindernear 0.50 2.001 -> 0.500
-- steadies
ddrmn150 remaindernear 1 1 -> 0
ddrmn151 remaindernear 1 2 -> 1
ddrmn152 remaindernear 1 3 -> 1
ddrmn153 remaindernear 1 4 -> 1
ddrmn154 remaindernear 1 5 -> 1
ddrmn155 remaindernear 1 6 -> 1
ddrmn156 remaindernear 1 7 -> 1
ddrmn157 remaindernear 1 8 -> 1
ddrmn158 remaindernear 1 9 -> 1
ddrmn159 remaindernear 1 10 -> 1
ddrmn160 remaindernear 1 1 -> 0
ddrmn161 remaindernear 2 1 -> 0
ddrmn162 remaindernear 3 1 -> 0
ddrmn163 remaindernear 4 1 -> 0
ddrmn164 remaindernear 5 1 -> 0
ddrmn165 remaindernear 6 1 -> 0
ddrmn166 remaindernear 7 1 -> 0
ddrmn167 remaindernear 8 1 -> 0
ddrmn168 remaindernear 9 1 -> 0
ddrmn169 remaindernear 10 1 -> 0
-- some differences from remainder
ddrmn171 remaindernear 0.4 1.020 -> 0.400
ddrmn172 remaindernear 0.50 1.020 -> 0.500
ddrmn173 remaindernear 0.51 1.020 -> 0.510
ddrmn174 remaindernear 0.52 1.020 -> -0.500
ddrmn175 remaindernear 0.6 1.020 -> -0.420
-- More flavours of remaindernear by 0
ddrmn201 remaindernear 0 0 -> NaN Division_undefined
ddrmn202 remaindernear 0.0E5 0 -> NaN Division_undefined
ddrmn203 remaindernear 0.000 0 -> NaN Division_undefined
ddrmn204 remaindernear 0.0001 0 -> NaN Invalid_operation
ddrmn205 remaindernear 0.01 0 -> NaN Invalid_operation
ddrmn206 remaindernear 0.1 0 -> NaN Invalid_operation
ddrmn207 remaindernear 1 0 -> NaN Invalid_operation
ddrmn208 remaindernear 1 0.0 -> NaN Invalid_operation
ddrmn209 remaindernear 10 0.0 -> NaN Invalid_operation
ddrmn210 remaindernear 1E+100 0.0 -> NaN Invalid_operation
ddrmn211 remaindernear 1E+380 0 -> NaN Invalid_operation
-- tests from the extended specification
ddrmn221 remaindernear 2.1 3 -> -0.9
ddrmn222 remaindernear 10 6 -> -2
ddrmn223 remaindernear 10 3 -> 1
ddrmn224 remaindernear -10 3 -> -1
ddrmn225 remaindernear 10.2 1 -> 0.2
ddrmn226 remaindernear 10 0.3 -> 0.1
ddrmn227 remaindernear 3.6 1.3 -> -0.3
-- some differences from remainder
ddrmn231 remaindernear -0.4 1.020 -> -0.400
ddrmn232 remaindernear -0.50 1.020 -> -0.500
ddrmn233 remaindernear -0.51 1.020 -> -0.510
ddrmn234 remaindernear -0.52 1.020 -> 0.500
ddrmn235 remaindernear -0.6 1.020 -> 0.420
-- high Xs
ddrmn240 remaindernear 1E+2 1.00 -> 0.00
-- ddrmn3xx are from DiagBigDecimal
ddrmn301 remaindernear 1 3 -> 1
ddrmn302 remaindernear 5 5 -> 0
ddrmn303 remaindernear 13 10 -> 3
ddrmn304 remaindernear 13 50 -> 13
ddrmn305 remaindernear 13 100 -> 13
ddrmn306 remaindernear 13 1000 -> 13
ddrmn307 remaindernear .13 1 -> 0.13
ddrmn308 remaindernear 0.133 1 -> 0.133
ddrmn309 remaindernear 0.1033 1 -> 0.1033
ddrmn310 remaindernear 1.033 1 -> 0.033
ddrmn311 remaindernear 10.33 1 -> 0.33
ddrmn312 remaindernear 10.33 10 -> 0.33
ddrmn313 remaindernear 103.3 1 -> 0.3
ddrmn314 remaindernear 133 10 -> 3
ddrmn315 remaindernear 1033 10 -> 3
ddrmn316 remaindernear 1033 50 -> -17
ddrmn317 remaindernear 101.0 3 -> -1.0
ddrmn318 remaindernear 102.0 3 -> 0.0
ddrmn319 remaindernear 103.0 3 -> 1.0
ddrmn320 remaindernear 2.40 1 -> 0.40
ddrmn321 remaindernear 2.400 1 -> 0.400
ddrmn322 remaindernear 2.4 1 -> 0.4
ddrmn323 remaindernear 2.4 2 -> 0.4
ddrmn324 remaindernear 2.400 2 -> 0.400
ddrmn325 remaindernear 1 0.3 -> 0.1
ddrmn326 remaindernear 1 0.30 -> 0.10
ddrmn327 remaindernear 1 0.300 -> 0.100
ddrmn328 remaindernear 1 0.3000 -> 0.1000
ddrmn329 remaindernear 1.0 0.3 -> 0.1
ddrmn330 remaindernear 1.00 0.3 -> 0.10
ddrmn331 remaindernear 1.000 0.3 -> 0.100
ddrmn332 remaindernear 1.0000 0.3 -> 0.1000
ddrmn333 remaindernear 0.5 2 -> 0.5
ddrmn334 remaindernear 0.5 2.1 -> 0.5
ddrmn335 remaindernear 0.5 2.01 -> 0.50
ddrmn336 remaindernear 0.5 2.001 -> 0.500
ddrmn337 remaindernear 0.50 2 -> 0.50
ddrmn338 remaindernear 0.50 2.01 -> 0.50
ddrmn339 remaindernear 0.50 2.001 -> 0.500
ddrmn340 remaindernear 0.5 0.5000001 -> -1E-7
ddrmn341 remaindernear 0.5 0.50000001 -> -1E-8
ddrmn342 remaindernear 0.5 0.500000001 -> -1E-9
ddrmn343 remaindernear 0.5 0.5000000001 -> -1E-10
ddrmn344 remaindernear 0.5 0.50000000001 -> -1E-11
ddrmn345 remaindernear 0.5 0.4999999 -> 1E-7
ddrmn346 remaindernear 0.5 0.49999999 -> 1E-8
ddrmn347 remaindernear 0.5 0.499999999 -> 1E-9
ddrmn348 remaindernear 0.5 0.4999999999 -> 1E-10
ddrmn349 remaindernear 0.5 0.49999999999 -> 1E-11
ddrmn350 remaindernear 0.5 0.499999999999 -> 1E-12
ddrmn351 remaindernear 0.03 7 -> 0.03
ddrmn352 remaindernear 5 2 -> 1
ddrmn353 remaindernear 4.1 2 -> 0.1
ddrmn354 remaindernear 4.01 2 -> 0.01
ddrmn355 remaindernear 4.001 2 -> 0.001
ddrmn356 remaindernear 4.0001 2 -> 0.0001
ddrmn357 remaindernear 4.00001 2 -> 0.00001
ddrmn358 remaindernear 4.000001 2 -> 0.000001
ddrmn359 remaindernear 4.0000001 2 -> 1E-7
ddrmn360 remaindernear 1.2 0.7345 -> -0.2690
ddrmn361 remaindernear 0.8 12 -> 0.8
ddrmn362 remaindernear 0.8 0.2 -> 0.0
ddrmn363 remaindernear 0.8 0.3 -> -0.1
ddrmn364 remaindernear 0.800 12 -> 0.800
ddrmn365 remaindernear 0.800 1.7 -> 0.800
ddrmn366 remaindernear 2.400 2 -> 0.400
-- round to even
ddrmn371 remaindernear 121 2 -> 1
ddrmn372 remaindernear 122 2 -> 0
ddrmn373 remaindernear 123 2 -> -1
ddrmn374 remaindernear 124 2 -> 0
ddrmn375 remaindernear 125 2 -> 1
ddrmn376 remaindernear 126 2 -> 0
ddrmn377 remaindernear 127 2 -> -1
ddrmn381 remaindernear 12345 1 -> 0
ddrmn382 remaindernear 12345 1.0001 -> -0.2344
ddrmn383 remaindernear 12345 1.001 -> -0.333
ddrmn384 remaindernear 12345 1.01 -> -0.23
ddrmn385 remaindernear 12345 1.1 -> -0.3
ddrmn386 remaindernear 12355 4 -> -1
ddrmn387 remaindernear 12345 4 -> 1
ddrmn388 remaindernear 12355 4.0001 -> -1.3089
ddrmn389 remaindernear 12345 4.0001 -> 0.6914
ddrmn390 remaindernear 12345 4.9 -> 1.9
ddrmn391 remaindernear 12345 4.99 -> -0.26
ddrmn392 remaindernear 12345 4.999 -> 2.469
ddrmn393 remaindernear 12345 4.9999 -> 0.2469
ddrmn394 remaindernear 12345 5 -> 0
ddrmn395 remaindernear 12345 5.0001 -> -0.2469
ddrmn396 remaindernear 12345 5.001 -> -2.469
ddrmn397 remaindernear 12345 5.01 -> 0.36
ddrmn398 remaindernear 12345 5.1 -> -2.1
-- the nasty division-by-1 cases
ddrmn401 remaindernear 0.4 1 -> 0.4
ddrmn402 remaindernear 0.45 1 -> 0.45
ddrmn403 remaindernear 0.455 1 -> 0.455
ddrmn404 remaindernear 0.4555 1 -> 0.4555
ddrmn405 remaindernear 0.45555 1 -> 0.45555
ddrmn406 remaindernear 0.455555 1 -> 0.455555
ddrmn407 remaindernear 0.4555555 1 -> 0.4555555
ddrmn408 remaindernear 0.45555555 1 -> 0.45555555
ddrmn409 remaindernear 0.455555555 1 -> 0.455555555
-- with spill... [412 exercises sticktab loop]
ddrmn411 remaindernear 0.5 1 -> 0.5
ddrmn412 remaindernear 0.55 1 -> -0.45
ddrmn413 remaindernear 0.555 1 -> -0.445
ddrmn414 remaindernear 0.5555 1 -> -0.4445
ddrmn415 remaindernear 0.55555 1 -> -0.44445
ddrmn416 remaindernear 0.555555 1 -> -0.444445
ddrmn417 remaindernear 0.5555555 1 -> -0.4444445
ddrmn418 remaindernear 0.55555555 1 -> -0.44444445
ddrmn419 remaindernear 0.555555555 1 -> -0.444444445
-- folddowns
ddrmn421 remaindernear 1E+384 1 -> NaN Division_impossible
ddrmn422 remaindernear 1E+384 1E+383 -> 0E+369 Clamped
ddrmn423 remaindernear 1E+384 2E+383 -> 0E+369 Clamped
ddrmn424 remaindernear 1E+384 3E+383 -> 1.00000000000000E+383 Clamped
ddrmn425 remaindernear 1E+384 4E+383 -> 2.00000000000000E+383 Clamped
ddrmn426 remaindernear 1E+384 5E+383 -> 0E+369 Clamped
ddrmn427 remaindernear 1E+384 6E+383 -> -2.00000000000000E+383 Clamped
ddrmn428 remaindernear 1E+384 7E+383 -> 3.00000000000000E+383 Clamped
ddrmn429 remaindernear 1E+384 8E+383 -> 2.00000000000000E+383 Clamped
ddrmn430 remaindernear 1E+384 9E+383 -> 1.00000000000000E+383 Clamped
-- tinies
ddrmn431 remaindernear 1E-397 1E-398 -> 0E-398
ddrmn432 remaindernear 1E-397 2E-398 -> 0E-398
ddrmn433 remaindernear 1E-397 3E-398 -> 1E-398 Subnormal
ddrmn434 remaindernear 1E-397 4E-398 -> 2E-398 Subnormal
ddrmn435 remaindernear 1E-397 5E-398 -> 0E-398
ddrmn436 remaindernear 1E-397 6E-398 -> -2E-398 Subnormal
ddrmn437 remaindernear 1E-397 7E-398 -> 3E-398 Subnormal
ddrmn438 remaindernear 1E-397 8E-398 -> 2E-398 Subnormal
ddrmn439 remaindernear 1E-397 9E-398 -> 1E-398 Subnormal
ddrmn440 remaindernear 1E-397 10E-398 -> 0E-398
ddrmn441 remaindernear 1E-397 11E-398 -> -1E-398 Subnormal
ddrmn442 remaindernear 100E-397 11E-398 -> -1E-398 Subnormal
ddrmn443 remaindernear 100E-397 20E-398 -> 0E-398
ddrmn444 remaindernear 100E-397 21E-398 -> -8E-398 Subnormal
ddrmn445 remaindernear 100E-397 30E-398 -> 1.0E-397 Subnormal
-- zero signs
ddrmn650 remaindernear 1 1 -> 0
ddrmn651 remaindernear -1 1 -> -0
ddrmn652 remaindernear 1 -1 -> 0
ddrmn653 remaindernear -1 -1 -> -0
ddrmn654 remaindernear 0 1 -> 0
ddrmn655 remaindernear -0 1 -> -0
ddrmn656 remaindernear 0 -1 -> 0
ddrmn657 remaindernear -0 -1 -> -0
ddrmn658 remaindernear 0.00 1 -> 0.00
ddrmn659 remaindernear -0.00 1 -> -0.00
-- Specials
ddrmn680 remaindernear Inf -Inf -> NaN Invalid_operation
ddrmn681 remaindernear Inf -1000 -> NaN Invalid_operation
ddrmn682 remaindernear Inf -1 -> NaN Invalid_operation
ddrmn683 remaindernear Inf 0 -> NaN Invalid_operation
ddrmn684 remaindernear Inf -0 -> NaN Invalid_operation
ddrmn685 remaindernear Inf 1 -> NaN Invalid_operation
ddrmn686 remaindernear Inf 1000 -> NaN Invalid_operation
ddrmn687 remaindernear Inf Inf -> NaN Invalid_operation
ddrmn688 remaindernear -1000 Inf -> -1000
ddrmn689 remaindernear -Inf Inf -> NaN Invalid_operation
ddrmn691 remaindernear -1 Inf -> -1
ddrmn692 remaindernear 0 Inf -> 0
ddrmn693 remaindernear -0 Inf -> -0
ddrmn694 remaindernear 1 Inf -> 1
ddrmn695 remaindernear 1000 Inf -> 1000
ddrmn696 remaindernear Inf Inf -> NaN Invalid_operation
ddrmn700 remaindernear -Inf -Inf -> NaN Invalid_operation
ddrmn701 remaindernear -Inf -1000 -> NaN Invalid_operation
ddrmn702 remaindernear -Inf -1 -> NaN Invalid_operation
ddrmn703 remaindernear -Inf -0 -> NaN Invalid_operation
ddrmn704 remaindernear -Inf 0 -> NaN Invalid_operation
ddrmn705 remaindernear -Inf 1 -> NaN Invalid_operation
ddrmn706 remaindernear -Inf 1000 -> NaN Invalid_operation
ddrmn707 remaindernear -Inf Inf -> NaN Invalid_operation
ddrmn708 remaindernear -Inf -Inf -> NaN Invalid_operation
ddrmn709 remaindernear -1000 Inf -> -1000
ddrmn710 remaindernear -1 -Inf -> -1
ddrmn711 remaindernear -0 -Inf -> -0
ddrmn712 remaindernear 0 -Inf -> 0
ddrmn713 remaindernear 1 -Inf -> 1
ddrmn714 remaindernear 1000 -Inf -> 1000
ddrmn715 remaindernear Inf -Inf -> NaN Invalid_operation
ddrmn721 remaindernear NaN -Inf -> NaN
ddrmn722 remaindernear NaN -1000 -> NaN
ddrmn723 remaindernear NaN -1 -> NaN
ddrmn724 remaindernear NaN -0 -> NaN
ddrmn725 remaindernear -NaN 0 -> -NaN
ddrmn726 remaindernear NaN 1 -> NaN
ddrmn727 remaindernear NaN 1000 -> NaN
ddrmn728 remaindernear NaN Inf -> NaN
ddrmn729 remaindernear NaN -NaN -> NaN
ddrmn730 remaindernear -Inf NaN -> NaN
ddrmn731 remaindernear -1000 NaN -> NaN
ddrmn732 remaindernear -1 NaN -> NaN
ddrmn733 remaindernear -0 -NaN -> -NaN
ddrmn734 remaindernear 0 NaN -> NaN
ddrmn735 remaindernear 1 -NaN -> -NaN
ddrmn736 remaindernear 1000 NaN -> NaN
ddrmn737 remaindernear Inf NaN -> NaN
ddrmn741 remaindernear sNaN -Inf -> NaN Invalid_operation
ddrmn742 remaindernear sNaN -1000 -> NaN Invalid_operation
ddrmn743 remaindernear -sNaN -1 -> -NaN Invalid_operation
ddrmn744 remaindernear sNaN -0 -> NaN Invalid_operation
ddrmn745 remaindernear sNaN 0 -> NaN Invalid_operation
ddrmn746 remaindernear sNaN 1 -> NaN Invalid_operation
ddrmn747 remaindernear sNaN 1000 -> NaN Invalid_operation
ddrmn749 remaindernear sNaN NaN -> NaN Invalid_operation
ddrmn750 remaindernear sNaN sNaN -> NaN Invalid_operation
ddrmn751 remaindernear NaN sNaN -> NaN Invalid_operation
ddrmn752 remaindernear -Inf sNaN -> NaN Invalid_operation
ddrmn753 remaindernear -1000 sNaN -> NaN Invalid_operation
ddrmn754 remaindernear -1 sNaN -> NaN Invalid_operation
ddrmn755 remaindernear -0 sNaN -> NaN Invalid_operation
ddrmn756 remaindernear 0 sNaN -> NaN Invalid_operation
ddrmn757 remaindernear 1 sNaN -> NaN Invalid_operation
ddrmn758 remaindernear 1000 sNaN -> NaN Invalid_operation
ddrmn759 remaindernear Inf -sNaN -> -NaN Invalid_operation
-- propagating NaNs
ddrmn760 remaindernear NaN1 NaN7 -> NaN1
ddrmn761 remaindernear sNaN2 NaN8 -> NaN2 Invalid_operation
ddrmn762 remaindernear NaN3 sNaN9 -> NaN9 Invalid_operation
ddrmn763 remaindernear sNaN4 sNaN10 -> NaN4 Invalid_operation
ddrmn764 remaindernear 15 NaN11 -> NaN11
ddrmn765 remaindernear NaN6 NaN12 -> NaN6
ddrmn766 remaindernear Inf NaN13 -> NaN13
ddrmn767 remaindernear NaN14 -Inf -> NaN14
ddrmn768 remaindernear 0 NaN15 -> NaN15
ddrmn769 remaindernear NaN16 -0 -> NaN16
-- edge cases of impossible
ddrmn770 remaindernear 1234567890123456 10 -> -4
ddrmn771 remaindernear 1234567890123456 1 -> 0
ddrmn772 remaindernear 1234567890123456 0.1 -> NaN Division_impossible
ddrmn773 remaindernear 1234567890123456 0.01 -> NaN Division_impossible
-- long operand checks
ddrmn801 remaindernear 12345678000 100 -> 0
ddrmn802 remaindernear 1 12345678000 -> 1
ddrmn803 remaindernear 1234567800 10 -> 0
ddrmn804 remaindernear 1 1234567800 -> 1
ddrmn805 remaindernear 1234567890 10 -> 0
ddrmn806 remaindernear 1 1234567890 -> 1
ddrmn807 remaindernear 1234567891 10 -> 1
ddrmn808 remaindernear 1 1234567891 -> 1
ddrmn809 remaindernear 12345678901 100 -> 1
ddrmn810 remaindernear 1 12345678901 -> 1
ddrmn811 remaindernear 1234567896 10 -> -4
ddrmn812 remaindernear 1 1234567896 -> 1
ddrmn821 remaindernear 12345678000 100 -> 0
ddrmn822 remaindernear 1 12345678000 -> 1
ddrmn823 remaindernear 1234567800 10 -> 0
ddrmn824 remaindernear 1 1234567800 -> 1
ddrmn825 remaindernear 1234567890 10 -> 0
ddrmn826 remaindernear 1 1234567890 -> 1
ddrmn827 remaindernear 1234567891 10 -> 1
ddrmn828 remaindernear 1 1234567891 -> 1
ddrmn829 remaindernear 12345678901 100 -> 1
ddrmn830 remaindernear 1 12345678901 -> 1
ddrmn831 remaindernear 1234567896 10 -> -4
ddrmn832 remaindernear 1 1234567896 -> 1
-- from divideint
ddrmn840 remaindernear 100000000.0 1 -> 0.0
ddrmn841 remaindernear 100000000.4 1 -> 0.4
ddrmn842 remaindernear 100000000.5 1 -> 0.5
ddrmn843 remaindernear 100000000.9 1 -> -0.1
ddrmn844 remaindernear 100000000.999 1 -> -0.001
ddrmn850 remaindernear 100000003 5 -> -2
ddrmn851 remaindernear 10000003 5 -> -2
ddrmn852 remaindernear 1000003 5 -> -2
ddrmn853 remaindernear 100003 5 -> -2
ddrmn854 remaindernear 10003 5 -> -2
ddrmn855 remaindernear 1003 5 -> -2
ddrmn856 remaindernear 103 5 -> -2
ddrmn857 remaindernear 13 5 -> -2
ddrmn858 remaindernear 1 5 -> 1
-- Vladimir's cases 1234567890123456
ddrmn860 remaindernear 123.0e1 1000000000000000 -> 1230
ddrmn861 remaindernear 1230 1000000000000000 -> 1230
ddrmn862 remaindernear 12.3e2 1000000000000000 -> 1230
ddrmn863 remaindernear 1.23e3 1000000000000000 -> 1230
ddrmn864 remaindernear 123e1 1000000000000000 -> 1230
ddrmn870 remaindernear 123e1 1000000000000000 -> 1230
ddrmn871 remaindernear 123e1 100000000000000 -> 1230
ddrmn872 remaindernear 123e1 10000000000000 -> 1230
ddrmn873 remaindernear 123e1 1000000000000 -> 1230
ddrmn874 remaindernear 123e1 100000000000 -> 1230
ddrmn875 remaindernear 123e1 10000000000 -> 1230
ddrmn876 remaindernear 123e1 1000000000 -> 1230
ddrmn877 remaindernear 123e1 100000000 -> 1230
ddrmn878 remaindernear 1230 100000000 -> 1230
ddrmn879 remaindernear 123e1 10000000 -> 1230
ddrmn880 remaindernear 123e1 1000000 -> 1230
ddrmn881 remaindernear 123e1 100000 -> 1230
ddrmn882 remaindernear 123e1 10000 -> 1230
ddrmn883 remaindernear 123e1 1000 -> 230
ddrmn884 remaindernear 123e1 100 -> 30
ddrmn885 remaindernear 123e1 10 -> 0
ddrmn886 remaindernear 123e1 1 -> 0
ddrmn890 remaindernear 123e1 2000000000000000 -> 1230
ddrmn891 remaindernear 123e1 200000000000000 -> 1230
ddrmn892 remaindernear 123e1 20000000000000 -> 1230
ddrmn893 remaindernear 123e1 2000000000000 -> 1230
ddrmn894 remaindernear 123e1 200000000000 -> 1230
ddrmn895 remaindernear 123e1 20000000000 -> 1230
ddrmn896 remaindernear 123e1 2000000000 -> 1230
ddrmn897 remaindernear 123e1 200000000 -> 1230
ddrmn899 remaindernear 123e1 20000000 -> 1230
ddrmn900 remaindernear 123e1 2000000 -> 1230
ddrmn901 remaindernear 123e1 200000 -> 1230
ddrmn902 remaindernear 123e1 20000 -> 1230
ddrmn903 remaindernear 123e1 2000 -> -770
ddrmn904 remaindernear 123e1 200 -> 30
ddrmn905 remaindernear 123e1 20 -> -10
ddrmn906 remaindernear 123e1 2 -> 0
ddrmn910 remaindernear 123e1 5000000000000000 -> 1230
ddrmn911 remaindernear 123e1 500000000000000 -> 1230
ddrmn912 remaindernear 123e1 50000000000000 -> 1230
ddrmn913 remaindernear 123e1 5000000000000 -> 1230
ddrmn914 remaindernear 123e1 500000000000 -> 1230
ddrmn915 remaindernear 123e1 50000000000 -> 1230
ddrmn916 remaindernear 123e1 5000000000 -> 1230
ddrmn917 remaindernear 123e1 500000000 -> 1230
ddrmn919 remaindernear 123e1 50000000 -> 1230
ddrmn920 remaindernear 123e1 5000000 -> 1230
ddrmn921 remaindernear 123e1 500000 -> 1230
ddrmn922 remaindernear 123e1 50000 -> 1230
ddrmn923 remaindernear 123e1 5000 -> 1230
ddrmn924 remaindernear 123e1 500 -> 230
ddrmn925 remaindernear 123e1 50 -> -20
ddrmn926 remaindernear 123e1 5 -> 0
ddrmn930 remaindernear 123e1 9000000000000000 -> 1230
ddrmn931 remaindernear 123e1 900000000000000 -> 1230
ddrmn932 remaindernear 123e1 90000000000000 -> 1230
ddrmn933 remaindernear 123e1 9000000000000 -> 1230
ddrmn934 remaindernear 123e1 900000000000 -> 1230
ddrmn935 remaindernear 123e1 90000000000 -> 1230
ddrmn936 remaindernear 123e1 9000000000 -> 1230
ddrmn937 remaindernear 123e1 900000000 -> 1230
ddrmn939 remaindernear 123e1 90000000 -> 1230
ddrmn940 remaindernear 123e1 9000000 -> 1230
ddrmn941 remaindernear 123e1 900000 -> 1230
ddrmn942 remaindernear 123e1 90000 -> 1230
ddrmn943 remaindernear 123e1 9000 -> 1230
ddrmn944 remaindernear 123e1 900 -> 330
ddrmn945 remaindernear 123e1 90 -> -30
ddrmn946 remaindernear 123e1 9 -> -3
ddrmn950 remaindernear 123e1 1000000000000000 -> 1230
ddrmn961 remaindernear 123e1 2999999999999999 -> 1230
ddrmn962 remaindernear 123e1 3999999999999999 -> 1230
ddrmn963 remaindernear 123e1 4999999999999999 -> 1230
ddrmn964 remaindernear 123e1 5999999999999999 -> 1230
ddrmn965 remaindernear 123e1 6999999999999999 -> 1230
ddrmn966 remaindernear 123e1 7999999999999999 -> 1230
ddrmn967 remaindernear 123e1 8999999999999999 -> 1230
ddrmn968 remaindernear 123e1 9999999999999999 -> 1230
ddrmn969 remaindernear 123e1 9876543210987654 -> 1230
ddrmn980 remaindernear 123e1 1000E299 -> 1.23E+3 -- 123E+1 internally
-- overflow and underflow tests [from divide]
ddrmn1051 remaindernear 1e+277 1e-311 -> NaN Division_impossible
ddrmn1052 remaindernear 1e+277 -1e-311 -> NaN Division_impossible
ddrmn1053 remaindernear -1e+277 1e-311 -> NaN Division_impossible
ddrmn1054 remaindernear -1e+277 -1e-311 -> NaN Division_impossible
ddrmn1055 remaindernear 1e-277 1e+311 -> 1E-277
ddrmn1056 remaindernear 1e-277 -1e+311 -> 1E-277
ddrmn1057 remaindernear -1e-277 1e+311 -> -1E-277
ddrmn1058 remaindernear -1e-277 -1e+311 -> -1E-277
-- destructive subtract
ddrmn1100 remainderNear 1234567890123456 1.000000000000001 -> -0.234567890123455
ddrmn1101 remainderNear 1234567890123456 1.00000000000001 -> -0.34567890123444
ddrmn1102 remainderNear 1234567890123456 1.0000000000001 -> -0.4567890123333
ddrmn1103 remainderNear 1234567890123455 4.000000000000001 -> -1.308641972530864
ddrmn1104 remainderNear 1234567890123456 4.000000000000001 -> -0.308641972530864
ddrmn1115 remainderNear 1234567890123456 4.9999999999999 -> 0.6913578024696
ddrmn1116 remainderNear 1234567890123456 4.99999999999999 -> -1.53086421975308
ddrmn1117 remainderNear 1234567890123456 4.999999999999999 -> 1.246913578024691
ddrmn1118 remainderNear 1234567890123456 5.000000000000001 -> 0.753086421975309
ddrmn1119 remainderNear 1234567890123456 5.00000000000001 -> -1.46913578024691
ddrmn1110 remainderNear 1234567890123456 5.0000000000001 -> 1.3086421975314
-- Null tests
ddrmn1000 remaindernear 10 # -> NaN Invalid_operation
ddrmn1001 remaindernear # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,262 @@
------------------------------------------------------------------------
-- ddRotate.decTest -- rotate a decDouble coefficient left or right --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check
ddrot001 rotate 0 0 -> 0
ddrot002 rotate 0 2 -> 0
ddrot003 rotate 1 2 -> 100
ddrot004 rotate 1 15 -> 1000000000000000
ddrot005 rotate 1 16 -> 1
ddrot006 rotate 1 -1 -> 1000000000000000
ddrot007 rotate 0 -2 -> 0
ddrot008 rotate 1234567890123456 -1 -> 6123456789012345
ddrot009 rotate 1234567890123456 -15 -> 2345678901234561
ddrot010 rotate 1234567890123456 -16 -> 1234567890123456
ddrot011 rotate 9934567890123456 -15 -> 9345678901234569
ddrot012 rotate 9934567890123456 -16 -> 9934567890123456
-- rhs must be an integer
ddrot015 rotate 1 1.5 -> NaN Invalid_operation
ddrot016 rotate 1 1.0 -> NaN Invalid_operation
ddrot017 rotate 1 0.1 -> NaN Invalid_operation
ddrot018 rotate 1 0.0 -> NaN Invalid_operation
ddrot019 rotate 1 1E+1 -> NaN Invalid_operation
ddrot020 rotate 1 1E+99 -> NaN Invalid_operation
ddrot021 rotate 1 Inf -> NaN Invalid_operation
ddrot022 rotate 1 -Inf -> NaN Invalid_operation
-- and |rhs| <= precision
ddrot025 rotate 1 -1000 -> NaN Invalid_operation
ddrot026 rotate 1 -17 -> NaN Invalid_operation
ddrot027 rotate 1 17 -> NaN Invalid_operation
ddrot028 rotate 1 1000 -> NaN Invalid_operation
-- full pattern
ddrot030 rotate 1234567890123456 -16 -> 1234567890123456
ddrot031 rotate 1234567890123456 -15 -> 2345678901234561
ddrot032 rotate 1234567890123456 -14 -> 3456789012345612
ddrot033 rotate 1234567890123456 -13 -> 4567890123456123
ddrot034 rotate 1234567890123456 -12 -> 5678901234561234
ddrot035 rotate 1234567890123456 -11 -> 6789012345612345
ddrot036 rotate 1234567890123456 -10 -> 7890123456123456
ddrot037 rotate 1234567890123456 -9 -> 8901234561234567
ddrot038 rotate 1234567890123456 -8 -> 9012345612345678
ddrot039 rotate 1234567890123456 -7 -> 123456123456789
ddrot040 rotate 1234567890123456 -6 -> 1234561234567890
ddrot041 rotate 1234567890123456 -5 -> 2345612345678901
ddrot042 rotate 1234567890123456 -4 -> 3456123456789012
ddrot043 rotate 1234567890123456 -3 -> 4561234567890123
ddrot044 rotate 1234567890123456 -2 -> 5612345678901234
ddrot045 rotate 1234567890123456 -1 -> 6123456789012345
ddrot046 rotate 1234567890123456 -0 -> 1234567890123456
ddrot047 rotate 1234567890123456 +0 -> 1234567890123456
ddrot048 rotate 1234567890123456 +1 -> 2345678901234561
ddrot049 rotate 1234567890123456 +2 -> 3456789012345612
ddrot050 rotate 1234567890123456 +3 -> 4567890123456123
ddrot051 rotate 1234567890123456 +4 -> 5678901234561234
ddrot052 rotate 1234567890123456 +5 -> 6789012345612345
ddrot053 rotate 1234567890123456 +6 -> 7890123456123456
ddrot054 rotate 1234567890123456 +7 -> 8901234561234567
ddrot055 rotate 1234567890123456 +8 -> 9012345612345678
ddrot056 rotate 1234567890123456 +9 -> 123456123456789
ddrot057 rotate 1234567890123456 +10 -> 1234561234567890
ddrot058 rotate 1234567890123456 +11 -> 2345612345678901
ddrot059 rotate 1234567890123456 +12 -> 3456123456789012
ddrot060 rotate 1234567890123456 +13 -> 4561234567890123
ddrot061 rotate 1234567890123456 +14 -> 5612345678901234
ddrot062 rotate 1234567890123456 +15 -> 6123456789012345
ddrot063 rotate 1234567890123456 +16 -> 1234567890123456
-- zeros
ddrot070 rotate 0E-10 +9 -> 0E-10
ddrot071 rotate 0E-10 -9 -> 0E-10
ddrot072 rotate 0.000 +9 -> 0.000
ddrot073 rotate 0.000 -9 -> 0.000
ddrot074 rotate 0E+10 +9 -> 0E+10
ddrot075 rotate 0E+10 -9 -> 0E+10
ddrot076 rotate -0E-10 +9 -> -0E-10
ddrot077 rotate -0E-10 -9 -> -0E-10
ddrot078 rotate -0.000 +9 -> -0.000
ddrot079 rotate -0.000 -9 -> -0.000
ddrot080 rotate -0E+10 +9 -> -0E+10
ddrot081 rotate -0E+10 -9 -> -0E+10
-- Nmax, Nmin, Ntiny
ddrot141 rotate 9.999999999999999E+384 -1 -> 9.999999999999999E+384
ddrot142 rotate 9.999999999999999E+384 -15 -> 9.999999999999999E+384
ddrot143 rotate 9.999999999999999E+384 1 -> 9.999999999999999E+384
ddrot144 rotate 9.999999999999999E+384 15 -> 9.999999999999999E+384
ddrot145 rotate 1E-383 -1 -> 1.000000000000000E-368
ddrot146 rotate 1E-383 -15 -> 1.0E-382
ddrot147 rotate 1E-383 1 -> 1.0E-382
ddrot148 rotate 1E-383 15 -> 1.000000000000000E-368
ddrot151 rotate 1.000000000000000E-383 -1 -> 1.00000000000000E-384
ddrot152 rotate 1.000000000000000E-383 -15 -> 1E-398
ddrot153 rotate 1.000000000000000E-383 1 -> 1E-398
ddrot154 rotate 1.000000000000000E-383 15 -> 1.00000000000000E-384
ddrot155 rotate 9.000000000000000E-383 -1 -> 9.00000000000000E-384
ddrot156 rotate 9.000000000000000E-383 -15 -> 9E-398
ddrot157 rotate 9.000000000000000E-383 1 -> 9E-398
ddrot158 rotate 9.000000000000000E-383 15 -> 9.00000000000000E-384
ddrot160 rotate 1E-398 -1 -> 1.000000000000000E-383
ddrot161 rotate 1E-398 -15 -> 1.0E-397
ddrot162 rotate 1E-398 1 -> 1.0E-397
ddrot163 rotate 1E-398 15 -> 1.000000000000000E-383
-- negatives
ddrot171 rotate -9.999999999999999E+384 -1 -> -9.999999999999999E+384
ddrot172 rotate -9.999999999999999E+384 -15 -> -9.999999999999999E+384
ddrot173 rotate -9.999999999999999E+384 1 -> -9.999999999999999E+384
ddrot174 rotate -9.999999999999999E+384 15 -> -9.999999999999999E+384
ddrot175 rotate -1E-383 -1 -> -1.000000000000000E-368
ddrot176 rotate -1E-383 -15 -> -1.0E-382
ddrot177 rotate -1E-383 1 -> -1.0E-382
ddrot178 rotate -1E-383 15 -> -1.000000000000000E-368
ddrot181 rotate -1.000000000000000E-383 -1 -> -1.00000000000000E-384
ddrot182 rotate -1.000000000000000E-383 -15 -> -1E-398
ddrot183 rotate -1.000000000000000E-383 1 -> -1E-398
ddrot184 rotate -1.000000000000000E-383 15 -> -1.00000000000000E-384
ddrot185 rotate -9.000000000000000E-383 -1 -> -9.00000000000000E-384
ddrot186 rotate -9.000000000000000E-383 -15 -> -9E-398
ddrot187 rotate -9.000000000000000E-383 1 -> -9E-398
ddrot188 rotate -9.000000000000000E-383 15 -> -9.00000000000000E-384
ddrot190 rotate -1E-398 -1 -> -1.000000000000000E-383
ddrot191 rotate -1E-398 -15 -> -1.0E-397
ddrot192 rotate -1E-398 1 -> -1.0E-397
ddrot193 rotate -1E-398 15 -> -1.000000000000000E-383
-- more negatives (of sanities)
ddrot201 rotate -0 0 -> -0
ddrot202 rotate -0 2 -> -0
ddrot203 rotate -1 2 -> -100
ddrot204 rotate -1 15 -> -1000000000000000
ddrot205 rotate -1 16 -> -1
ddrot206 rotate -1 -1 -> -1000000000000000
ddrot207 rotate -0 -2 -> -0
ddrot208 rotate -1234567890123456 -1 -> -6123456789012345
ddrot209 rotate -1234567890123456 -15 -> -2345678901234561
ddrot210 rotate -1234567890123456 -16 -> -1234567890123456
ddrot211 rotate -9934567890123456 -15 -> -9345678901234569
ddrot212 rotate -9934567890123456 -16 -> -9934567890123456
-- Specials; NaNs are handled as usual
ddrot781 rotate -Inf -8 -> -Infinity
ddrot782 rotate -Inf -1 -> -Infinity
ddrot783 rotate -Inf -0 -> -Infinity
ddrot784 rotate -Inf 0 -> -Infinity
ddrot785 rotate -Inf 1 -> -Infinity
ddrot786 rotate -Inf 8 -> -Infinity
ddrot787 rotate -1000 -Inf -> NaN Invalid_operation
ddrot788 rotate -Inf -Inf -> NaN Invalid_operation
ddrot789 rotate -1 -Inf -> NaN Invalid_operation
ddrot790 rotate -0 -Inf -> NaN Invalid_operation
ddrot791 rotate 0 -Inf -> NaN Invalid_operation
ddrot792 rotate 1 -Inf -> NaN Invalid_operation
ddrot793 rotate 1000 -Inf -> NaN Invalid_operation
ddrot794 rotate Inf -Inf -> NaN Invalid_operation
ddrot800 rotate Inf -Inf -> NaN Invalid_operation
ddrot801 rotate Inf -8 -> Infinity
ddrot802 rotate Inf -1 -> Infinity
ddrot803 rotate Inf -0 -> Infinity
ddrot804 rotate Inf 0 -> Infinity
ddrot805 rotate Inf 1 -> Infinity
ddrot806 rotate Inf 8 -> Infinity
ddrot807 rotate Inf Inf -> NaN Invalid_operation
ddrot808 rotate -1000 Inf -> NaN Invalid_operation
ddrot809 rotate -Inf Inf -> NaN Invalid_operation
ddrot810 rotate -1 Inf -> NaN Invalid_operation
ddrot811 rotate -0 Inf -> NaN Invalid_operation
ddrot812 rotate 0 Inf -> NaN Invalid_operation
ddrot813 rotate 1 Inf -> NaN Invalid_operation
ddrot814 rotate 1000 Inf -> NaN Invalid_operation
ddrot815 rotate Inf Inf -> NaN Invalid_operation
ddrot821 rotate NaN -Inf -> NaN
ddrot822 rotate NaN -1000 -> NaN
ddrot823 rotate NaN -1 -> NaN
ddrot824 rotate NaN -0 -> NaN
ddrot825 rotate NaN 0 -> NaN
ddrot826 rotate NaN 1 -> NaN
ddrot827 rotate NaN 1000 -> NaN
ddrot828 rotate NaN Inf -> NaN
ddrot829 rotate NaN NaN -> NaN
ddrot830 rotate -Inf NaN -> NaN
ddrot831 rotate -1000 NaN -> NaN
ddrot832 rotate -1 NaN -> NaN
ddrot833 rotate -0 NaN -> NaN
ddrot834 rotate 0 NaN -> NaN
ddrot835 rotate 1 NaN -> NaN
ddrot836 rotate 1000 NaN -> NaN
ddrot837 rotate Inf NaN -> NaN
ddrot841 rotate sNaN -Inf -> NaN Invalid_operation
ddrot842 rotate sNaN -1000 -> NaN Invalid_operation
ddrot843 rotate sNaN -1 -> NaN Invalid_operation
ddrot844 rotate sNaN -0 -> NaN Invalid_operation
ddrot845 rotate sNaN 0 -> NaN Invalid_operation
ddrot846 rotate sNaN 1 -> NaN Invalid_operation
ddrot847 rotate sNaN 1000 -> NaN Invalid_operation
ddrot848 rotate sNaN NaN -> NaN Invalid_operation
ddrot849 rotate sNaN sNaN -> NaN Invalid_operation
ddrot850 rotate NaN sNaN -> NaN Invalid_operation
ddrot851 rotate -Inf sNaN -> NaN Invalid_operation
ddrot852 rotate -1000 sNaN -> NaN Invalid_operation
ddrot853 rotate -1 sNaN -> NaN Invalid_operation
ddrot854 rotate -0 sNaN -> NaN Invalid_operation
ddrot855 rotate 0 sNaN -> NaN Invalid_operation
ddrot856 rotate 1 sNaN -> NaN Invalid_operation
ddrot857 rotate 1000 sNaN -> NaN Invalid_operation
ddrot858 rotate Inf sNaN -> NaN Invalid_operation
ddrot859 rotate NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddrot861 rotate NaN1 -Inf -> NaN1
ddrot862 rotate +NaN2 -1000 -> NaN2
ddrot863 rotate NaN3 1000 -> NaN3
ddrot864 rotate NaN4 Inf -> NaN4
ddrot865 rotate NaN5 +NaN6 -> NaN5
ddrot866 rotate -Inf NaN7 -> NaN7
ddrot867 rotate -1000 NaN8 -> NaN8
ddrot868 rotate 1000 NaN9 -> NaN9
ddrot869 rotate Inf +NaN10 -> NaN10
ddrot871 rotate sNaN11 -Inf -> NaN11 Invalid_operation
ddrot872 rotate sNaN12 -1000 -> NaN12 Invalid_operation
ddrot873 rotate sNaN13 1000 -> NaN13 Invalid_operation
ddrot874 rotate sNaN14 NaN17 -> NaN14 Invalid_operation
ddrot875 rotate sNaN15 sNaN18 -> NaN15 Invalid_operation
ddrot876 rotate NaN16 sNaN19 -> NaN19 Invalid_operation
ddrot877 rotate -Inf +sNaN20 -> NaN20 Invalid_operation
ddrot878 rotate -1000 sNaN21 -> NaN21 Invalid_operation
ddrot879 rotate 1000 sNaN22 -> NaN22 Invalid_operation
ddrot880 rotate Inf sNaN23 -> NaN23 Invalid_operation
ddrot881 rotate +NaN25 +sNaN24 -> NaN24 Invalid_operation
ddrot882 rotate -NaN26 NaN28 -> -NaN26
ddrot883 rotate -sNaN27 sNaN29 -> -NaN27 Invalid_operation
ddrot884 rotate 1000 -NaN30 -> -NaN30
ddrot885 rotate 1000 -sNaN31 -> -NaN31 Invalid_operation

View File

@@ -0,0 +1,243 @@
------------------------------------------------------------------------
-- ddScalebB.decTest -- scale a decDouble by powers of 10 --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Max |rhs| is 2*(384+16) = 800
-- Sanity checks
ddscb001 scaleb 7.50 10 -> 7.50E+10
ddscb002 scaleb 7.50 3 -> 7.50E+3
ddscb003 scaleb 7.50 2 -> 750
ddscb004 scaleb 7.50 1 -> 75.0
ddscb005 scaleb 7.50 0 -> 7.50
ddscb006 scaleb 7.50 -1 -> 0.750
ddscb007 scaleb 7.50 -2 -> 0.0750
ddscb008 scaleb 7.50 -10 -> 7.50E-10
ddscb009 scaleb -7.50 3 -> -7.50E+3
ddscb010 scaleb -7.50 2 -> -750
ddscb011 scaleb -7.50 1 -> -75.0
ddscb012 scaleb -7.50 0 -> -7.50
ddscb013 scaleb -7.50 -1 -> -0.750
-- Infinities
ddscb014 scaleb Infinity 1 -> Infinity
ddscb015 scaleb -Infinity 2 -> -Infinity
ddscb016 scaleb Infinity -1 -> Infinity
ddscb017 scaleb -Infinity -2 -> -Infinity
-- Next two are somewhat undefined in 754r; treat as non-integer
ddscb018 scaleb 10 Infinity -> NaN Invalid_operation
ddscb019 scaleb 10 -Infinity -> NaN Invalid_operation
-- NaNs are undefined in 754r; assume usual processing
-- NaNs, 0 payload
ddscb021 scaleb NaN 1 -> NaN
ddscb022 scaleb -NaN -1 -> -NaN
ddscb023 scaleb sNaN 1 -> NaN Invalid_operation
ddscb024 scaleb -sNaN 1 -> -NaN Invalid_operation
ddscb025 scaleb 4 NaN -> NaN
ddscb026 scaleb -Inf -NaN -> -NaN
ddscb027 scaleb 4 sNaN -> NaN Invalid_operation
ddscb028 scaleb Inf -sNaN -> -NaN Invalid_operation
-- non-integer RHS
ddscb030 scaleb 1.23 1 -> 12.3
ddscb031 scaleb 1.23 1.00 -> NaN Invalid_operation
ddscb032 scaleb 1.23 1.1 -> NaN Invalid_operation
ddscb033 scaleb 1.23 1.01 -> NaN Invalid_operation
ddscb034 scaleb 1.23 0.01 -> NaN Invalid_operation
ddscb035 scaleb 1.23 0.11 -> NaN Invalid_operation
ddscb036 scaleb 1.23 0.999999999 -> NaN Invalid_operation
ddscb037 scaleb 1.23 -1 -> 0.123
ddscb038 scaleb 1.23 -1.00 -> NaN Invalid_operation
ddscb039 scaleb 1.23 -1.1 -> NaN Invalid_operation
ddscb040 scaleb 1.23 -1.01 -> NaN Invalid_operation
ddscb041 scaleb 1.23 -0.01 -> NaN Invalid_operation
ddscb042 scaleb 1.23 -0.11 -> NaN Invalid_operation
ddscb043 scaleb 1.23 -0.999999999 -> NaN Invalid_operation
ddscb044 scaleb 1.23 0.1 -> NaN Invalid_operation
ddscb045 scaleb 1.23 1E+1 -> NaN Invalid_operation
ddscb046 scaleb 1.23 1.1234E+6 -> NaN Invalid_operation
ddscb047 scaleb 1.23 1.123E+4 -> NaN Invalid_operation
-- out-of range RHS
ddscb120 scaleb 1.23 799 -> Infinity Overflow Inexact Rounded
ddscb121 scaleb 1.23 800 -> Infinity Overflow Inexact Rounded
ddscb122 scaleb 1.23 801 -> NaN Invalid_operation
ddscb123 scaleb 1.23 802 -> NaN Invalid_operation
ddscb124 scaleb 1.23 -799 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb125 scaleb 1.23 -800 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb126 scaleb 1.23 -801 -> NaN Invalid_operation
ddscb127 scaleb 1.23 -802 -> NaN Invalid_operation
-- NaNs, non-0 payload
-- propagating NaNs
ddscb861 scaleb NaN01 -Inf -> NaN1
ddscb862 scaleb -NaN02 -1000 -> -NaN2
ddscb863 scaleb NaN03 1000 -> NaN3
ddscb864 scaleb NaN04 Inf -> NaN4
ddscb865 scaleb NaN05 NaN61 -> NaN5
ddscb866 scaleb -Inf -NaN71 -> -NaN71
ddscb867 scaleb -1000 NaN81 -> NaN81
ddscb868 scaleb 1000 NaN91 -> NaN91
ddscb869 scaleb Inf NaN101 -> NaN101
ddscb871 scaleb sNaN011 -Inf -> NaN11 Invalid_operation
ddscb872 scaleb sNaN012 -1000 -> NaN12 Invalid_operation
ddscb873 scaleb -sNaN013 1000 -> -NaN13 Invalid_operation
ddscb874 scaleb sNaN014 NaN171 -> NaN14 Invalid_operation
ddscb875 scaleb sNaN015 sNaN181 -> NaN15 Invalid_operation
ddscb876 scaleb NaN016 sNaN191 -> NaN191 Invalid_operation
ddscb877 scaleb -Inf sNaN201 -> NaN201 Invalid_operation
ddscb878 scaleb -1000 sNaN211 -> NaN211 Invalid_operation
ddscb879 scaleb 1000 -sNaN221 -> -NaN221 Invalid_operation
ddscb880 scaleb Inf sNaN231 -> NaN231 Invalid_operation
ddscb881 scaleb NaN025 sNaN241 -> NaN241 Invalid_operation
-- finites
ddscb051 scaleb 7 -2 -> 0.07
ddscb052 scaleb -7 -2 -> -0.07
ddscb053 scaleb 75 -2 -> 0.75
ddscb054 scaleb -75 -2 -> -0.75
ddscb055 scaleb 7.50 -2 -> 0.0750
ddscb056 scaleb -7.50 -2 -> -0.0750
ddscb057 scaleb 7.500 -2 -> 0.07500
ddscb058 scaleb -7.500 -2 -> -0.07500
ddscb061 scaleb 7 -1 -> 0.7
ddscb062 scaleb -7 -1 -> -0.7
ddscb063 scaleb 75 -1 -> 7.5
ddscb064 scaleb -75 -1 -> -7.5
ddscb065 scaleb 7.50 -1 -> 0.750
ddscb066 scaleb -7.50 -1 -> -0.750
ddscb067 scaleb 7.500 -1 -> 0.7500
ddscb068 scaleb -7.500 -1 -> -0.7500
ddscb071 scaleb 7 0 -> 7
ddscb072 scaleb -7 0 -> -7
ddscb073 scaleb 75 0 -> 75
ddscb074 scaleb -75 0 -> -75
ddscb075 scaleb 7.50 0 -> 7.50
ddscb076 scaleb -7.50 0 -> -7.50
ddscb077 scaleb 7.500 0 -> 7.500
ddscb078 scaleb -7.500 0 -> -7.500
ddscb081 scaleb 7 1 -> 7E+1
ddscb082 scaleb -7 1 -> -7E+1
ddscb083 scaleb 75 1 -> 7.5E+2
ddscb084 scaleb -75 1 -> -7.5E+2
ddscb085 scaleb 7.50 1 -> 75.0
ddscb086 scaleb -7.50 1 -> -75.0
ddscb087 scaleb 7.500 1 -> 75.00
ddscb088 scaleb -7.500 1 -> -75.00
ddscb091 scaleb 7 2 -> 7E+2
ddscb092 scaleb -7 2 -> -7E+2
ddscb093 scaleb 75 2 -> 7.5E+3
ddscb094 scaleb -75 2 -> -7.5E+3
ddscb095 scaleb 7.50 2 -> 750
ddscb096 scaleb -7.50 2 -> -750
ddscb097 scaleb 7.500 2 -> 750.0
ddscb098 scaleb -7.500 2 -> -750.0
-- zeros
ddscb111 scaleb 0 1 -> 0E+1
ddscb112 scaleb -0 2 -> -0E+2
ddscb113 scaleb 0E+4 3 -> 0E+7
ddscb114 scaleb -0E+4 4 -> -0E+8
ddscb115 scaleb 0.0000 5 -> 0E+1
ddscb116 scaleb -0.0000 6 -> -0E+2
ddscb117 scaleb 0E-141 7 -> 0E-134
ddscb118 scaleb -0E-141 8 -> -0E-133
-- Nmax, Nmin, Ntiny
ddscb132 scaleb 9.999999999999999E+384 +384 -> Infinity Overflow Inexact Rounded
ddscb133 scaleb 9.999999999999999E+384 +10 -> Infinity Overflow Inexact Rounded
ddscb134 scaleb 9.999999999999999E+384 +1 -> Infinity Overflow Inexact Rounded
ddscb135 scaleb 9.999999999999999E+384 0 -> 9.999999999999999E+384
ddscb136 scaleb 9.999999999999999E+384 -1 -> 9.999999999999999E+383
ddscb137 scaleb 1E-383 +1 -> 1E-382
ddscb138 scaleb 1E-383 -0 -> 1E-383
ddscb139 scaleb 1E-383 -1 -> 1E-384 Subnormal
ddscb140 scaleb 1.000000000000000E-383 +1 -> 1.000000000000000E-382
ddscb141 scaleb 1.000000000000000E-383 0 -> 1.000000000000000E-383
ddscb142 scaleb 1.000000000000000E-383 -1 -> 1.00000000000000E-384 Subnormal Rounded
ddscb143 scaleb 1E-398 +1 -> 1E-397 Subnormal
ddscb144 scaleb 1E-398 -0 -> 1E-398 Subnormal
ddscb145 scaleb 1E-398 -1 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb150 scaleb -1E-398 +1 -> -1E-397 Subnormal
ddscb151 scaleb -1E-398 -0 -> -1E-398 Subnormal
ddscb152 scaleb -1E-398 -1 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb153 scaleb -1.000000000000000E-383 +1 -> -1.000000000000000E-382
ddscb154 scaleb -1.000000000000000E-383 +0 -> -1.000000000000000E-383
ddscb155 scaleb -1.000000000000000E-383 -1 -> -1.00000000000000E-384 Subnormal Rounded
ddscb156 scaleb -1E-383 +1 -> -1E-382
ddscb157 scaleb -1E-383 -0 -> -1E-383
ddscb158 scaleb -1E-383 -1 -> -1E-384 Subnormal
ddscb159 scaleb -9.999999999999999E+384 +1 -> -Infinity Overflow Inexact Rounded
ddscb160 scaleb -9.999999999999999E+384 +0 -> -9.999999999999999E+384
ddscb161 scaleb -9.999999999999999E+384 -1 -> -9.999999999999999E+383
ddscb162 scaleb -9E+384 +1 -> -Infinity Overflow Inexact Rounded
ddscb163 scaleb -1E+384 +1 -> -Infinity Overflow Inexact Rounded
-- some Origami
-- (these check that overflow is being done correctly)
ddscb171 scaleb 1000E+365 +1 -> 1.000E+369
ddscb172 scaleb 1000E+366 +1 -> 1.000E+370
ddscb173 scaleb 1000E+367 +1 -> 1.000E+371
ddscb174 scaleb 1000E+368 +1 -> 1.000E+372
ddscb175 scaleb 1000E+369 +1 -> 1.0000E+373 Clamped
ddscb176 scaleb 1000E+370 +1 -> 1.00000E+374 Clamped
ddscb177 scaleb 1000E+371 +1 -> 1.000000E+375 Clamped
ddscb178 scaleb 1000E+372 +1 -> 1.0000000E+376 Clamped
ddscb179 scaleb 1000E+373 +1 -> 1.00000000E+377 Clamped
ddscb180 scaleb 1000E+374 +1 -> 1.000000000E+378 Clamped
ddscb181 scaleb 1000E+375 +1 -> 1.0000000000E+379 Clamped
ddscb182 scaleb 1000E+376 +1 -> 1.00000000000E+380 Clamped
ddscb183 scaleb 1000E+377 +1 -> 1.000000000000E+381 Clamped
ddscb184 scaleb 1000E+378 +1 -> 1.0000000000000E+382 Clamped
ddscb185 scaleb 1000E+379 +1 -> 1.00000000000000E+383 Clamped
ddscb186 scaleb 1000E+380 +1 -> 1.000000000000000E+384 Clamped
ddscb187 scaleb 1000E+381 +1 -> Infinity Overflow Inexact Rounded
-- and a few more subnormal truncations
-- (these check that underflow is being done correctly)
ddscb201 scaleb 1.000000000000000E-383 0 -> 1.000000000000000E-383
ddscb202 scaleb 1.000000000000000E-383 -1 -> 1.00000000000000E-384 Subnormal Rounded
ddscb203 scaleb 1.000000000000000E-383 -2 -> 1.0000000000000E-385 Subnormal Rounded
ddscb204 scaleb 1.000000000000000E-383 -3 -> 1.000000000000E-386 Subnormal Rounded
ddscb205 scaleb 1.000000000000000E-383 -4 -> 1.00000000000E-387 Subnormal Rounded
ddscb206 scaleb 1.000000000000000E-383 -5 -> 1.0000000000E-388 Subnormal Rounded
ddscb207 scaleb 1.000000000000000E-383 -6 -> 1.000000000E-389 Subnormal Rounded
ddscb208 scaleb 1.000000000000000E-383 -7 -> 1.00000000E-390 Subnormal Rounded
ddscb209 scaleb 1.000000000000000E-383 -8 -> 1.0000000E-391 Subnormal Rounded
ddscb210 scaleb 1.000000000000000E-383 -9 -> 1.000000E-392 Subnormal Rounded
ddscb211 scaleb 1.000000000000000E-383 -10 -> 1.00000E-393 Subnormal Rounded
ddscb212 scaleb 1.000000000000000E-383 -11 -> 1.0000E-394 Subnormal Rounded
ddscb213 scaleb 1.000000000000000E-383 -12 -> 1.000E-395 Subnormal Rounded
ddscb214 scaleb 1.000000000000000E-383 -13 -> 1.00E-396 Subnormal Rounded
ddscb215 scaleb 1.000000000000000E-383 -14 -> 1.0E-397 Subnormal Rounded
ddscb216 scaleb 1.000000000000000E-383 -15 -> 1E-398 Subnormal Rounded
ddscb217 scaleb 1.000000000000000E-383 -16 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb218 scaleb 1.000000000000000E-383 -17 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped

View File

@@ -0,0 +1,262 @@
------------------------------------------------------------------------
-- ddShift.decTest -- shift decDouble coefficient left or right --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check
ddshi001 shift 0 0 -> 0
ddshi002 shift 0 2 -> 0
ddshi003 shift 1 2 -> 100
ddshi004 shift 1 15 -> 1000000000000000
ddshi005 shift 1 16 -> 0
ddshi006 shift 1 -1 -> 0
ddshi007 shift 0 -2 -> 0
ddshi008 shift 1234567890123456 -1 -> 123456789012345
ddshi009 shift 1234567890123456 -15 -> 1
ddshi010 shift 1234567890123456 -16 -> 0
ddshi011 shift 9934567890123456 -15 -> 9
ddshi012 shift 9934567890123456 -16 -> 0
-- rhs must be an integer
ddshi015 shift 1 1.5 -> NaN Invalid_operation
ddshi016 shift 1 1.0 -> NaN Invalid_operation
ddshi017 shift 1 0.1 -> NaN Invalid_operation
ddshi018 shift 1 0.0 -> NaN Invalid_operation
ddshi019 shift 1 1E+1 -> NaN Invalid_operation
ddshi020 shift 1 1E+99 -> NaN Invalid_operation
ddshi021 shift 1 Inf -> NaN Invalid_operation
ddshi022 shift 1 -Inf -> NaN Invalid_operation
-- and |rhs| <= precision
ddshi025 shift 1 -1000 -> NaN Invalid_operation
ddshi026 shift 1 -17 -> NaN Invalid_operation
ddshi027 shift 1 17 -> NaN Invalid_operation
ddshi028 shift 1 1000 -> NaN Invalid_operation
-- full shifting pattern
ddshi030 shift 1234567890123456 -16 -> 0
ddshi031 shift 1234567890123456 -15 -> 1
ddshi032 shift 1234567890123456 -14 -> 12
ddshi033 shift 1234567890123456 -13 -> 123
ddshi034 shift 1234567890123456 -12 -> 1234
ddshi035 shift 1234567890123456 -11 -> 12345
ddshi036 shift 1234567890123456 -10 -> 123456
ddshi037 shift 1234567890123456 -9 -> 1234567
ddshi038 shift 1234567890123456 -8 -> 12345678
ddshi039 shift 1234567890123456 -7 -> 123456789
ddshi040 shift 1234567890123456 -6 -> 1234567890
ddshi041 shift 1234567890123456 -5 -> 12345678901
ddshi042 shift 1234567890123456 -4 -> 123456789012
ddshi043 shift 1234567890123456 -3 -> 1234567890123
ddshi044 shift 1234567890123456 -2 -> 12345678901234
ddshi045 shift 1234567890123456 -1 -> 123456789012345
ddshi046 shift 1234567890123456 -0 -> 1234567890123456
ddshi047 shift 1234567890123456 +0 -> 1234567890123456
ddshi048 shift 1234567890123456 +1 -> 2345678901234560
ddshi049 shift 1234567890123456 +2 -> 3456789012345600
ddshi050 shift 1234567890123456 +3 -> 4567890123456000
ddshi051 shift 1234567890123456 +4 -> 5678901234560000
ddshi052 shift 1234567890123456 +5 -> 6789012345600000
ddshi053 shift 1234567890123456 +6 -> 7890123456000000
ddshi054 shift 1234567890123456 +7 -> 8901234560000000
ddshi055 shift 1234567890123456 +8 -> 9012345600000000
ddshi056 shift 1234567890123456 +9 -> 123456000000000
ddshi057 shift 1234567890123456 +10 -> 1234560000000000
ddshi058 shift 1234567890123456 +11 -> 2345600000000000
ddshi059 shift 1234567890123456 +12 -> 3456000000000000
ddshi060 shift 1234567890123456 +13 -> 4560000000000000
ddshi061 shift 1234567890123456 +14 -> 5600000000000000
ddshi062 shift 1234567890123456 +15 -> 6000000000000000
ddshi063 shift 1234567890123456 +16 -> 0
-- zeros
ddshi070 shift 0E-10 +9 -> 0E-10
ddshi071 shift 0E-10 -9 -> 0E-10
ddshi072 shift 0.000 +9 -> 0.000
ddshi073 shift 0.000 -9 -> 0.000
ddshi074 shift 0E+10 +9 -> 0E+10
ddshi075 shift 0E+10 -9 -> 0E+10
ddshi076 shift -0E-10 +9 -> -0E-10
ddshi077 shift -0E-10 -9 -> -0E-10
ddshi078 shift -0.000 +9 -> -0.000
ddshi079 shift -0.000 -9 -> -0.000
ddshi080 shift -0E+10 +9 -> -0E+10
ddshi081 shift -0E+10 -9 -> -0E+10
-- Nmax, Nmin, Ntiny
ddshi141 shift 9.999999999999999E+384 -1 -> 9.99999999999999E+383
ddshi142 shift 9.999999999999999E+384 -15 -> 9E+369
ddshi143 shift 9.999999999999999E+384 1 -> 9.999999999999990E+384
ddshi144 shift 9.999999999999999E+384 15 -> 9.000000000000000E+384
ddshi145 shift 1E-383 -1 -> 0E-383
ddshi146 shift 1E-383 -15 -> 0E-383
ddshi147 shift 1E-383 1 -> 1.0E-382
ddshi148 shift 1E-383 15 -> 1.000000000000000E-368
ddshi151 shift 1.000000000000000E-383 -1 -> 1.00000000000000E-384
ddshi152 shift 1.000000000000000E-383 -15 -> 1E-398
ddshi153 shift 1.000000000000000E-383 1 -> 0E-398
ddshi154 shift 1.000000000000000E-383 15 -> 0E-398
ddshi155 shift 9.000000000000000E-383 -1 -> 9.00000000000000E-384
ddshi156 shift 9.000000000000000E-383 -15 -> 9E-398
ddshi157 shift 9.000000000000000E-383 1 -> 0E-398
ddshi158 shift 9.000000000000000E-383 15 -> 0E-398
ddshi160 shift 1E-398 -1 -> 0E-398
ddshi161 shift 1E-398 -15 -> 0E-398
ddshi162 shift 1E-398 1 -> 1.0E-397
ddshi163 shift 1E-398 15 -> 1.000000000000000E-383
-- negatives
ddshi171 shift -9.999999999999999E+384 -1 -> -9.99999999999999E+383
ddshi172 shift -9.999999999999999E+384 -15 -> -9E+369
ddshi173 shift -9.999999999999999E+384 1 -> -9.999999999999990E+384
ddshi174 shift -9.999999999999999E+384 15 -> -9.000000000000000E+384
ddshi175 shift -1E-383 -1 -> -0E-383
ddshi176 shift -1E-383 -15 -> -0E-383
ddshi177 shift -1E-383 1 -> -1.0E-382
ddshi178 shift -1E-383 15 -> -1.000000000000000E-368
ddshi181 shift -1.000000000000000E-383 -1 -> -1.00000000000000E-384
ddshi182 shift -1.000000000000000E-383 -15 -> -1E-398
ddshi183 shift -1.000000000000000E-383 1 -> -0E-398
ddshi184 shift -1.000000000000000E-383 15 -> -0E-398
ddshi185 shift -9.000000000000000E-383 -1 -> -9.00000000000000E-384
ddshi186 shift -9.000000000000000E-383 -15 -> -9E-398
ddshi187 shift -9.000000000000000E-383 1 -> -0E-398
ddshi188 shift -9.000000000000000E-383 15 -> -0E-398
ddshi190 shift -1E-398 -1 -> -0E-398
ddshi191 shift -1E-398 -15 -> -0E-398
ddshi192 shift -1E-398 1 -> -1.0E-397
ddshi193 shift -1E-398 15 -> -1.000000000000000E-383
-- more negatives (of sanities)
ddshi201 shift -0 0 -> -0
ddshi202 shift -0 2 -> -0
ddshi203 shift -1 2 -> -100
ddshi204 shift -1 15 -> -1000000000000000
ddshi205 shift -1 16 -> -0
ddshi206 shift -1 -1 -> -0
ddshi207 shift -0 -2 -> -0
ddshi208 shift -1234567890123456 -1 -> -123456789012345
ddshi209 shift -1234567890123456 -15 -> -1
ddshi210 shift -1234567890123456 -16 -> -0
ddshi211 shift -9934567890123456 -15 -> -9
ddshi212 shift -9934567890123456 -16 -> -0
-- Specials; NaNs are handled as usual
ddshi781 shift -Inf -8 -> -Infinity
ddshi782 shift -Inf -1 -> -Infinity
ddshi783 shift -Inf -0 -> -Infinity
ddshi784 shift -Inf 0 -> -Infinity
ddshi785 shift -Inf 1 -> -Infinity
ddshi786 shift -Inf 8 -> -Infinity
ddshi787 shift -1000 -Inf -> NaN Invalid_operation
ddshi788 shift -Inf -Inf -> NaN Invalid_operation
ddshi789 shift -1 -Inf -> NaN Invalid_operation
ddshi790 shift -0 -Inf -> NaN Invalid_operation
ddshi791 shift 0 -Inf -> NaN Invalid_operation
ddshi792 shift 1 -Inf -> NaN Invalid_operation
ddshi793 shift 1000 -Inf -> NaN Invalid_operation
ddshi794 shift Inf -Inf -> NaN Invalid_operation
ddshi800 shift Inf -Inf -> NaN Invalid_operation
ddshi801 shift Inf -8 -> Infinity
ddshi802 shift Inf -1 -> Infinity
ddshi803 shift Inf -0 -> Infinity
ddshi804 shift Inf 0 -> Infinity
ddshi805 shift Inf 1 -> Infinity
ddshi806 shift Inf 8 -> Infinity
ddshi807 shift Inf Inf -> NaN Invalid_operation
ddshi808 shift -1000 Inf -> NaN Invalid_operation
ddshi809 shift -Inf Inf -> NaN Invalid_operation
ddshi810 shift -1 Inf -> NaN Invalid_operation
ddshi811 shift -0 Inf -> NaN Invalid_operation
ddshi812 shift 0 Inf -> NaN Invalid_operation
ddshi813 shift 1 Inf -> NaN Invalid_operation
ddshi814 shift 1000 Inf -> NaN Invalid_operation
ddshi815 shift Inf Inf -> NaN Invalid_operation
ddshi821 shift NaN -Inf -> NaN
ddshi822 shift NaN -1000 -> NaN
ddshi823 shift NaN -1 -> NaN
ddshi824 shift NaN -0 -> NaN
ddshi825 shift NaN 0 -> NaN
ddshi826 shift NaN 1 -> NaN
ddshi827 shift NaN 1000 -> NaN
ddshi828 shift NaN Inf -> NaN
ddshi829 shift NaN NaN -> NaN
ddshi830 shift -Inf NaN -> NaN
ddshi831 shift -1000 NaN -> NaN
ddshi832 shift -1 NaN -> NaN
ddshi833 shift -0 NaN -> NaN
ddshi834 shift 0 NaN -> NaN
ddshi835 shift 1 NaN -> NaN
ddshi836 shift 1000 NaN -> NaN
ddshi837 shift Inf NaN -> NaN
ddshi841 shift sNaN -Inf -> NaN Invalid_operation
ddshi842 shift sNaN -1000 -> NaN Invalid_operation
ddshi843 shift sNaN -1 -> NaN Invalid_operation
ddshi844 shift sNaN -0 -> NaN Invalid_operation
ddshi845 shift sNaN 0 -> NaN Invalid_operation
ddshi846 shift sNaN 1 -> NaN Invalid_operation
ddshi847 shift sNaN 1000 -> NaN Invalid_operation
ddshi848 shift sNaN NaN -> NaN Invalid_operation
ddshi849 shift sNaN sNaN -> NaN Invalid_operation
ddshi850 shift NaN sNaN -> NaN Invalid_operation
ddshi851 shift -Inf sNaN -> NaN Invalid_operation
ddshi852 shift -1000 sNaN -> NaN Invalid_operation
ddshi853 shift -1 sNaN -> NaN Invalid_operation
ddshi854 shift -0 sNaN -> NaN Invalid_operation
ddshi855 shift 0 sNaN -> NaN Invalid_operation
ddshi856 shift 1 sNaN -> NaN Invalid_operation
ddshi857 shift 1000 sNaN -> NaN Invalid_operation
ddshi858 shift Inf sNaN -> NaN Invalid_operation
ddshi859 shift NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddshi861 shift NaN1 -Inf -> NaN1
ddshi862 shift +NaN2 -1000 -> NaN2
ddshi863 shift NaN3 1000 -> NaN3
ddshi864 shift NaN4 Inf -> NaN4
ddshi865 shift NaN5 +NaN6 -> NaN5
ddshi866 shift -Inf NaN7 -> NaN7
ddshi867 shift -1000 NaN8 -> NaN8
ddshi868 shift 1000 NaN9 -> NaN9
ddshi869 shift Inf +NaN10 -> NaN10
ddshi871 shift sNaN11 -Inf -> NaN11 Invalid_operation
ddshi872 shift sNaN12 -1000 -> NaN12 Invalid_operation
ddshi873 shift sNaN13 1000 -> NaN13 Invalid_operation
ddshi874 shift sNaN14 NaN17 -> NaN14 Invalid_operation
ddshi875 shift sNaN15 sNaN18 -> NaN15 Invalid_operation
ddshi876 shift NaN16 sNaN19 -> NaN19 Invalid_operation
ddshi877 shift -Inf +sNaN20 -> NaN20 Invalid_operation
ddshi878 shift -1000 sNaN21 -> NaN21 Invalid_operation
ddshi879 shift 1000 sNaN22 -> NaN22 Invalid_operation
ddshi880 shift Inf sNaN23 -> NaN23 Invalid_operation
ddshi881 shift +NaN25 +sNaN24 -> NaN24 Invalid_operation
ddshi882 shift -NaN26 NaN28 -> -NaN26
ddshi883 shift -sNaN27 sNaN29 -> -NaN27 Invalid_operation
ddshi884 shift 1000 -NaN30 -> -NaN30
ddshi885 shift 1000 -sNaN31 -> -NaN31 Invalid_operation

View File

@@ -0,0 +1,629 @@
------------------------------------------------------------------------
-- ddSubtract.decTest -- decDouble subtraction --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- This set of tests are for decDoubles only; all arguments are
-- representable in a decDouble
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- [first group are 'quick confidence check']
ddsub001 subtract 0 0 -> '0'
ddsub002 subtract 1 1 -> '0'
ddsub003 subtract 1 2 -> '-1'
ddsub004 subtract 2 1 -> '1'
ddsub005 subtract 2 2 -> '0'
ddsub006 subtract 3 2 -> '1'
ddsub007 subtract 2 3 -> '-1'
ddsub011 subtract -0 0 -> '-0'
ddsub012 subtract -1 1 -> '-2'
ddsub013 subtract -1 2 -> '-3'
ddsub014 subtract -2 1 -> '-3'
ddsub015 subtract -2 2 -> '-4'
ddsub016 subtract -3 2 -> '-5'
ddsub017 subtract -2 3 -> '-5'
ddsub021 subtract 0 -0 -> '0'
ddsub022 subtract 1 -1 -> '2'
ddsub023 subtract 1 -2 -> '3'
ddsub024 subtract 2 -1 -> '3'
ddsub025 subtract 2 -2 -> '4'
ddsub026 subtract 3 -2 -> '5'
ddsub027 subtract 2 -3 -> '5'
ddsub030 subtract 11 1 -> 10
ddsub031 subtract 10 1 -> 9
ddsub032 subtract 9 1 -> 8
ddsub033 subtract 1 1 -> 0
ddsub034 subtract 0 1 -> -1
ddsub035 subtract -1 1 -> -2
ddsub036 subtract -9 1 -> -10
ddsub037 subtract -10 1 -> -11
ddsub038 subtract -11 1 -> -12
ddsub040 subtract '5.75' '3.3' -> '2.45'
ddsub041 subtract '5' '-3' -> '8'
ddsub042 subtract '-5' '-3' -> '-2'
ddsub043 subtract '-7' '2.5' -> '-9.5'
ddsub044 subtract '0.7' '0.3' -> '0.4'
ddsub045 subtract '1.3' '0.3' -> '1.0'
ddsub046 subtract '1.25' '1.25' -> '0.00'
ddsub050 subtract '1.23456789' '1.00000000' -> '0.23456789'
ddsub051 subtract '1.23456789' '1.00000089' -> '0.23456700'
ddsub060 subtract '70' '10000e+16' -> '-1.000000000000000E+20' Inexact Rounded
ddsub061 subtract '700' '10000e+16' -> '-1.000000000000000E+20' Inexact Rounded
ddsub062 subtract '7000' '10000e+16' -> '-9.999999999999999E+19' Inexact Rounded
ddsub063 subtract '70000' '10000e+16' -> '-9.999999999999993E+19' Rounded
ddsub064 subtract '700000' '10000e+16' -> '-9.999999999999930E+19' Rounded
-- symmetry:
ddsub065 subtract '10000e+16' '70' -> '1.000000000000000E+20' Inexact Rounded
ddsub066 subtract '10000e+16' '700' -> '1.000000000000000E+20' Inexact Rounded
ddsub067 subtract '10000e+16' '7000' -> '9.999999999999999E+19' Inexact Rounded
ddsub068 subtract '10000e+16' '70000' -> '9.999999999999993E+19' Rounded
ddsub069 subtract '10000e+16' '700000' -> '9.999999999999930E+19' Rounded
-- some of the next group are really constructor tests
ddsub090 subtract '00.0' '0.0' -> '0.0'
ddsub091 subtract '00.0' '0.00' -> '0.00'
ddsub092 subtract '0.00' '00.0' -> '0.00'
ddsub093 subtract '00.0' '0.00' -> '0.00'
ddsub094 subtract '0.00' '00.0' -> '0.00'
ddsub095 subtract '3' '.3' -> '2.7'
ddsub096 subtract '3.' '.3' -> '2.7'
ddsub097 subtract '3.0' '.3' -> '2.7'
ddsub098 subtract '3.00' '.3' -> '2.70'
ddsub099 subtract '3' '3' -> '0'
ddsub100 subtract '3' '+3' -> '0'
ddsub101 subtract '3' '-3' -> '6'
ddsub102 subtract '3' '0.3' -> '2.7'
ddsub103 subtract '3.' '0.3' -> '2.7'
ddsub104 subtract '3.0' '0.3' -> '2.7'
ddsub105 subtract '3.00' '0.3' -> '2.70'
ddsub106 subtract '3' '3.0' -> '0.0'
ddsub107 subtract '3' '+3.0' -> '0.0'
ddsub108 subtract '3' '-3.0' -> '6.0'
-- the above all from add; massaged and extended. Now some new ones...
-- [particularly important for comparisons]
-- NB: -xE-8 below were non-exponents pre-ANSI X3-274, and -1E-7 or 0E-7
-- with input rounding.
ddsub120 subtract '10.23456784' '10.23456789' -> '-5E-8'
ddsub121 subtract '10.23456785' '10.23456789' -> '-4E-8'
ddsub122 subtract '10.23456786' '10.23456789' -> '-3E-8'
ddsub123 subtract '10.23456787' '10.23456789' -> '-2E-8'
ddsub124 subtract '10.23456788' '10.23456789' -> '-1E-8'
ddsub125 subtract '10.23456789' '10.23456789' -> '0E-8'
ddsub126 subtract '10.23456790' '10.23456789' -> '1E-8'
ddsub127 subtract '10.23456791' '10.23456789' -> '2E-8'
ddsub128 subtract '10.23456792' '10.23456789' -> '3E-8'
ddsub129 subtract '10.23456793' '10.23456789' -> '4E-8'
ddsub130 subtract '10.23456794' '10.23456789' -> '5E-8'
ddsub131 subtract '10.23456781' '10.23456786' -> '-5E-8'
ddsub132 subtract '10.23456782' '10.23456786' -> '-4E-8'
ddsub133 subtract '10.23456783' '10.23456786' -> '-3E-8'
ddsub134 subtract '10.23456784' '10.23456786' -> '-2E-8'
ddsub135 subtract '10.23456785' '10.23456786' -> '-1E-8'
ddsub136 subtract '10.23456786' '10.23456786' -> '0E-8'
ddsub137 subtract '10.23456787' '10.23456786' -> '1E-8'
ddsub138 subtract '10.23456788' '10.23456786' -> '2E-8'
ddsub139 subtract '10.23456789' '10.23456786' -> '3E-8'
ddsub140 subtract '10.23456790' '10.23456786' -> '4E-8'
ddsub141 subtract '10.23456791' '10.23456786' -> '5E-8'
ddsub142 subtract '1' '0.999999999' -> '1E-9'
ddsub143 subtract '0.999999999' '1' -> '-1E-9'
ddsub144 subtract '-10.23456780' '-10.23456786' -> '6E-8'
ddsub145 subtract '-10.23456790' '-10.23456786' -> '-4E-8'
ddsub146 subtract '-10.23456791' '-10.23456786' -> '-5E-8'
-- additional scaled arithmetic tests [0.97 problem]
ddsub160 subtract '0' '.1' -> '-0.1'
ddsub161 subtract '00' '.97983' -> '-0.97983'
ddsub162 subtract '0' '.9' -> '-0.9'
ddsub163 subtract '0' '0.102' -> '-0.102'
ddsub164 subtract '0' '.4' -> '-0.4'
ddsub165 subtract '0' '.307' -> '-0.307'
ddsub166 subtract '0' '.43822' -> '-0.43822'
ddsub167 subtract '0' '.911' -> '-0.911'
ddsub168 subtract '.0' '.02' -> '-0.02'
ddsub169 subtract '00' '.392' -> '-0.392'
ddsub170 subtract '0' '.26' -> '-0.26'
ddsub171 subtract '0' '0.51' -> '-0.51'
ddsub172 subtract '0' '.2234' -> '-0.2234'
ddsub173 subtract '0' '.2' -> '-0.2'
ddsub174 subtract '.0' '.0008' -> '-0.0008'
-- 0. on left
ddsub180 subtract '0.0' '-.1' -> '0.1'
ddsub181 subtract '0.00' '-.97983' -> '0.97983'
ddsub182 subtract '0.0' '-.9' -> '0.9'
ddsub183 subtract '0.0' '-0.102' -> '0.102'
ddsub184 subtract '0.0' '-.4' -> '0.4'
ddsub185 subtract '0.0' '-.307' -> '0.307'
ddsub186 subtract '0.0' '-.43822' -> '0.43822'
ddsub187 subtract '0.0' '-.911' -> '0.911'
ddsub188 subtract '0.0' '-.02' -> '0.02'
ddsub189 subtract '0.00' '-.392' -> '0.392'
ddsub190 subtract '0.0' '-.26' -> '0.26'
ddsub191 subtract '0.0' '-0.51' -> '0.51'
ddsub192 subtract '0.0' '-.2234' -> '0.2234'
ddsub193 subtract '0.0' '-.2' -> '0.2'
ddsub194 subtract '0.0' '-.0008' -> '0.0008'
-- negatives of same
ddsub200 subtract '0' '-.1' -> '0.1'
ddsub201 subtract '00' '-.97983' -> '0.97983'
ddsub202 subtract '0' '-.9' -> '0.9'
ddsub203 subtract '0' '-0.102' -> '0.102'
ddsub204 subtract '0' '-.4' -> '0.4'
ddsub205 subtract '0' '-.307' -> '0.307'
ddsub206 subtract '0' '-.43822' -> '0.43822'
ddsub207 subtract '0' '-.911' -> '0.911'
ddsub208 subtract '.0' '-.02' -> '0.02'
ddsub209 subtract '00' '-.392' -> '0.392'
ddsub210 subtract '0' '-.26' -> '0.26'
ddsub211 subtract '0' '-0.51' -> '0.51'
ddsub212 subtract '0' '-.2234' -> '0.2234'
ddsub213 subtract '0' '-.2' -> '0.2'
ddsub214 subtract '.0' '-.0008' -> '0.0008'
-- more fixed, LHS swaps [really the same as testcases under add]
ddsub220 subtract '-56267E-12' 0 -> '-5.6267E-8'
ddsub221 subtract '-56267E-11' 0 -> '-5.6267E-7'
ddsub222 subtract '-56267E-10' 0 -> '-0.0000056267'
ddsub223 subtract '-56267E-9' 0 -> '-0.000056267'
ddsub224 subtract '-56267E-8' 0 -> '-0.00056267'
ddsub225 subtract '-56267E-7' 0 -> '-0.0056267'
ddsub226 subtract '-56267E-6' 0 -> '-0.056267'
ddsub227 subtract '-56267E-5' 0 -> '-0.56267'
ddsub228 subtract '-56267E-2' 0 -> '-562.67'
ddsub229 subtract '-56267E-1' 0 -> '-5626.7'
ddsub230 subtract '-56267E-0' 0 -> '-56267'
-- symmetry ...
ddsub240 subtract 0 '-56267E-12' -> '5.6267E-8'
ddsub241 subtract 0 '-56267E-11' -> '5.6267E-7'
ddsub242 subtract 0 '-56267E-10' -> '0.0000056267'
ddsub243 subtract 0 '-56267E-9' -> '0.000056267'
ddsub244 subtract 0 '-56267E-8' -> '0.00056267'
ddsub245 subtract 0 '-56267E-7' -> '0.0056267'
ddsub246 subtract 0 '-56267E-6' -> '0.056267'
ddsub247 subtract 0 '-56267E-5' -> '0.56267'
ddsub248 subtract 0 '-56267E-2' -> '562.67'
ddsub249 subtract 0 '-56267E-1' -> '5626.7'
ddsub250 subtract 0 '-56267E-0' -> '56267'
-- now some more from the 'new' add
ddsub301 subtract '1.23456789' '1.00000000' -> '0.23456789'
ddsub302 subtract '1.23456789' '1.00000011' -> '0.23456778'
-- some carrying effects
ddsub321 subtract '0.9998' '0.0000' -> '0.9998'
ddsub322 subtract '0.9998' '0.0001' -> '0.9997'
ddsub323 subtract '0.9998' '0.0002' -> '0.9996'
ddsub324 subtract '0.9998' '0.0003' -> '0.9995'
ddsub325 subtract '0.9998' '-0.0000' -> '0.9998'
ddsub326 subtract '0.9998' '-0.0001' -> '0.9999'
ddsub327 subtract '0.9998' '-0.0002' -> '1.0000'
ddsub328 subtract '0.9998' '-0.0003' -> '1.0001'
-- internal boundaries
ddsub346 subtract '10000e+9' '7' -> '9999999999993'
ddsub347 subtract '10000e+9' '70' -> '9999999999930'
ddsub348 subtract '10000e+9' '700' -> '9999999999300'
ddsub349 subtract '10000e+9' '7000' -> '9999999993000'
ddsub350 subtract '10000e+9' '70000' -> '9999999930000'
ddsub351 subtract '10000e+9' '700000' -> '9999999300000'
ddsub352 subtract '7' '10000e+9' -> '-9999999999993'
ddsub353 subtract '70' '10000e+9' -> '-9999999999930'
ddsub354 subtract '700' '10000e+9' -> '-9999999999300'
ddsub355 subtract '7000' '10000e+9' -> '-9999999993000'
ddsub356 subtract '70000' '10000e+9' -> '-9999999930000'
ddsub357 subtract '700000' '10000e+9' -> '-9999999300000'
-- zero preservation
ddsub361 subtract 1 '0.0001' -> '0.9999'
ddsub362 subtract 1 '0.00001' -> '0.99999'
ddsub363 subtract 1 '0.000001' -> '0.999999'
ddsub364 subtract 1 '0.0000000000000001' -> '0.9999999999999999'
ddsub365 subtract 1 '0.00000000000000001' -> '1.000000000000000' Inexact Rounded
ddsub366 subtract 1 '0.000000000000000001' -> '1.000000000000000' Inexact Rounded
-- some funny zeros [in case of bad signum]
ddsub370 subtract 1 0 -> 1
ddsub371 subtract 1 0. -> 1
ddsub372 subtract 1 .0 -> 1.0
ddsub373 subtract 1 0.0 -> 1.0
ddsub374 subtract 0 1 -> -1
ddsub375 subtract 0. 1 -> -1
ddsub376 subtract .0 1 -> -1.0
ddsub377 subtract 0.0 1 -> -1.0
-- leading 0 digit before round
ddsub910 subtract -103519362 -51897955.3 -> -51621406.7
ddsub911 subtract 159579.444 89827.5229 -> 69751.9211
ddsub920 subtract 333.0000000123456 33.00000001234566 -> 299.9999999999999 Inexact Rounded
ddsub921 subtract 333.0000000123456 33.00000001234565 -> 300.0000000000000 Inexact Rounded
ddsub922 subtract 133.0000000123456 33.00000001234565 -> 99.99999999999995
ddsub923 subtract 133.0000000123456 33.00000001234564 -> 99.99999999999996
ddsub924 subtract 133.0000000123456 33.00000001234540 -> 100.0000000000002 Rounded
ddsub925 subtract 133.0000000123456 43.00000001234560 -> 90.00000000000000
ddsub926 subtract 133.0000000123456 43.00000001234561 -> 89.99999999999999
ddsub927 subtract 133.0000000123456 43.00000001234566 -> 89.99999999999994
ddsub928 subtract 101.0000000123456 91.00000001234566 -> 9.99999999999994
ddsub929 subtract 101.0000000123456 99.00000001234566 -> 1.99999999999994
-- more LHS swaps [were fixed]
ddsub390 subtract '-56267E-10' 0 -> '-0.0000056267'
ddsub391 subtract '-56267E-6' 0 -> '-0.056267'
ddsub392 subtract '-56267E-5' 0 -> '-0.56267'
ddsub393 subtract '-56267E-4' 0 -> '-5.6267'
ddsub394 subtract '-56267E-3' 0 -> '-56.267'
ddsub395 subtract '-56267E-2' 0 -> '-562.67'
ddsub396 subtract '-56267E-1' 0 -> '-5626.7'
ddsub397 subtract '-56267E-0' 0 -> '-56267'
ddsub398 subtract '-5E-10' 0 -> '-5E-10'
ddsub399 subtract '-5E-7' 0 -> '-5E-7'
ddsub400 subtract '-5E-6' 0 -> '-0.000005'
ddsub401 subtract '-5E-5' 0 -> '-0.00005'
ddsub402 subtract '-5E-4' 0 -> '-0.0005'
ddsub403 subtract '-5E-1' 0 -> '-0.5'
ddsub404 subtract '-5E0' 0 -> '-5'
ddsub405 subtract '-5E1' 0 -> '-50'
ddsub406 subtract '-5E5' 0 -> '-500000'
ddsub407 subtract '-5E15' 0 -> '-5000000000000000'
ddsub408 subtract '-5E16' 0 -> '-5.000000000000000E+16' Rounded
ddsub409 subtract '-5E17' 0 -> '-5.000000000000000E+17' Rounded
ddsub410 subtract '-5E18' 0 -> '-5.000000000000000E+18' Rounded
ddsub411 subtract '-5E100' 0 -> '-5.000000000000000E+100' Rounded
-- more RHS swaps [were fixed]
ddsub420 subtract 0 '-56267E-10' -> '0.0000056267'
ddsub421 subtract 0 '-56267E-6' -> '0.056267'
ddsub422 subtract 0 '-56267E-5' -> '0.56267'
ddsub423 subtract 0 '-56267E-4' -> '5.6267'
ddsub424 subtract 0 '-56267E-3' -> '56.267'
ddsub425 subtract 0 '-56267E-2' -> '562.67'
ddsub426 subtract 0 '-56267E-1' -> '5626.7'
ddsub427 subtract 0 '-56267E-0' -> '56267'
ddsub428 subtract 0 '-5E-10' -> '5E-10'
ddsub429 subtract 0 '-5E-7' -> '5E-7'
ddsub430 subtract 0 '-5E-6' -> '0.000005'
ddsub431 subtract 0 '-5E-5' -> '0.00005'
ddsub432 subtract 0 '-5E-4' -> '0.0005'
ddsub433 subtract 0 '-5E-1' -> '0.5'
ddsub434 subtract 0 '-5E0' -> '5'
ddsub435 subtract 0 '-5E1' -> '50'
ddsub436 subtract 0 '-5E5' -> '500000'
ddsub437 subtract 0 '-5E15' -> '5000000000000000'
ddsub438 subtract 0 '-5E16' -> '5.000000000000000E+16' Rounded
ddsub439 subtract 0 '-5E17' -> '5.000000000000000E+17' Rounded
ddsub440 subtract 0 '-5E18' -> '5.000000000000000E+18' Rounded
ddsub441 subtract 0 '-5E100' -> '5.000000000000000E+100' Rounded
-- try borderline precision, with carries, etc.
ddsub461 subtract '1E+16' '1' -> '9999999999999999'
ddsub462 subtract '1E+12' '-1.111' -> '1000000000001.111'
ddsub463 subtract '1.111' '-1E+12' -> '1000000000001.111'
ddsub464 subtract '-1' '-1E+16' -> '9999999999999999'
ddsub465 subtract '7E+15' '1' -> '6999999999999999'
ddsub466 subtract '7E+12' '-1.111' -> '7000000000001.111'
ddsub467 subtract '1.111' '-7E+12' -> '7000000000001.111'
ddsub468 subtract '-1' '-7E+15' -> '6999999999999999'
-- 1234567890123456 1234567890123456 1 23456789012345
ddsub470 subtract '0.4444444444444444' '-0.5555555555555563' -> '1.000000000000001' Inexact Rounded
ddsub471 subtract '0.4444444444444444' '-0.5555555555555562' -> '1.000000000000001' Inexact Rounded
ddsub472 subtract '0.4444444444444444' '-0.5555555555555561' -> '1.000000000000000' Inexact Rounded
ddsub473 subtract '0.4444444444444444' '-0.5555555555555560' -> '1.000000000000000' Inexact Rounded
ddsub474 subtract '0.4444444444444444' '-0.5555555555555559' -> '1.000000000000000' Inexact Rounded
ddsub475 subtract '0.4444444444444444' '-0.5555555555555558' -> '1.000000000000000' Inexact Rounded
ddsub476 subtract '0.4444444444444444' '-0.5555555555555557' -> '1.000000000000000' Inexact Rounded
ddsub477 subtract '0.4444444444444444' '-0.5555555555555556' -> '1.000000000000000' Rounded
ddsub478 subtract '0.4444444444444444' '-0.5555555555555555' -> '0.9999999999999999'
ddsub479 subtract '0.4444444444444444' '-0.5555555555555554' -> '0.9999999999999998'
ddsub480 subtract '0.4444444444444444' '-0.5555555555555553' -> '0.9999999999999997'
ddsub481 subtract '0.4444444444444444' '-0.5555555555555552' -> '0.9999999999999996'
ddsub482 subtract '0.4444444444444444' '-0.5555555555555551' -> '0.9999999999999995'
ddsub483 subtract '0.4444444444444444' '-0.5555555555555550' -> '0.9999999999999994'
-- and some more, including residue effects and different roundings
rounding: half_up
ddsub500 subtract '1231234567456789' 0 -> '1231234567456789'
ddsub501 subtract '1231234567456789' 0.000000001 -> '1231234567456789' Inexact Rounded
ddsub502 subtract '1231234567456789' 0.000001 -> '1231234567456789' Inexact Rounded
ddsub503 subtract '1231234567456789' 0.1 -> '1231234567456789' Inexact Rounded
ddsub504 subtract '1231234567456789' 0.4 -> '1231234567456789' Inexact Rounded
ddsub505 subtract '1231234567456789' 0.49 -> '1231234567456789' Inexact Rounded
ddsub506 subtract '1231234567456789' 0.499999 -> '1231234567456789' Inexact Rounded
ddsub507 subtract '1231234567456789' 0.499999999 -> '1231234567456789' Inexact Rounded
ddsub508 subtract '1231234567456789' 0.5 -> '1231234567456789' Inexact Rounded
ddsub509 subtract '1231234567456789' 0.500000001 -> '1231234567456788' Inexact Rounded
ddsub510 subtract '1231234567456789' 0.500001 -> '1231234567456788' Inexact Rounded
ddsub511 subtract '1231234567456789' 0.51 -> '1231234567456788' Inexact Rounded
ddsub512 subtract '1231234567456789' 0.6 -> '1231234567456788' Inexact Rounded
ddsub513 subtract '1231234567456789' 0.9 -> '1231234567456788' Inexact Rounded
ddsub514 subtract '1231234567456789' 0.99999 -> '1231234567456788' Inexact Rounded
ddsub515 subtract '1231234567456789' 0.999999999 -> '1231234567456788' Inexact Rounded
ddsub516 subtract '1231234567456789' 1 -> '1231234567456788'
ddsub517 subtract '1231234567456789' 1.000000001 -> '1231234567456788' Inexact Rounded
ddsub518 subtract '1231234567456789' 1.00001 -> '1231234567456788' Inexact Rounded
ddsub519 subtract '1231234567456789' 1.1 -> '1231234567456788' Inexact Rounded
rounding: half_even
ddsub520 subtract '1231234567456789' 0 -> '1231234567456789'
ddsub521 subtract '1231234567456789' 0.000000001 -> '1231234567456789' Inexact Rounded
ddsub522 subtract '1231234567456789' 0.000001 -> '1231234567456789' Inexact Rounded
ddsub523 subtract '1231234567456789' 0.1 -> '1231234567456789' Inexact Rounded
ddsub524 subtract '1231234567456789' 0.4 -> '1231234567456789' Inexact Rounded
ddsub525 subtract '1231234567456789' 0.49 -> '1231234567456789' Inexact Rounded
ddsub526 subtract '1231234567456789' 0.499999 -> '1231234567456789' Inexact Rounded
ddsub527 subtract '1231234567456789' 0.499999999 -> '1231234567456789' Inexact Rounded
ddsub528 subtract '1231234567456789' 0.5 -> '1231234567456788' Inexact Rounded
ddsub529 subtract '1231234567456789' 0.500000001 -> '1231234567456788' Inexact Rounded
ddsub530 subtract '1231234567456789' 0.500001 -> '1231234567456788' Inexact Rounded
ddsub531 subtract '1231234567456789' 0.51 -> '1231234567456788' Inexact Rounded
ddsub532 subtract '1231234567456789' 0.6 -> '1231234567456788' Inexact Rounded
ddsub533 subtract '1231234567456789' 0.9 -> '1231234567456788' Inexact Rounded
ddsub534 subtract '1231234567456789' 0.99999 -> '1231234567456788' Inexact Rounded
ddsub535 subtract '1231234567456789' 0.999999999 -> '1231234567456788' Inexact Rounded
ddsub536 subtract '1231234567456789' 1 -> '1231234567456788'
ddsub537 subtract '1231234567456789' 1.00000001 -> '1231234567456788' Inexact Rounded
ddsub538 subtract '1231234567456789' 1.00001 -> '1231234567456788' Inexact Rounded
ddsub539 subtract '1231234567456789' 1.1 -> '1231234567456788' Inexact Rounded
-- critical few with even bottom digit...
ddsub540 subtract '1231234567456788' 0.499999999 -> '1231234567456788' Inexact Rounded
ddsub541 subtract '1231234567456788' 0.5 -> '1231234567456788' Inexact Rounded
ddsub542 subtract '1231234567456788' 0.500000001 -> '1231234567456787' Inexact Rounded
rounding: down
ddsub550 subtract '1231234567456789' 0 -> '1231234567456789'
ddsub551 subtract '1231234567456789' 0.000000001 -> '1231234567456788' Inexact Rounded
ddsub552 subtract '1231234567456789' 0.000001 -> '1231234567456788' Inexact Rounded
ddsub553 subtract '1231234567456789' 0.1 -> '1231234567456788' Inexact Rounded
ddsub554 subtract '1231234567456789' 0.4 -> '1231234567456788' Inexact Rounded
ddsub555 subtract '1231234567456789' 0.49 -> '1231234567456788' Inexact Rounded
ddsub556 subtract '1231234567456789' 0.499999 -> '1231234567456788' Inexact Rounded
ddsub557 subtract '1231234567456789' 0.499999999 -> '1231234567456788' Inexact Rounded
ddsub558 subtract '1231234567456789' 0.5 -> '1231234567456788' Inexact Rounded
ddsub559 subtract '1231234567456789' 0.500000001 -> '1231234567456788' Inexact Rounded
ddsub560 subtract '1231234567456789' 0.500001 -> '1231234567456788' Inexact Rounded
ddsub561 subtract '1231234567456789' 0.51 -> '1231234567456788' Inexact Rounded
ddsub562 subtract '1231234567456789' 0.6 -> '1231234567456788' Inexact Rounded
ddsub563 subtract '1231234567456789' 0.9 -> '1231234567456788' Inexact Rounded
ddsub564 subtract '1231234567456789' 0.99999 -> '1231234567456788' Inexact Rounded
ddsub565 subtract '1231234567456789' 0.999999999 -> '1231234567456788' Inexact Rounded
ddsub566 subtract '1231234567456789' 1 -> '1231234567456788'
ddsub567 subtract '1231234567456789' 1.00000001 -> '1231234567456787' Inexact Rounded
ddsub568 subtract '1231234567456789' 1.00001 -> '1231234567456787' Inexact Rounded
ddsub569 subtract '1231234567456789' 1.1 -> '1231234567456787' Inexact Rounded
-- symmetry...
rounding: half_up
ddsub600 subtract 0 '1231234567456789' -> '-1231234567456789'
ddsub601 subtract 0.000000001 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub602 subtract 0.000001 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub603 subtract 0.1 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub604 subtract 0.4 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub605 subtract 0.49 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub606 subtract 0.499999 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub607 subtract 0.499999999 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub608 subtract 0.5 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub609 subtract 0.500000001 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub610 subtract 0.500001 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub611 subtract 0.51 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub612 subtract 0.6 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub613 subtract 0.9 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub614 subtract 0.99999 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub615 subtract 0.999999999 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub616 subtract 1 '1231234567456789' -> '-1231234567456788'
ddsub617 subtract 1.000000001 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub618 subtract 1.00001 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub619 subtract 1.1 '1231234567456789' -> '-1231234567456788' Inexact Rounded
rounding: half_even
ddsub620 subtract 0 '1231234567456789' -> '-1231234567456789'
ddsub621 subtract 0.000000001 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub622 subtract 0.000001 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub623 subtract 0.1 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub624 subtract 0.4 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub625 subtract 0.49 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub626 subtract 0.499999 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub627 subtract 0.499999999 '1231234567456789' -> '-1231234567456789' Inexact Rounded
ddsub628 subtract 0.5 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub629 subtract 0.500000001 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub630 subtract 0.500001 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub631 subtract 0.51 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub632 subtract 0.6 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub633 subtract 0.9 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub634 subtract 0.99999 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub635 subtract 0.999999999 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub636 subtract 1 '1231234567456789' -> '-1231234567456788'
ddsub637 subtract 1.00000001 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub638 subtract 1.00001 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub639 subtract 1.1 '1231234567456789' -> '-1231234567456788' Inexact Rounded
-- critical few with even bottom digit...
ddsub640 subtract 0.499999999 '1231234567456788' -> '-1231234567456788' Inexact Rounded
ddsub641 subtract 0.5 '1231234567456788' -> '-1231234567456788' Inexact Rounded
ddsub642 subtract 0.500000001 '1231234567456788' -> '-1231234567456787' Inexact Rounded
rounding: down
ddsub650 subtract 0 '1231234567456789' -> '-1231234567456789'
ddsub651 subtract 0.000000001 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub652 subtract 0.000001 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub653 subtract 0.1 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub654 subtract 0.4 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub655 subtract 0.49 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub656 subtract 0.499999 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub657 subtract 0.499999999 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub658 subtract 0.5 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub659 subtract 0.500000001 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub660 subtract 0.500001 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub661 subtract 0.51 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub662 subtract 0.6 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub663 subtract 0.9 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub664 subtract 0.99999 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub665 subtract 0.999999999 '1231234567456789' -> '-1231234567456788' Inexact Rounded
ddsub666 subtract 1 '1231234567456789' -> '-1231234567456788'
ddsub667 subtract 1.00000001 '1231234567456789' -> '-1231234567456787' Inexact Rounded
ddsub668 subtract 1.00001 '1231234567456789' -> '-1231234567456787' Inexact Rounded
ddsub669 subtract 1.1 '1231234567456789' -> '-1231234567456787' Inexact Rounded
-- lots of leading zeros in intermediate result, and showing effects of
-- input rounding would have affected the following
rounding: half_up
ddsub670 subtract '1234567456789' '1234567456788.1' -> 0.9
ddsub671 subtract '1234567456789' '1234567456788.9' -> 0.1
ddsub672 subtract '1234567456789' '1234567456789.1' -> -0.1
ddsub673 subtract '1234567456789' '1234567456789.5' -> -0.5
ddsub674 subtract '1234567456789' '1234567456789.9' -> -0.9
rounding: half_even
ddsub680 subtract '1234567456789' '1234567456788.1' -> 0.9
ddsub681 subtract '1234567456789' '1234567456788.9' -> 0.1
ddsub682 subtract '1234567456789' '1234567456789.1' -> -0.1
ddsub683 subtract '1234567456789' '1234567456789.5' -> -0.5
ddsub684 subtract '1234567456789' '1234567456789.9' -> -0.9
ddsub685 subtract '1234567456788' '1234567456787.1' -> 0.9
ddsub686 subtract '1234567456788' '1234567456787.9' -> 0.1
ddsub687 subtract '1234567456788' '1234567456788.1' -> -0.1
ddsub688 subtract '1234567456788' '1234567456788.5' -> -0.5
ddsub689 subtract '1234567456788' '1234567456788.9' -> -0.9
rounding: down
ddsub690 subtract '1234567456789' '1234567456788.1' -> 0.9
ddsub691 subtract '1234567456789' '1234567456788.9' -> 0.1
ddsub692 subtract '1234567456789' '1234567456789.1' -> -0.1
ddsub693 subtract '1234567456789' '1234567456789.5' -> -0.5
ddsub694 subtract '1234567456789' '1234567456789.9' -> -0.9
-- Specials
ddsub780 subtract -Inf Inf -> -Infinity
ddsub781 subtract -Inf 1000 -> -Infinity
ddsub782 subtract -Inf 1 -> -Infinity
ddsub783 subtract -Inf -0 -> -Infinity
ddsub784 subtract -Inf -1 -> -Infinity
ddsub785 subtract -Inf -1000 -> -Infinity
ddsub787 subtract -1000 Inf -> -Infinity
ddsub788 subtract -Inf Inf -> -Infinity
ddsub789 subtract -1 Inf -> -Infinity
ddsub790 subtract 0 Inf -> -Infinity
ddsub791 subtract 1 Inf -> -Infinity
ddsub792 subtract 1000 Inf -> -Infinity
ddsub800 subtract Inf Inf -> NaN Invalid_operation
ddsub801 subtract Inf 1000 -> Infinity
ddsub802 subtract Inf 1 -> Infinity
ddsub803 subtract Inf 0 -> Infinity
ddsub804 subtract Inf -0 -> Infinity
ddsub805 subtract Inf -1 -> Infinity
ddsub806 subtract Inf -1000 -> Infinity
ddsub807 subtract Inf -Inf -> Infinity
ddsub808 subtract -1000 -Inf -> Infinity
ddsub809 subtract -Inf -Inf -> NaN Invalid_operation
ddsub810 subtract -1 -Inf -> Infinity
ddsub811 subtract -0 -Inf -> Infinity
ddsub812 subtract 0 -Inf -> Infinity
ddsub813 subtract 1 -Inf -> Infinity
ddsub814 subtract 1000 -Inf -> Infinity
ddsub815 subtract Inf -Inf -> Infinity
ddsub821 subtract NaN Inf -> NaN
ddsub822 subtract -NaN 1000 -> -NaN
ddsub823 subtract NaN 1 -> NaN
ddsub824 subtract NaN 0 -> NaN
ddsub825 subtract NaN -0 -> NaN
ddsub826 subtract NaN -1 -> NaN
ddsub827 subtract NaN -1000 -> NaN
ddsub828 subtract NaN -Inf -> NaN
ddsub829 subtract -NaN NaN -> -NaN
ddsub830 subtract -Inf NaN -> NaN
ddsub831 subtract -1000 NaN -> NaN
ddsub832 subtract -1 NaN -> NaN
ddsub833 subtract -0 NaN -> NaN
ddsub834 subtract 0 NaN -> NaN
ddsub835 subtract 1 NaN -> NaN
ddsub836 subtract 1000 -NaN -> -NaN
ddsub837 subtract Inf NaN -> NaN
ddsub841 subtract sNaN Inf -> NaN Invalid_operation
ddsub842 subtract -sNaN 1000 -> -NaN Invalid_operation
ddsub843 subtract sNaN 1 -> NaN Invalid_operation
ddsub844 subtract sNaN 0 -> NaN Invalid_operation
ddsub845 subtract sNaN -0 -> NaN Invalid_operation
ddsub846 subtract sNaN -1 -> NaN Invalid_operation
ddsub847 subtract sNaN -1000 -> NaN Invalid_operation
ddsub848 subtract sNaN NaN -> NaN Invalid_operation
ddsub849 subtract sNaN sNaN -> NaN Invalid_operation
ddsub850 subtract NaN sNaN -> NaN Invalid_operation
ddsub851 subtract -Inf -sNaN -> -NaN Invalid_operation
ddsub852 subtract -1000 sNaN -> NaN Invalid_operation
ddsub853 subtract -1 sNaN -> NaN Invalid_operation
ddsub854 subtract -0 sNaN -> NaN Invalid_operation
ddsub855 subtract 0 sNaN -> NaN Invalid_operation
ddsub856 subtract 1 sNaN -> NaN Invalid_operation
ddsub857 subtract 1000 sNaN -> NaN Invalid_operation
ddsub858 subtract Inf sNaN -> NaN Invalid_operation
ddsub859 subtract NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddsub861 subtract NaN01 -Inf -> NaN1
ddsub862 subtract -NaN02 -1000 -> -NaN2
ddsub863 subtract NaN03 1000 -> NaN3
ddsub864 subtract NaN04 Inf -> NaN4
ddsub865 subtract NaN05 NaN61 -> NaN5
ddsub866 subtract -Inf -NaN71 -> -NaN71
ddsub867 subtract -1000 NaN81 -> NaN81
ddsub868 subtract 1000 NaN91 -> NaN91
ddsub869 subtract Inf NaN101 -> NaN101
ddsub871 subtract sNaN011 -Inf -> NaN11 Invalid_operation
ddsub872 subtract sNaN012 -1000 -> NaN12 Invalid_operation
ddsub873 subtract -sNaN013 1000 -> -NaN13 Invalid_operation
ddsub874 subtract sNaN014 NaN171 -> NaN14 Invalid_operation
ddsub875 subtract sNaN015 sNaN181 -> NaN15 Invalid_operation
ddsub876 subtract NaN016 sNaN191 -> NaN191 Invalid_operation
ddsub877 subtract -Inf sNaN201 -> NaN201 Invalid_operation
ddsub878 subtract -1000 sNaN211 -> NaN211 Invalid_operation
ddsub879 subtract 1000 -sNaN221 -> -NaN221 Invalid_operation
ddsub880 subtract Inf sNaN231 -> NaN231 Invalid_operation
ddsub881 subtract NaN025 sNaN241 -> NaN241 Invalid_operation
-- edge case spills
ddsub901 subtract 2.E-3 1.002 -> -1.000
ddsub902 subtract 2.0E-3 1.002 -> -1.0000
ddsub903 subtract 2.00E-3 1.0020 -> -1.00000
ddsub904 subtract 2.000E-3 1.00200 -> -1.000000
ddsub905 subtract 2.0000E-3 1.002000 -> -1.0000000
ddsub906 subtract 2.00000E-3 1.0020000 -> -1.00000000
ddsub907 subtract 2.000000E-3 1.00200000 -> -1.000000000
ddsub908 subtract 2.0000000E-3 1.002000000 -> -1.0000000000
-- subnormals and overflows covered under Add
-- Null tests
ddsub9990 subtract 10 # -> NaN Invalid_operation
ddsub9991 subtract # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,257 @@
------------------------------------------------------------------------
-- ddToIntegral.decTest -- round Double to integral value --
-- Copyright (c) IBM Corporation, 2001, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- This set of tests tests the extended specification 'round-to-integral
-- value-exact' operations (from IEEE 854, later modified in 754r).
-- All non-zero results are defined as being those from either copy or
-- quantize, so those are assumed to have been tested extensively
-- elsewhere; the tests here are for integrity, rounding mode, etc.
-- Also, it is assumed the test harness will use these tests for both
-- ToIntegralExact (which does set Inexact) and the fixed-name
-- functions (which do not set Inexact).
-- Note that decNumber implements an earlier definition of toIntegral
-- which never sets Inexact; the decTest operator for that is called
-- 'tointegral' instead of 'tointegralx'.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
ddintx001 tointegralx 0 -> 0
ddintx002 tointegralx 0.0 -> 0
ddintx003 tointegralx 0.1 -> 0 Inexact Rounded
ddintx004 tointegralx 0.2 -> 0 Inexact Rounded
ddintx005 tointegralx 0.3 -> 0 Inexact Rounded
ddintx006 tointegralx 0.4 -> 0 Inexact Rounded
ddintx007 tointegralx 0.5 -> 0 Inexact Rounded
ddintx008 tointegralx 0.6 -> 1 Inexact Rounded
ddintx009 tointegralx 0.7 -> 1 Inexact Rounded
ddintx010 tointegralx 0.8 -> 1 Inexact Rounded
ddintx011 tointegralx 0.9 -> 1 Inexact Rounded
ddintx012 tointegralx 1 -> 1
ddintx013 tointegralx 1.0 -> 1 Rounded
ddintx014 tointegralx 1.1 -> 1 Inexact Rounded
ddintx015 tointegralx 1.2 -> 1 Inexact Rounded
ddintx016 tointegralx 1.3 -> 1 Inexact Rounded
ddintx017 tointegralx 1.4 -> 1 Inexact Rounded
ddintx018 tointegralx 1.5 -> 2 Inexact Rounded
ddintx019 tointegralx 1.6 -> 2 Inexact Rounded
ddintx020 tointegralx 1.7 -> 2 Inexact Rounded
ddintx021 tointegralx 1.8 -> 2 Inexact Rounded
ddintx022 tointegralx 1.9 -> 2 Inexact Rounded
-- negatives
ddintx031 tointegralx -0 -> -0
ddintx032 tointegralx -0.0 -> -0
ddintx033 tointegralx -0.1 -> -0 Inexact Rounded
ddintx034 tointegralx -0.2 -> -0 Inexact Rounded
ddintx035 tointegralx -0.3 -> -0 Inexact Rounded
ddintx036 tointegralx -0.4 -> -0 Inexact Rounded
ddintx037 tointegralx -0.5 -> -0 Inexact Rounded
ddintx038 tointegralx -0.6 -> -1 Inexact Rounded
ddintx039 tointegralx -0.7 -> -1 Inexact Rounded
ddintx040 tointegralx -0.8 -> -1 Inexact Rounded
ddintx041 tointegralx -0.9 -> -1 Inexact Rounded
ddintx042 tointegralx -1 -> -1
ddintx043 tointegralx -1.0 -> -1 Rounded
ddintx044 tointegralx -1.1 -> -1 Inexact Rounded
ddintx045 tointegralx -1.2 -> -1 Inexact Rounded
ddintx046 tointegralx -1.3 -> -1 Inexact Rounded
ddintx047 tointegralx -1.4 -> -1 Inexact Rounded
ddintx048 tointegralx -1.5 -> -2 Inexact Rounded
ddintx049 tointegralx -1.6 -> -2 Inexact Rounded
ddintx050 tointegralx -1.7 -> -2 Inexact Rounded
ddintx051 tointegralx -1.8 -> -2 Inexact Rounded
ddintx052 tointegralx -1.9 -> -2 Inexact Rounded
-- next two would be NaN using quantize(x, 0)
ddintx053 tointegralx 10E+60 -> 1.0E+61
ddintx054 tointegralx -10E+60 -> -1.0E+61
-- numbers around precision
ddintx060 tointegralx '56267E-17' -> '0' Inexact Rounded
ddintx061 tointegralx '56267E-5' -> '1' Inexact Rounded
ddintx062 tointegralx '56267E-2' -> '563' Inexact Rounded
ddintx063 tointegralx '56267E-1' -> '5627' Inexact Rounded
ddintx065 tointegralx '56267E-0' -> '56267'
ddintx066 tointegralx '56267E+0' -> '56267'
ddintx067 tointegralx '56267E+1' -> '5.6267E+5'
ddintx068 tointegralx '56267E+9' -> '5.6267E+13'
ddintx069 tointegralx '56267E+10' -> '5.6267E+14'
ddintx070 tointegralx '56267E+11' -> '5.6267E+15'
ddintx071 tointegralx '56267E+12' -> '5.6267E+16'
ddintx072 tointegralx '56267E+13' -> '5.6267E+17'
ddintx073 tointegralx '1.23E+96' -> '1.23E+96'
ddintx074 tointegralx '1.23E+384' -> #47fd300000000000 Clamped
ddintx080 tointegralx '-56267E-10' -> '-0' Inexact Rounded
ddintx081 tointegralx '-56267E-5' -> '-1' Inexact Rounded
ddintx082 tointegralx '-56267E-2' -> '-563' Inexact Rounded
ddintx083 tointegralx '-56267E-1' -> '-5627' Inexact Rounded
ddintx085 tointegralx '-56267E-0' -> '-56267'
ddintx086 tointegralx '-56267E+0' -> '-56267'
ddintx087 tointegralx '-56267E+1' -> '-5.6267E+5'
ddintx088 tointegralx '-56267E+9' -> '-5.6267E+13'
ddintx089 tointegralx '-56267E+10' -> '-5.6267E+14'
ddintx090 tointegralx '-56267E+11' -> '-5.6267E+15'
ddintx091 tointegralx '-56267E+12' -> '-5.6267E+16'
ddintx092 tointegralx '-56267E+13' -> '-5.6267E+17'
ddintx093 tointegralx '-1.23E+96' -> '-1.23E+96'
ddintx094 tointegralx '-1.23E+384' -> #c7fd300000000000 Clamped
-- subnormal inputs
ddintx100 tointegralx 1E-299 -> 0 Inexact Rounded
ddintx101 tointegralx 0.1E-299 -> 0 Inexact Rounded
ddintx102 tointegralx 0.01E-299 -> 0 Inexact Rounded
ddintx103 tointegralx 0E-299 -> 0
-- specials and zeros
ddintx120 tointegralx 'Inf' -> Infinity
ddintx121 tointegralx '-Inf' -> -Infinity
ddintx122 tointegralx NaN -> NaN
ddintx123 tointegralx sNaN -> NaN Invalid_operation
ddintx124 tointegralx 0 -> 0
ddintx125 tointegralx -0 -> -0
ddintx126 tointegralx 0.000 -> 0
ddintx127 tointegralx 0.00 -> 0
ddintx128 tointegralx 0.0 -> 0
ddintx129 tointegralx 0 -> 0
ddintx130 tointegralx 0E-3 -> 0
ddintx131 tointegralx 0E-2 -> 0
ddintx132 tointegralx 0E-1 -> 0
ddintx133 tointegralx 0E-0 -> 0
ddintx134 tointegralx 0E+1 -> 0E+1
ddintx135 tointegralx 0E+2 -> 0E+2
ddintx136 tointegralx 0E+3 -> 0E+3
ddintx137 tointegralx 0E+4 -> 0E+4
ddintx138 tointegralx 0E+5 -> 0E+5
ddintx139 tointegralx -0.000 -> -0
ddintx140 tointegralx -0.00 -> -0
ddintx141 tointegralx -0.0 -> -0
ddintx142 tointegralx -0 -> -0
ddintx143 tointegralx -0E-3 -> -0
ddintx144 tointegralx -0E-2 -> -0
ddintx145 tointegralx -0E-1 -> -0
ddintx146 tointegralx -0E-0 -> -0
ddintx147 tointegralx -0E+1 -> -0E+1
ddintx148 tointegralx -0E+2 -> -0E+2
ddintx149 tointegralx -0E+3 -> -0E+3
ddintx150 tointegralx -0E+4 -> -0E+4
ddintx151 tointegralx -0E+5 -> -0E+5
-- propagating NaNs
ddintx152 tointegralx NaN808 -> NaN808
ddintx153 tointegralx sNaN080 -> NaN80 Invalid_operation
ddintx154 tointegralx -NaN808 -> -NaN808
ddintx155 tointegralx -sNaN080 -> -NaN80 Invalid_operation
ddintx156 tointegralx -NaN -> -NaN
ddintx157 tointegralx -sNaN -> -NaN Invalid_operation
-- examples
rounding: half_up
ddintx200 tointegralx 2.1 -> 2 Inexact Rounded
ddintx201 tointegralx 100 -> 100
ddintx202 tointegralx 100.0 -> 100 Rounded
ddintx203 tointegralx 101.5 -> 102 Inexact Rounded
ddintx204 tointegralx -101.5 -> -102 Inexact Rounded
ddintx205 tointegralx 10E+5 -> 1.0E+6
ddintx206 tointegralx 7.89E+77 -> 7.89E+77
ddintx207 tointegralx -Inf -> -Infinity
-- all rounding modes
rounding: half_even
ddintx210 tointegralx 55.5 -> 56 Inexact Rounded
ddintx211 tointegralx 56.5 -> 56 Inexact Rounded
ddintx212 tointegralx 57.5 -> 58 Inexact Rounded
ddintx213 tointegralx -55.5 -> -56 Inexact Rounded
ddintx214 tointegralx -56.5 -> -56 Inexact Rounded
ddintx215 tointegralx -57.5 -> -58 Inexact Rounded
rounding: half_up
ddintx220 tointegralx 55.5 -> 56 Inexact Rounded
ddintx221 tointegralx 56.5 -> 57 Inexact Rounded
ddintx222 tointegralx 57.5 -> 58 Inexact Rounded
ddintx223 tointegralx -55.5 -> -56 Inexact Rounded
ddintx224 tointegralx -56.5 -> -57 Inexact Rounded
ddintx225 tointegralx -57.5 -> -58 Inexact Rounded
rounding: half_down
ddintx230 tointegralx 55.5 -> 55 Inexact Rounded
ddintx231 tointegralx 56.5 -> 56 Inexact Rounded
ddintx232 tointegralx 57.5 -> 57 Inexact Rounded
ddintx233 tointegralx -55.5 -> -55 Inexact Rounded
ddintx234 tointegralx -56.5 -> -56 Inexact Rounded
ddintx235 tointegralx -57.5 -> -57 Inexact Rounded
rounding: up
ddintx240 tointegralx 55.3 -> 56 Inexact Rounded
ddintx241 tointegralx 56.3 -> 57 Inexact Rounded
ddintx242 tointegralx 57.3 -> 58 Inexact Rounded
ddintx243 tointegralx -55.3 -> -56 Inexact Rounded
ddintx244 tointegralx -56.3 -> -57 Inexact Rounded
ddintx245 tointegralx -57.3 -> -58 Inexact Rounded
rounding: down
ddintx250 tointegralx 55.7 -> 55 Inexact Rounded
ddintx251 tointegralx 56.7 -> 56 Inexact Rounded
ddintx252 tointegralx 57.7 -> 57 Inexact Rounded
ddintx253 tointegralx -55.7 -> -55 Inexact Rounded
ddintx254 tointegralx -56.7 -> -56 Inexact Rounded
ddintx255 tointegralx -57.7 -> -57 Inexact Rounded
rounding: ceiling
ddintx260 tointegralx 55.3 -> 56 Inexact Rounded
ddintx261 tointegralx 56.3 -> 57 Inexact Rounded
ddintx262 tointegralx 57.3 -> 58 Inexact Rounded
ddintx263 tointegralx -55.3 -> -55 Inexact Rounded
ddintx264 tointegralx -56.3 -> -56 Inexact Rounded
ddintx265 tointegralx -57.3 -> -57 Inexact Rounded
rounding: floor
ddintx270 tointegralx 55.7 -> 55 Inexact Rounded
ddintx271 tointegralx 56.7 -> 56 Inexact Rounded
ddintx272 tointegralx 57.7 -> 57 Inexact Rounded
ddintx273 tointegralx -55.7 -> -56 Inexact Rounded
ddintx274 tointegralx -56.7 -> -57 Inexact Rounded
ddintx275 tointegralx -57.7 -> -58 Inexact Rounded
-- Int and uInt32 edge values for testing conversions
ddintx300 tointegralx -2147483646 -> -2147483646
ddintx301 tointegralx -2147483647 -> -2147483647
ddintx302 tointegralx -2147483648 -> -2147483648
ddintx303 tointegralx -2147483649 -> -2147483649
ddintx304 tointegralx 2147483646 -> 2147483646
ddintx305 tointegralx 2147483647 -> 2147483647
ddintx306 tointegralx 2147483648 -> 2147483648
ddintx307 tointegralx 2147483649 -> 2147483649
ddintx308 tointegralx 4294967294 -> 4294967294
ddintx309 tointegralx 4294967295 -> 4294967295
ddintx310 tointegralx 4294967296 -> 4294967296
ddintx311 tointegralx 4294967297 -> 4294967297

View File

@@ -0,0 +1,337 @@
------------------------------------------------------------------------
-- ddXor.decTest -- digitwise logical XOR for decDoubles --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- Sanity check (truth table)
ddxor001 xor 0 0 -> 0
ddxor002 xor 0 1 -> 1
ddxor003 xor 1 0 -> 1
ddxor004 xor 1 1 -> 0
ddxor005 xor 1100 1010 -> 110
-- and at msd and msd-1
ddxor006 xor 0000000000000000 0000000000000000 -> 0
ddxor007 xor 0000000000000000 1000000000000000 -> 1000000000000000
ddxor008 xor 1000000000000000 0000000000000000 -> 1000000000000000
ddxor009 xor 1000000000000000 1000000000000000 -> 0
ddxor010 xor 0000000000000000 0000000000000000 -> 0
ddxor011 xor 0000000000000000 0100000000000000 -> 100000000000000
ddxor012 xor 0100000000000000 0000000000000000 -> 100000000000000
ddxor013 xor 0100000000000000 0100000000000000 -> 0
-- Various lengths
-- 1234567890123456 1234567890123456 1234567890123456
ddxor021 xor 1111111110000000 1111111110000000 -> 0
ddxor022 xor 111111110000000 111111110000000 -> 0
ddxor023 xor 11111110000000 11111110000000 -> 0
ddxor024 xor 1111110000000 1111110000000 -> 0
ddxor025 xor 111110000000 111110000000 -> 0
ddxor026 xor 11110000000 11110000000 -> 0
ddxor027 xor 1110000000 1110000000 -> 0
ddxor028 xor 110000000 110000000 -> 0
ddxor029 xor 10000000 10000000 -> 0
ddxor030 xor 1000000 1000000 -> 0
ddxor031 xor 100000 100000 -> 0
ddxor032 xor 10000 10000 -> 0
ddxor033 xor 1000 1000 -> 0
ddxor034 xor 100 100 -> 0
ddxor035 xor 10 10 -> 0
ddxor036 xor 1 1 -> 0
ddxor040 xor 111111111 111111111111 -> 111000000000
ddxor041 xor 11111111 111111111111 -> 111100000000
ddxor042 xor 11111111 111111111 -> 100000000
ddxor043 xor 1111111 100000010 -> 101111101
ddxor044 xor 111111 100000100 -> 100111011
ddxor045 xor 11111 100001000 -> 100010111
ddxor046 xor 1111 100010000 -> 100011111
ddxor047 xor 111 100100000 -> 100100111
ddxor048 xor 11 101000000 -> 101000011
ddxor049 xor 1 110000000 -> 110000001
ddxor050 xor 1111111111 1 -> 1111111110
ddxor051 xor 111111111 1 -> 111111110
ddxor052 xor 11111111 1 -> 11111110
ddxor053 xor 1111111 1 -> 1111110
ddxor054 xor 111111 1 -> 111110
ddxor055 xor 11111 1 -> 11110
ddxor056 xor 1111 1 -> 1110
ddxor057 xor 111 1 -> 110
ddxor058 xor 11 1 -> 10
ddxor059 xor 1 1 -> 0
ddxor060 xor 1111111111 0 -> 1111111111
ddxor061 xor 111111111 0 -> 111111111
ddxor062 xor 11111111 0 -> 11111111
ddxor063 xor 1111111 0 -> 1111111
ddxor064 xor 111111 0 -> 111111
ddxor065 xor 11111 0 -> 11111
ddxor066 xor 1111 0 -> 1111
ddxor067 xor 111 0 -> 111
ddxor068 xor 11 0 -> 11
ddxor069 xor 1 0 -> 1
ddxor070 xor 1 1111111111 -> 1111111110
ddxor071 xor 1 111111111 -> 111111110
ddxor072 xor 1 11111111 -> 11111110
ddxor073 xor 1 1111111 -> 1111110
ddxor074 xor 1 111111 -> 111110
ddxor075 xor 1 11111 -> 11110
ddxor076 xor 1 1111 -> 1110
ddxor077 xor 1 111 -> 110
ddxor078 xor 1 11 -> 10
ddxor079 xor 1 1 -> 0
ddxor080 xor 0 1111111111 -> 1111111111
ddxor081 xor 0 111111111 -> 111111111
ddxor082 xor 0 11111111 -> 11111111
ddxor083 xor 0 1111111 -> 1111111
ddxor084 xor 0 111111 -> 111111
ddxor085 xor 0 11111 -> 11111
ddxor086 xor 0 1111 -> 1111
ddxor087 xor 0 111 -> 111
ddxor088 xor 0 11 -> 11
ddxor089 xor 0 1 -> 1
ddxor090 xor 011111111 111101111 -> 100010000
ddxor091 xor 101111111 111101111 -> 10010000
ddxor092 xor 110111111 111101111 -> 1010000
ddxor093 xor 111011111 111101111 -> 110000
ddxor094 xor 111101111 111101111 -> 0
ddxor095 xor 111110111 111101111 -> 11000
ddxor096 xor 111111011 111101111 -> 10100
ddxor097 xor 111111101 111101111 -> 10010
ddxor098 xor 111111110 111101111 -> 10001
ddxor100 xor 111101111 011111111 -> 100010000
ddxor101 xor 111101111 101111111 -> 10010000
ddxor102 xor 111101111 110111111 -> 1010000
ddxor103 xor 111101111 111011111 -> 110000
ddxor104 xor 111101111 111101111 -> 0
ddxor105 xor 111101111 111110111 -> 11000
ddxor106 xor 111101111 111111011 -> 10100
ddxor107 xor 111101111 111111101 -> 10010
ddxor108 xor 111101111 111111110 -> 10001
-- non-0/1 should not be accepted, nor should signs
ddxor220 xor 111111112 111111111 -> NaN Invalid_operation
ddxor221 xor 333333333 333333333 -> NaN Invalid_operation
ddxor222 xor 555555555 555555555 -> NaN Invalid_operation
ddxor223 xor 777777777 777777777 -> NaN Invalid_operation
ddxor224 xor 999999999 999999999 -> NaN Invalid_operation
ddxor225 xor 222222222 999999999 -> NaN Invalid_operation
ddxor226 xor 444444444 999999999 -> NaN Invalid_operation
ddxor227 xor 666666666 999999999 -> NaN Invalid_operation
ddxor228 xor 888888888 999999999 -> NaN Invalid_operation
ddxor229 xor 999999999 222222222 -> NaN Invalid_operation
ddxor230 xor 999999999 444444444 -> NaN Invalid_operation
ddxor231 xor 999999999 666666666 -> NaN Invalid_operation
ddxor232 xor 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
ddxor240 xor 567468689 -934981942 -> NaN Invalid_operation
ddxor241 xor 567367689 934981942 -> NaN Invalid_operation
ddxor242 xor -631917772 -706014634 -> NaN Invalid_operation
ddxor243 xor -756253257 138579234 -> NaN Invalid_operation
ddxor244 xor 835590149 567435400 -> NaN Invalid_operation
-- test MSD
ddxor250 xor 2000000000000000 1000000000000000 -> NaN Invalid_operation
ddxor251 xor 7000000000000000 1000000000000000 -> NaN Invalid_operation
ddxor252 xor 8000000000000000 1000000000000000 -> NaN Invalid_operation
ddxor253 xor 9000000000000000 1000000000000000 -> NaN Invalid_operation
ddxor254 xor 2000000000000000 0000000000000000 -> NaN Invalid_operation
ddxor255 xor 7000000000000000 0000000000000000 -> NaN Invalid_operation
ddxor256 xor 8000000000000000 0000000000000000 -> NaN Invalid_operation
ddxor257 xor 9000000000000000 0000000000000000 -> NaN Invalid_operation
ddxor258 xor 1000000000000000 2000000000000000 -> NaN Invalid_operation
ddxor259 xor 1000000000000000 7000000000000000 -> NaN Invalid_operation
ddxor260 xor 1000000000000000 8000000000000000 -> NaN Invalid_operation
ddxor261 xor 1000000000000000 9000000000000000 -> NaN Invalid_operation
ddxor262 xor 0000000000000000 2000000000000000 -> NaN Invalid_operation
ddxor263 xor 0000000000000000 7000000000000000 -> NaN Invalid_operation
ddxor264 xor 0000000000000000 8000000000000000 -> NaN Invalid_operation
ddxor265 xor 0000000000000000 9000000000000000 -> NaN Invalid_operation
-- test MSD-1
ddxor270 xor 0200001000000000 1000100000000010 -> NaN Invalid_operation
ddxor271 xor 0700000100000000 1000010000000100 -> NaN Invalid_operation
ddxor272 xor 0800000010000000 1000001000001000 -> NaN Invalid_operation
ddxor273 xor 0900000001000000 1000000100010000 -> NaN Invalid_operation
ddxor274 xor 1000000000100000 0200000010100000 -> NaN Invalid_operation
ddxor275 xor 1000000000010000 0700000001000000 -> NaN Invalid_operation
ddxor276 xor 1000000000001000 0800000010100000 -> NaN Invalid_operation
ddxor277 xor 1000000000000100 0900000000010000 -> NaN Invalid_operation
-- test LSD
ddxor280 xor 0010000000000002 1000000100000001 -> NaN Invalid_operation
ddxor281 xor 0001000000000007 1000001000000011 -> NaN Invalid_operation
ddxor282 xor 0000100000000008 1000010000000001 -> NaN Invalid_operation
ddxor283 xor 0000010000000009 1000100000000001 -> NaN Invalid_operation
ddxor284 xor 1000001000000000 0001000000000002 -> NaN Invalid_operation
ddxor285 xor 1000000100000000 0010000000000007 -> NaN Invalid_operation
ddxor286 xor 1000000010000000 0100000000000008 -> NaN Invalid_operation
ddxor287 xor 1000000001000000 1000000000000009 -> NaN Invalid_operation
-- test Middie
ddxor288 xor 0010000020000000 1000001000000000 -> NaN Invalid_operation
ddxor289 xor 0001000070000001 1000000100000000 -> NaN Invalid_operation
ddxor290 xor 0000100080000010 1000000010000000 -> NaN Invalid_operation
ddxor291 xor 0000010090000100 1000000001000000 -> NaN Invalid_operation
ddxor292 xor 1000001000001000 0000000020100000 -> NaN Invalid_operation
ddxor293 xor 1000000100010000 0000000070010000 -> NaN Invalid_operation
ddxor294 xor 1000000010100000 0000000080001000 -> NaN Invalid_operation
ddxor295 xor 1000000001000000 0000000090000100 -> NaN Invalid_operation
-- signs
ddxor296 xor -1000000001000000 -0000010000000100 -> NaN Invalid_operation
ddxor297 xor -1000000001000000 0000000010000100 -> NaN Invalid_operation
ddxor298 xor 1000000001000000 -0000001000000100 -> NaN Invalid_operation
ddxor299 xor 1000000001000000 0000000011000100 -> 1000000010000100
-- Nmax, Nmin, Ntiny-like
ddxor331 xor 2 9.99999999E+299 -> NaN Invalid_operation
ddxor332 xor 3 1E-299 -> NaN Invalid_operation
ddxor333 xor 4 1.00000000E-299 -> NaN Invalid_operation
ddxor334 xor 5 1E-200 -> NaN Invalid_operation
ddxor335 xor 6 -1E-200 -> NaN Invalid_operation
ddxor336 xor 7 -1.00000000E-299 -> NaN Invalid_operation
ddxor337 xor 8 -1E-299 -> NaN Invalid_operation
ddxor338 xor 9 -9.99999999E+299 -> NaN Invalid_operation
ddxor341 xor 9.99999999E+299 -18 -> NaN Invalid_operation
ddxor342 xor 1E-299 01 -> NaN Invalid_operation
ddxor343 xor 1.00000000E-299 -18 -> NaN Invalid_operation
ddxor344 xor 1E-208 18 -> NaN Invalid_operation
ddxor345 xor -1E-207 -10 -> NaN Invalid_operation
ddxor346 xor -1.00000000E-299 18 -> NaN Invalid_operation
ddxor347 xor -1E-299 10 -> NaN Invalid_operation
ddxor348 xor -9.99999999E+299 -18 -> NaN Invalid_operation
-- A few other non-integers
ddxor361 xor 1.0 1 -> NaN Invalid_operation
ddxor362 xor 1E+1 1 -> NaN Invalid_operation
ddxor363 xor 0.0 1 -> NaN Invalid_operation
ddxor364 xor 0E+1 1 -> NaN Invalid_operation
ddxor365 xor 9.9 1 -> NaN Invalid_operation
ddxor366 xor 9E+1 1 -> NaN Invalid_operation
ddxor371 xor 0 1.0 -> NaN Invalid_operation
ddxor372 xor 0 1E+1 -> NaN Invalid_operation
ddxor373 xor 0 0.0 -> NaN Invalid_operation
ddxor374 xor 0 0E+1 -> NaN Invalid_operation
ddxor375 xor 0 9.9 -> NaN Invalid_operation
ddxor376 xor 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
ddxor780 xor -Inf -Inf -> NaN Invalid_operation
ddxor781 xor -Inf -1000 -> NaN Invalid_operation
ddxor782 xor -Inf -1 -> NaN Invalid_operation
ddxor783 xor -Inf -0 -> NaN Invalid_operation
ddxor784 xor -Inf 0 -> NaN Invalid_operation
ddxor785 xor -Inf 1 -> NaN Invalid_operation
ddxor786 xor -Inf 1000 -> NaN Invalid_operation
ddxor787 xor -1000 -Inf -> NaN Invalid_operation
ddxor788 xor -Inf -Inf -> NaN Invalid_operation
ddxor789 xor -1 -Inf -> NaN Invalid_operation
ddxor790 xor -0 -Inf -> NaN Invalid_operation
ddxor791 xor 0 -Inf -> NaN Invalid_operation
ddxor792 xor 1 -Inf -> NaN Invalid_operation
ddxor793 xor 1000 -Inf -> NaN Invalid_operation
ddxor794 xor Inf -Inf -> NaN Invalid_operation
ddxor800 xor Inf -Inf -> NaN Invalid_operation
ddxor801 xor Inf -1000 -> NaN Invalid_operation
ddxor802 xor Inf -1 -> NaN Invalid_operation
ddxor803 xor Inf -0 -> NaN Invalid_operation
ddxor804 xor Inf 0 -> NaN Invalid_operation
ddxor805 xor Inf 1 -> NaN Invalid_operation
ddxor806 xor Inf 1000 -> NaN Invalid_operation
ddxor807 xor Inf Inf -> NaN Invalid_operation
ddxor808 xor -1000 Inf -> NaN Invalid_operation
ddxor809 xor -Inf Inf -> NaN Invalid_operation
ddxor810 xor -1 Inf -> NaN Invalid_operation
ddxor811 xor -0 Inf -> NaN Invalid_operation
ddxor812 xor 0 Inf -> NaN Invalid_operation
ddxor813 xor 1 Inf -> NaN Invalid_operation
ddxor814 xor 1000 Inf -> NaN Invalid_operation
ddxor815 xor Inf Inf -> NaN Invalid_operation
ddxor821 xor NaN -Inf -> NaN Invalid_operation
ddxor822 xor NaN -1000 -> NaN Invalid_operation
ddxor823 xor NaN -1 -> NaN Invalid_operation
ddxor824 xor NaN -0 -> NaN Invalid_operation
ddxor825 xor NaN 0 -> NaN Invalid_operation
ddxor826 xor NaN 1 -> NaN Invalid_operation
ddxor827 xor NaN 1000 -> NaN Invalid_operation
ddxor828 xor NaN Inf -> NaN Invalid_operation
ddxor829 xor NaN NaN -> NaN Invalid_operation
ddxor830 xor -Inf NaN -> NaN Invalid_operation
ddxor831 xor -1000 NaN -> NaN Invalid_operation
ddxor832 xor -1 NaN -> NaN Invalid_operation
ddxor833 xor -0 NaN -> NaN Invalid_operation
ddxor834 xor 0 NaN -> NaN Invalid_operation
ddxor835 xor 1 NaN -> NaN Invalid_operation
ddxor836 xor 1000 NaN -> NaN Invalid_operation
ddxor837 xor Inf NaN -> NaN Invalid_operation
ddxor841 xor sNaN -Inf -> NaN Invalid_operation
ddxor842 xor sNaN -1000 -> NaN Invalid_operation
ddxor843 xor sNaN -1 -> NaN Invalid_operation
ddxor844 xor sNaN -0 -> NaN Invalid_operation
ddxor845 xor sNaN 0 -> NaN Invalid_operation
ddxor846 xor sNaN 1 -> NaN Invalid_operation
ddxor847 xor sNaN 1000 -> NaN Invalid_operation
ddxor848 xor sNaN NaN -> NaN Invalid_operation
ddxor849 xor sNaN sNaN -> NaN Invalid_operation
ddxor850 xor NaN sNaN -> NaN Invalid_operation
ddxor851 xor -Inf sNaN -> NaN Invalid_operation
ddxor852 xor -1000 sNaN -> NaN Invalid_operation
ddxor853 xor -1 sNaN -> NaN Invalid_operation
ddxor854 xor -0 sNaN -> NaN Invalid_operation
ddxor855 xor 0 sNaN -> NaN Invalid_operation
ddxor856 xor 1 sNaN -> NaN Invalid_operation
ddxor857 xor 1000 sNaN -> NaN Invalid_operation
ddxor858 xor Inf sNaN -> NaN Invalid_operation
ddxor859 xor NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddxor861 xor NaN1 -Inf -> NaN Invalid_operation
ddxor862 xor +NaN2 -1000 -> NaN Invalid_operation
ddxor863 xor NaN3 1000 -> NaN Invalid_operation
ddxor864 xor NaN4 Inf -> NaN Invalid_operation
ddxor865 xor NaN5 +NaN6 -> NaN Invalid_operation
ddxor866 xor -Inf NaN7 -> NaN Invalid_operation
ddxor867 xor -1000 NaN8 -> NaN Invalid_operation
ddxor868 xor 1000 NaN9 -> NaN Invalid_operation
ddxor869 xor Inf +NaN10 -> NaN Invalid_operation
ddxor871 xor sNaN11 -Inf -> NaN Invalid_operation
ddxor872 xor sNaN12 -1000 -> NaN Invalid_operation
ddxor873 xor sNaN13 1000 -> NaN Invalid_operation
ddxor874 xor sNaN14 NaN17 -> NaN Invalid_operation
ddxor875 xor sNaN15 sNaN18 -> NaN Invalid_operation
ddxor876 xor NaN16 sNaN19 -> NaN Invalid_operation
ddxor877 xor -Inf +sNaN20 -> NaN Invalid_operation
ddxor878 xor -1000 sNaN21 -> NaN Invalid_operation
ddxor879 xor 1000 sNaN22 -> NaN Invalid_operation
ddxor880 xor Inf sNaN23 -> NaN Invalid_operation
ddxor881 xor +NaN25 +sNaN24 -> NaN Invalid_operation
ddxor882 xor -NaN26 NaN28 -> NaN Invalid_operation
ddxor883 xor -sNaN27 sNaN29 -> NaN Invalid_operation
ddxor884 xor 1000 -NaN30 -> NaN Invalid_operation
ddxor885 xor 1000 -sNaN31 -> NaN Invalid_operation

View File

@@ -0,0 +1,65 @@
------------------------------------------------------------------------
-- decDouble.decTest -- run all decDouble decimal arithmetic tests --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- decDouble tests
dectest: ddAbs
dectest: ddAdd
dectest: ddAnd
dectest: ddBase
dectest: ddCanonical
dectest: ddClass
dectest: ddCompare
dectest: ddCompareSig
dectest: ddCompareTotal
dectest: ddCompareTotalMag
dectest: ddCopy
dectest: ddCopyAbs
dectest: ddCopyNegate
dectest: ddCopySign
dectest: ddDivide
dectest: ddDivideInt
dectest: ddEncode
dectest: ddFMA
dectest: ddInvert
dectest: ddLogB
dectest: ddMax
dectest: ddMaxMag
dectest: ddMin
dectest: ddMinMag
dectest: ddMinus
dectest: ddMultiply
dectest: ddNextMinus
dectest: ddNextPlus
dectest: ddNextToward
dectest: ddOr
dectest: ddPlus
dectest: ddQuantize
dectest: ddReduce
dectest: ddRemainder
dectest: ddRemainderNear
dectest: ddRotate
dectest: ddSameQuantum
dectest: ddScaleB
dectest: ddShift
dectest: ddSubtract
dectest: ddToIntegral
dectest: ddXor

View File

@@ -0,0 +1,65 @@
------------------------------------------------------------------------
-- decQuad.decTest -- run all decQuad decimal arithmetic tests --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- decQuad tests
dectest: dqAbs
dectest: dqAdd
dectest: dqAnd
dectest: dqBase
dectest: dqCanonical
dectest: dqClass
dectest: dqCompare
dectest: dqCompareSig
dectest: dqCompareTotal
dectest: dqCompareTotalMag
dectest: dqCopy
dectest: dqCopyAbs
dectest: dqCopyNegate
dectest: dqCopySign
dectest: dqDivide
dectest: dqDivideInt
dectest: dqEncode
dectest: dqFMA
dectest: dqInvert
dectest: dqLogB
dectest: dqMax
dectest: dqMaxMag
dectest: dqMin
dectest: dqMinMag
dectest: dqMinus
dectest: dqMultiply
dectest: dqNextMinus
dectest: dqNextPlus
dectest: dqNextToward
dectest: dqOr
dectest: dqPlus
dectest: dqQuantize
dectest: dqReduce
dectest: dqRemainder
dectest: dqRemainderNear
dectest: dqRotate
dectest: dqSameQuantum
dectest: dqScaleB
dectest: dqShift
dectest: dqSubtract
dectest: dqToIntegral
dectest: dqXor

View File

@@ -0,0 +1,25 @@
------------------------------------------------------------------------
-- decSingle.decTest -- run all decSingle decimal arithmetic tests --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- decSingle tests
dectest: dsBase
dectest: dsEncode

View File

@@ -0,0 +1,854 @@
------------------------------------------------------------------------
-- divide.decTest -- decimal division --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
precision: 9
rounding: half_up
maxExponent: 384
minexponent: -383
-- sanity checks
divx001 divide 1 1 -> 1
divx002 divide 2 1 -> 2
divx003 divide 1 2 -> 0.5
divx004 divide 2 2 -> 1
divx005 divide 0 1 -> 0
divx006 divide 0 2 -> 0
divx007 divide 1 3 -> 0.333333333 Inexact Rounded
divx008 divide 2 3 -> 0.666666667 Inexact Rounded
divx009 divide 3 3 -> 1
divx010 divide 2.4 1 -> 2.4
divx011 divide 2.4 -1 -> -2.4
divx012 divide -2.4 1 -> -2.4
divx013 divide -2.4 -1 -> 2.4
divx014 divide 2.40 1 -> 2.40
divx015 divide 2.400 1 -> 2.400
divx016 divide 2.4 2 -> 1.2
divx017 divide 2.400 2 -> 1.200
divx018 divide 2. 2 -> 1
divx019 divide 20 20 -> 1
divx020 divide 187 187 -> 1
divx021 divide 5 2 -> 2.5
divx022 divide 50 20 -> 2.5
divx023 divide 500 200 -> 2.5
divx024 divide 50.0 20.0 -> 2.5
divx025 divide 5.00 2.00 -> 2.5
divx026 divide 5 2.0 -> 2.5
divx027 divide 5 2.000 -> 2.5
divx028 divide 5 0.20 -> 25
divx029 divide 5 0.200 -> 25
divx030 divide 10 1 -> 10
divx031 divide 100 1 -> 100
divx032 divide 1000 1 -> 1000
divx033 divide 1000 100 -> 10
divx035 divide 1 2 -> 0.5
divx036 divide 1 4 -> 0.25
divx037 divide 1 8 -> 0.125
divx038 divide 1 16 -> 0.0625
divx039 divide 1 32 -> 0.03125
divx040 divide 1 64 -> 0.015625
divx041 divide 1 -2 -> -0.5
divx042 divide 1 -4 -> -0.25
divx043 divide 1 -8 -> -0.125
divx044 divide 1 -16 -> -0.0625
divx045 divide 1 -32 -> -0.03125
divx046 divide 1 -64 -> -0.015625
divx047 divide -1 2 -> -0.5
divx048 divide -1 4 -> -0.25
divx049 divide -1 8 -> -0.125
divx050 divide -1 16 -> -0.0625
divx051 divide -1 32 -> -0.03125
divx052 divide -1 64 -> -0.015625
divx053 divide -1 -2 -> 0.5
divx054 divide -1 -4 -> 0.25
divx055 divide -1 -8 -> 0.125
divx056 divide -1 -16 -> 0.0625
divx057 divide -1 -32 -> 0.03125
divx058 divide -1 -64 -> 0.015625
divx070 divide 999999999 1 -> 999999999
divx071 divide 999999999.4 1 -> 999999999 Inexact Rounded
divx072 divide 999999999.5 1 -> 1.00000000E+9 Inexact Rounded
divx073 divide 999999999.9 1 -> 1.00000000E+9 Inexact Rounded
divx074 divide 999999999.999 1 -> 1.00000000E+9 Inexact Rounded
precision: 6
divx080 divide 999999999 1 -> 1.00000E+9 Inexact Rounded
divx081 divide 99999999 1 -> 1.00000E+8 Inexact Rounded
divx082 divide 9999999 1 -> 1.00000E+7 Inexact Rounded
divx083 divide 999999 1 -> 999999
divx084 divide 99999 1 -> 99999
divx085 divide 9999 1 -> 9999
divx086 divide 999 1 -> 999
divx087 divide 99 1 -> 99
divx088 divide 9 1 -> 9
precision: 9
divx090 divide 0. 1 -> 0
divx091 divide .0 1 -> 0.0
divx092 divide 0.00 1 -> 0.00
divx093 divide 0.00E+9 1 -> 0E+7
divx094 divide 0.0000E-50 1 -> 0E-54
divx095 divide 1 1E-8 -> 1E+8
divx096 divide 1 1E-9 -> 1E+9
divx097 divide 1 1E-10 -> 1E+10
divx098 divide 1 1E-11 -> 1E+11
divx099 divide 1 1E-12 -> 1E+12
divx100 divide 1 1 -> 1
divx101 divide 1 2 -> 0.5
divx102 divide 1 3 -> 0.333333333 Inexact Rounded
divx103 divide 1 4 -> 0.25
divx104 divide 1 5 -> 0.2
divx105 divide 1 6 -> 0.166666667 Inexact Rounded
divx106 divide 1 7 -> 0.142857143 Inexact Rounded
divx107 divide 1 8 -> 0.125
divx108 divide 1 9 -> 0.111111111 Inexact Rounded
divx109 divide 1 10 -> 0.1
divx110 divide 1 1 -> 1
divx111 divide 2 1 -> 2
divx112 divide 3 1 -> 3
divx113 divide 4 1 -> 4
divx114 divide 5 1 -> 5
divx115 divide 6 1 -> 6
divx116 divide 7 1 -> 7
divx117 divide 8 1 -> 8
divx118 divide 9 1 -> 9
divx119 divide 10 1 -> 10
divx120 divide 3E+1 0.001 -> 3E+4
divx121 divide 2.200 2 -> 1.100
divx130 divide 12345 4.999 -> 2469.49390 Inexact Rounded
divx131 divide 12345 4.99 -> 2473.94790 Inexact Rounded
divx132 divide 12345 4.9 -> 2519.38776 Inexact Rounded
divx133 divide 12345 5 -> 2469
divx134 divide 12345 5.1 -> 2420.58824 Inexact Rounded
divx135 divide 12345 5.01 -> 2464.07186 Inexact Rounded
divx136 divide 12345 5.001 -> 2468.50630 Inexact Rounded
precision: 9
maxexponent: 999999999
minexponent: -999999999
-- test possibly imprecise results
divx220 divide 391 597 -> 0.654941374 Inexact Rounded
divx221 divide 391 -597 -> -0.654941374 Inexact Rounded
divx222 divide -391 597 -> -0.654941374 Inexact Rounded
divx223 divide -391 -597 -> 0.654941374 Inexact Rounded
-- test some cases that are close to exponent overflow
maxexponent: 999999999
minexponent: -999999999
divx270 divide 1 1e999999999 -> 1E-999999999
divx271 divide 1 0.9e999999999 -> 1.11111111E-999999999 Inexact Rounded
divx272 divide 1 0.99e999999999 -> 1.01010101E-999999999 Inexact Rounded
divx273 divide 1 0.999999999e999999999 -> 1.00000000E-999999999 Inexact Rounded
divx274 divide 9e999999999 1 -> 9E+999999999
divx275 divide 9.9e999999999 1 -> 9.9E+999999999
divx276 divide 9.99e999999999 1 -> 9.99E+999999999
divx277 divide 9.99999999e999999999 1 -> 9.99999999E+999999999
divx280 divide 0.1 9e-999999999 -> 1.11111111E+999999997 Inexact Rounded
divx281 divide 0.1 99e-999999999 -> 1.01010101E+999999996 Inexact Rounded
divx282 divide 0.1 999e-999999999 -> 1.00100100E+999999995 Inexact Rounded
divx283 divide 0.1 9e-999999998 -> 1.11111111E+999999996 Inexact Rounded
divx284 divide 0.1 99e-999999998 -> 1.01010101E+999999995 Inexact Rounded
divx285 divide 0.1 999e-999999998 -> 1.00100100E+999999994 Inexact Rounded
divx286 divide 0.1 999e-999999997 -> 1.00100100E+999999993 Inexact Rounded
divx287 divide 0.1 9999e-999999997 -> 1.00010001E+999999992 Inexact Rounded
divx288 divide 0.1 99999e-999999997 -> 1.00001000E+999999991 Inexact Rounded
-- Divide into 0 tests
divx301 divide 0 7 -> 0
divx302 divide 0 7E-5 -> 0E+5
divx303 divide 0 7E-1 -> 0E+1
divx304 divide 0 7E+1 -> 0.0
divx305 divide 0 7E+5 -> 0.00000
divx306 divide 0 7E+6 -> 0.000000
divx307 divide 0 7E+7 -> 0E-7
divx308 divide 0 70E-5 -> 0E+5
divx309 divide 0 70E-1 -> 0E+1
divx310 divide 0 70E+0 -> 0
divx311 divide 0 70E+1 -> 0.0
divx312 divide 0 70E+5 -> 0.00000
divx313 divide 0 70E+6 -> 0.000000
divx314 divide 0 70E+7 -> 0E-7
divx315 divide 0 700E-5 -> 0E+5
divx316 divide 0 700E-1 -> 0E+1
divx317 divide 0 700E+0 -> 0
divx318 divide 0 700E+1 -> 0.0
divx319 divide 0 700E+5 -> 0.00000
divx320 divide 0 700E+6 -> 0.000000
divx321 divide 0 700E+7 -> 0E-7
divx322 divide 0 700E+77 -> 0E-77
divx331 divide 0E-3 7E-5 -> 0E+2
divx332 divide 0E-3 7E-1 -> 0.00
divx333 divide 0E-3 7E+1 -> 0.0000
divx334 divide 0E-3 7E+5 -> 0E-8
divx335 divide 0E-1 7E-5 -> 0E+4
divx336 divide 0E-1 7E-1 -> 0
divx337 divide 0E-1 7E+1 -> 0.00
divx338 divide 0E-1 7E+5 -> 0.000000
divx339 divide 0E+1 7E-5 -> 0E+6
divx340 divide 0E+1 7E-1 -> 0E+2
divx341 divide 0E+1 7E+1 -> 0
divx342 divide 0E+1 7E+5 -> 0.0000
divx343 divide 0E+3 7E-5 -> 0E+8
divx344 divide 0E+3 7E-1 -> 0E+4
divx345 divide 0E+3 7E+1 -> 0E+2
divx346 divide 0E+3 7E+5 -> 0.00
maxexponent: 92
minexponent: -92
precision: 7
divx351 divide 0E-92 7E-1 -> 0E-91
divx352 divide 0E-92 7E+1 -> 0E-93
divx353 divide 0E-92 7E+5 -> 0E-97
divx354 divide 0E-92 7E+6 -> 0E-98
divx355 divide 0E-92 7E+7 -> 0E-98 Clamped
divx356 divide 0E-92 777E-1 -> 0E-91
divx357 divide 0E-92 777E+1 -> 0E-93
divx358 divide 0E-92 777E+3 -> 0E-95
divx359 divide 0E-92 777E+4 -> 0E-96
divx360 divide 0E-92 777E+5 -> 0E-97
divx361 divide 0E-92 777E+6 -> 0E-98
divx362 divide 0E-92 777E+7 -> 0E-98 Clamped
divx363 divide 0E-92 7E+92 -> 0E-98 Clamped
divx371 divide 0E-92 700E-1 -> 0E-91
divx372 divide 0E-92 700E+1 -> 0E-93
divx373 divide 0E-92 700E+3 -> 0E-95
divx374 divide 0E-92 700E+4 -> 0E-96
divx375 divide 0E-92 700E+5 -> 0E-97
divx376 divide 0E-92 700E+6 -> 0E-98
divx377 divide 0E-92 700E+7 -> 0E-98 Clamped
divx381 divide 0E+92 7E+1 -> 0E+91
divx382 divide 0E+92 7E+0 -> 0E+92
divx383 divide 0E+92 7E-1 -> 0E+92 Clamped
divx384 divide 0E+90 777E+1 -> 0E+89
divx385 divide 0E+90 777E-1 -> 0E+91
divx386 divide 0E+90 777E-2 -> 0E+92
divx387 divide 0E+90 777E-3 -> 0E+92 Clamped
divx388 divide 0E+90 777E-4 -> 0E+92 Clamped
divx391 divide 0E+90 700E+1 -> 0E+89
divx392 divide 0E+90 700E-1 -> 0E+91
divx393 divide 0E+90 700E-2 -> 0E+92
divx394 divide 0E+90 700E-3 -> 0E+92 Clamped
divx395 divide 0E+90 700E-4 -> 0E+92 Clamped
-- input rounding checks
maxexponent: 999
minexponent: -999
precision: 9
divx401 divide 12345678000 1 -> 1.23456780E+10 Rounded
divx402 divide 1 12345678000 -> 8.10000066E-11 Inexact Rounded
divx403 divide 1234567800 1 -> 1.23456780E+9 Rounded
divx404 divide 1 1234567800 -> 8.10000066E-10 Inexact Rounded
divx405 divide 1234567890 1 -> 1.23456789E+9 Rounded
divx406 divide 1 1234567890 -> 8.10000007E-10 Inexact Rounded
divx407 divide 1234567891 1 -> 1.23456789E+9 Inexact Rounded
divx408 divide 1 1234567891 -> 8.10000007E-10 Inexact Rounded
divx409 divide 12345678901 1 -> 1.23456789E+10 Inexact Rounded
divx410 divide 1 12345678901 -> 8.10000007E-11 Inexact Rounded
divx411 divide 1234567896 1 -> 1.23456790E+9 Inexact Rounded
divx412 divide 1 1234567896 -> 8.10000003E-10 Inexact Rounded
divx413 divide 1 1234567897 -> 8.10000003E-10 Inexact Rounded
divx414 divide 1 1234567898 -> 8.10000002E-10 Inexact Rounded
divx415 divide 1 1234567899 -> 8.10000001E-10 Inexact Rounded
divx416 divide 1 1234567900 -> 8.10000001E-10 Inexact Rounded
divx417 divide 1 1234567901 -> 8.10000000E-10 Inexact Rounded
divx418 divide 1 1234567902 -> 8.09999999E-10 Inexact Rounded
-- some longies
divx421 divide 1234567896.000000000000 1 -> 1.23456790E+9 Inexact Rounded
divx422 divide 1 1234567896.000000000000 -> 8.10000003E-10 Inexact Rounded
divx423 divide 1234567896.000000000001 1 -> 1.23456790E+9 Inexact Rounded
divx424 divide 1 1234567896.000000000001 -> 8.10000003E-10 Inexact Rounded
divx425 divide 1234567896.000000000000000000000000000000000000000009 1 -> 1.23456790E+9 Inexact Rounded
divx426 divide 1 1234567896.000000000000000000000000000000000000000009 -> 8.10000003E-10 Inexact Rounded
divx427 divide 1234567897.900010000000000000000000000000000000000009 1 -> 1.23456790E+9 Inexact Rounded
divx428 divide 1 1234567897.900010000000000000000000000000000000000009 -> 8.10000002E-10 Inexact Rounded
precision: 15
-- still checking...
divx441 divide 12345678000 1 -> 12345678000
divx442 divide 1 12345678000 -> 8.10000066420005E-11 Inexact Rounded
divx443 divide 1234567800 1 -> 1234567800
divx444 divide 1 1234567800 -> 8.10000066420005E-10 Inexact Rounded
divx445 divide 1234567890 1 -> 1234567890
divx446 divide 1 1234567890 -> 8.10000007371000E-10 Inexact Rounded
divx447 divide 1234567891 1 -> 1234567891
divx448 divide 1 1234567891 -> 8.10000006714900E-10 Inexact Rounded
divx449 divide 12345678901 1 -> 12345678901
divx450 divide 1 12345678901 -> 8.10000007305390E-11 Inexact Rounded
divx451 divide 1234567896 1 -> 1234567896
divx452 divide 1 1234567896 -> 8.10000003434400E-10 Inexact Rounded
-- high-lows
divx453 divide 1e+1 1 -> 1E+1
divx454 divide 1e+1 1.0 -> 1E+1
divx455 divide 1e+1 1.00 -> 1E+1
divx456 divide 1e+2 2 -> 5E+1
divx457 divide 1e+2 2.0 -> 5E+1
divx458 divide 1e+2 2.00 -> 5E+1
-- some from IEEE discussions
divx460 divide 3e0 2e0 -> 1.5
divx461 divide 30e-1 2e0 -> 1.5
divx462 divide 300e-2 2e0 -> 1.50
divx464 divide 3000e-3 2e0 -> 1.500
divx465 divide 3e0 20e-1 -> 1.5
divx466 divide 30e-1 20e-1 -> 1.5
divx467 divide 300e-2 20e-1 -> 1.5
divx468 divide 3000e-3 20e-1 -> 1.50
divx469 divide 3e0 200e-2 -> 1.5
divx470 divide 30e-1 200e-2 -> 1.5
divx471 divide 300e-2 200e-2 -> 1.5
divx472 divide 3000e-3 200e-2 -> 1.5
divx473 divide 3e0 2000e-3 -> 1.5
divx474 divide 30e-1 2000e-3 -> 1.5
divx475 divide 300e-2 2000e-3 -> 1.5
divx476 divide 3000e-3 2000e-3 -> 1.5
-- some reciprocals
divx480 divide 1 1.0E+33 -> 1E-33
divx481 divide 1 10E+33 -> 1E-34
divx482 divide 1 1.0E-33 -> 1E+33
divx483 divide 1 10E-33 -> 1E+32
-- RMS discussion table
maxexponent: 96
minexponent: -95
precision: 7
divx484 divide 0e5 1e3 -> 0E+2
divx485 divide 0e5 2e3 -> 0E+2
divx486 divide 0e5 10e2 -> 0E+3
divx487 divide 0e5 20e2 -> 0E+3
divx488 divide 0e5 100e1 -> 0E+4
divx489 divide 0e5 200e1 -> 0E+4
divx491 divide 1e5 1e3 -> 1E+2
divx492 divide 1e5 2e3 -> 5E+1
divx493 divide 1e5 10e2 -> 1E+2
divx494 divide 1e5 20e2 -> 5E+1
divx495 divide 1e5 100e1 -> 1E+2
divx496 divide 1e5 200e1 -> 5E+1
-- tryzeros cases
precision: 7
rounding: half_up
maxExponent: 92
minexponent: -92
divx497 divide 0E+86 1000E-13 -> 0E+92 Clamped
divx498 divide 0E-98 1000E+13 -> 0E-98 Clamped
precision: 9
rounding: half_up
maxExponent: 999
minexponent: -999
-- focus on trailing zeros issues
precision: 9
divx500 divide 1 9.9 -> 0.101010101 Inexact Rounded
precision: 8
divx501 divide 1 9.9 -> 0.10101010 Inexact Rounded
precision: 7
divx502 divide 1 9.9 -> 0.1010101 Inexact Rounded
precision: 6
divx503 divide 1 9.9 -> 0.101010 Inexact Rounded
precision: 9
divx511 divide 1 2 -> 0.5
divx512 divide 1.0 2 -> 0.5
divx513 divide 1.00 2 -> 0.50
divx514 divide 1.000 2 -> 0.500
divx515 divide 1.0000 2 -> 0.5000
divx516 divide 1.00000 2 -> 0.50000
divx517 divide 1.000000 2 -> 0.500000
divx518 divide 1.0000000 2 -> 0.5000000
divx519 divide 1.00 2.00 -> 0.5
divx521 divide 2 1 -> 2
divx522 divide 2 1.0 -> 2
divx523 divide 2 1.00 -> 2
divx524 divide 2 1.000 -> 2
divx525 divide 2 1.0000 -> 2
divx526 divide 2 1.00000 -> 2
divx527 divide 2 1.000000 -> 2
divx528 divide 2 1.0000000 -> 2
divx529 divide 2.00 1.00 -> 2
divx530 divide 2.40 2 -> 1.20
divx531 divide 2.40 4 -> 0.60
divx532 divide 2.40 10 -> 0.24
divx533 divide 2.40 2.0 -> 1.2
divx534 divide 2.40 4.0 -> 0.6
divx535 divide 2.40 10.0 -> 0.24
divx536 divide 2.40 2.00 -> 1.2
divx537 divide 2.40 4.00 -> 0.6
divx538 divide 2.40 10.00 -> 0.24
divx539 divide 0.9 0.1 -> 9
divx540 divide 0.9 0.01 -> 9E+1
divx541 divide 0.9 0.001 -> 9E+2
divx542 divide 5 2 -> 2.5
divx543 divide 5 2.0 -> 2.5
divx544 divide 5 2.00 -> 2.5
divx545 divide 5 20 -> 0.25
divx546 divide 5 20.0 -> 0.25
divx547 divide 2.400 2 -> 1.200
divx548 divide 2.400 2.0 -> 1.20
divx549 divide 2.400 2.400 -> 1
divx550 divide 240 1 -> 240
divx551 divide 240 10 -> 24
divx552 divide 240 100 -> 2.4
divx553 divide 240 1000 -> 0.24
divx554 divide 2400 1 -> 2400
divx555 divide 2400 10 -> 240
divx556 divide 2400 100 -> 24
divx557 divide 2400 1000 -> 2.4
-- +ve exponent
precision: 5
divx570 divide 2.4E+6 2 -> 1.2E+6
divx571 divide 2.40E+6 2 -> 1.20E+6
divx572 divide 2.400E+6 2 -> 1.200E+6
divx573 divide 2.4000E+6 2 -> 1.2000E+6
divx574 divide 24E+5 2 -> 1.2E+6
divx575 divide 240E+4 2 -> 1.20E+6
divx576 divide 2400E+3 2 -> 1.200E+6
divx577 divide 24000E+2 2 -> 1.2000E+6
precision: 6
divx580 divide 2.4E+6 2 -> 1.2E+6
divx581 divide 2.40E+6 2 -> 1.20E+6
divx582 divide 2.400E+6 2 -> 1.200E+6
divx583 divide 2.4000E+6 2 -> 1.2000E+6
divx584 divide 24E+5 2 -> 1.2E+6
divx585 divide 240E+4 2 -> 1.20E+6
divx586 divide 2400E+3 2 -> 1.200E+6
divx587 divide 24000E+2 2 -> 1.2000E+6
precision: 7
divx590 divide 2.4E+6 2 -> 1.2E+6
divx591 divide 2.40E+6 2 -> 1.20E+6
divx592 divide 2.400E+6 2 -> 1.200E+6
divx593 divide 2.4000E+6 2 -> 1.2000E+6
divx594 divide 24E+5 2 -> 1.2E+6
divx595 divide 240E+4 2 -> 1.20E+6
divx596 divide 2400E+3 2 -> 1.200E+6
divx597 divide 24000E+2 2 -> 1.2000E+6
precision: 9
divx600 divide 2.4E+9 2 -> 1.2E+9
divx601 divide 2.40E+9 2 -> 1.20E+9
divx602 divide 2.400E+9 2 -> 1.200E+9
divx603 divide 2.4000E+9 2 -> 1.2000E+9
divx604 divide 24E+8 2 -> 1.2E+9
divx605 divide 240E+7 2 -> 1.20E+9
divx606 divide 2400E+6 2 -> 1.200E+9
divx607 divide 24000E+5 2 -> 1.2000E+9
-- long operand triangle
precision: 33
divx610 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.8131097703792 Inexact Rounded
precision: 32
divx611 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.813109770379 Inexact Rounded
precision: 31
divx612 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.81310977038 Inexact Rounded
precision: 30
divx613 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.8131097704 Inexact Rounded
precision: 29
divx614 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.813109770 Inexact Rounded
precision: 28
divx615 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.81310977 Inexact Rounded
precision: 27
divx616 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.8131098 Inexact Rounded
precision: 26
divx617 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.813110 Inexact Rounded
precision: 25
divx618 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.81311 Inexact Rounded
precision: 24
divx619 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.8131 Inexact Rounded
precision: 23
divx620 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.813 Inexact Rounded
precision: 22
divx621 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.81 Inexact Rounded
precision: 21
divx622 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817797.8 Inexact Rounded
precision: 20
divx623 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -41011408883796817798 Inexact Rounded
precision: 19
divx624 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.101140888379681780E+19 Inexact Rounded
precision: 18
divx625 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.10114088837968178E+19 Inexact Rounded
precision: 17
divx626 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.1011408883796818E+19 Inexact Rounded
precision: 16
divx627 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.101140888379682E+19 Inexact Rounded
precision: 15
divx628 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.10114088837968E+19 Inexact Rounded
precision: 14
divx629 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.1011408883797E+19 Inexact Rounded
precision: 13
divx630 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.101140888380E+19 Inexact Rounded
precision: 12
divx631 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.10114088838E+19 Inexact Rounded
precision: 11
divx632 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.1011408884E+19 Inexact Rounded
precision: 10
divx633 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.101140888E+19 Inexact Rounded
precision: 9
divx634 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.10114089E+19 Inexact Rounded
precision: 8
divx635 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.1011409E+19 Inexact Rounded
precision: 7
divx636 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.101141E+19 Inexact Rounded
precision: 6
divx637 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.10114E+19 Inexact Rounded
precision: 5
divx638 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.1011E+19 Inexact Rounded
precision: 4
divx639 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.101E+19 Inexact Rounded
precision: 3
divx640 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.10E+19 Inexact Rounded
precision: 2
divx641 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4.1E+19 Inexact Rounded
precision: 1
divx642 divide -3374988581607586061255542201048 82293895124.90045271504836568681 -> -4E+19 Inexact Rounded
-- more zeros, etc.
precision: 16
rounding: half_up
maxExponent: 384
minExponent: -383
divx731 divide 5.00 1E-3 -> 5.00E+3
divx732 divide 00.00 0.000 -> NaN Division_undefined
divx733 divide 00.00 0E-3 -> NaN Division_undefined
divx734 divide 0 -0 -> NaN Division_undefined
divx735 divide -0 0 -> NaN Division_undefined
divx736 divide -0 -0 -> NaN Division_undefined
divx741 divide 0 -1 -> -0
divx742 divide -0 -1 -> 0
divx743 divide 0 1 -> 0
divx744 divide -0 1 -> -0
divx745 divide -1 0 -> -Infinity Division_by_zero
divx746 divide -1 -0 -> Infinity Division_by_zero
divx747 divide 1 0 -> Infinity Division_by_zero
divx748 divide 1 -0 -> -Infinity Division_by_zero
divx751 divide 0.0 -1 -> -0.0
divx752 divide -0.0 -1 -> 0.0
divx753 divide 0.0 1 -> 0.0
divx754 divide -0.0 1 -> -0.0
divx755 divide -1.0 0 -> -Infinity Division_by_zero
divx756 divide -1.0 -0 -> Infinity Division_by_zero
divx757 divide 1.0 0 -> Infinity Division_by_zero
divx758 divide 1.0 -0 -> -Infinity Division_by_zero
divx761 divide 0 -1.0 -> -0E+1
divx762 divide -0 -1.0 -> 0E+1
divx763 divide 0 1.0 -> 0E+1
divx764 divide -0 1.0 -> -0E+1
divx765 divide -1 0.0 -> -Infinity Division_by_zero
divx766 divide -1 -0.0 -> Infinity Division_by_zero
divx767 divide 1 0.0 -> Infinity Division_by_zero
divx768 divide 1 -0.0 -> -Infinity Division_by_zero
divx771 divide 0.0 -1.0 -> -0
divx772 divide -0.0 -1.0 -> 0
divx773 divide 0.0 1.0 -> 0
divx774 divide -0.0 1.0 -> -0
divx775 divide -1.0 0.0 -> -Infinity Division_by_zero
divx776 divide -1.0 -0.0 -> Infinity Division_by_zero
divx777 divide 1.0 0.0 -> Infinity Division_by_zero
divx778 divide 1.0 -0.0 -> -Infinity Division_by_zero
-- Specials
divx780 divide Inf -Inf -> NaN Invalid_operation
divx781 divide Inf -1000 -> -Infinity
divx782 divide Inf -1 -> -Infinity
divx783 divide Inf -0 -> -Infinity
divx784 divide Inf 0 -> Infinity
divx785 divide Inf 1 -> Infinity
divx786 divide Inf 1000 -> Infinity
divx787 divide Inf Inf -> NaN Invalid_operation
divx788 divide -1000 Inf -> -0E-398 Clamped
divx789 divide -Inf Inf -> NaN Invalid_operation
divx790 divide -1 Inf -> -0E-398 Clamped
divx791 divide -0 Inf -> -0E-398 Clamped
divx792 divide 0 Inf -> 0E-398 Clamped
divx793 divide 1 Inf -> 0E-398 Clamped
divx794 divide 1000 Inf -> 0E-398 Clamped
divx795 divide Inf Inf -> NaN Invalid_operation
divx800 divide -Inf -Inf -> NaN Invalid_operation
divx801 divide -Inf -1000 -> Infinity
divx802 divide -Inf -1 -> Infinity
divx803 divide -Inf -0 -> Infinity
divx804 divide -Inf 0 -> -Infinity
divx805 divide -Inf 1 -> -Infinity
divx806 divide -Inf 1000 -> -Infinity
divx807 divide -Inf Inf -> NaN Invalid_operation
divx808 divide -1000 Inf -> -0E-398 Clamped
divx809 divide -Inf -Inf -> NaN Invalid_operation
divx810 divide -1 -Inf -> 0E-398 Clamped
divx811 divide -0 -Inf -> 0E-398 Clamped
divx812 divide 0 -Inf -> -0E-398 Clamped
divx813 divide 1 -Inf -> -0E-398 Clamped
divx814 divide 1000 -Inf -> -0E-398 Clamped
divx815 divide Inf -Inf -> NaN Invalid_operation
divx821 divide NaN -Inf -> NaN
divx822 divide NaN -1000 -> NaN
divx823 divide NaN -1 -> NaN
divx824 divide NaN -0 -> NaN
divx825 divide NaN 0 -> NaN
divx826 divide NaN 1 -> NaN
divx827 divide NaN 1000 -> NaN
divx828 divide NaN Inf -> NaN
divx829 divide NaN NaN -> NaN
divx830 divide -Inf NaN -> NaN
divx831 divide -1000 NaN -> NaN
divx832 divide -1 NaN -> NaN
divx833 divide -0 NaN -> NaN
divx834 divide 0 NaN -> NaN
divx835 divide 1 NaN -> NaN
divx836 divide 1000 NaN -> NaN
divx837 divide Inf NaN -> NaN
divx841 divide sNaN -Inf -> NaN Invalid_operation
divx842 divide sNaN -1000 -> NaN Invalid_operation
divx843 divide sNaN -1 -> NaN Invalid_operation
divx844 divide sNaN -0 -> NaN Invalid_operation
divx845 divide sNaN 0 -> NaN Invalid_operation
divx846 divide sNaN 1 -> NaN Invalid_operation
divx847 divide sNaN 1000 -> NaN Invalid_operation
divx848 divide sNaN NaN -> NaN Invalid_operation
divx849 divide sNaN sNaN -> NaN Invalid_operation
divx850 divide NaN sNaN -> NaN Invalid_operation
divx851 divide -Inf sNaN -> NaN Invalid_operation
divx852 divide -1000 sNaN -> NaN Invalid_operation
divx853 divide -1 sNaN -> NaN Invalid_operation
divx854 divide -0 sNaN -> NaN Invalid_operation
divx855 divide 0 sNaN -> NaN Invalid_operation
divx856 divide 1 sNaN -> NaN Invalid_operation
divx857 divide 1000 sNaN -> NaN Invalid_operation
divx858 divide Inf sNaN -> NaN Invalid_operation
divx859 divide NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
divx861 divide NaN9 -Inf -> NaN9
divx862 divide NaN8 1000 -> NaN8
divx863 divide NaN7 Inf -> NaN7
divx864 divide NaN6 NaN5 -> NaN6
divx865 divide -Inf NaN4 -> NaN4
divx866 divide -1000 NaN3 -> NaN3
divx867 divide Inf NaN2 -> NaN2
divx871 divide sNaN99 -Inf -> NaN99 Invalid_operation
divx872 divide sNaN98 -1 -> NaN98 Invalid_operation
divx873 divide sNaN97 NaN -> NaN97 Invalid_operation
divx874 divide sNaN96 sNaN94 -> NaN96 Invalid_operation
divx875 divide NaN95 sNaN93 -> NaN93 Invalid_operation
divx876 divide -Inf sNaN92 -> NaN92 Invalid_operation
divx877 divide 0 sNaN91 -> NaN91 Invalid_operation
divx878 divide Inf sNaN90 -> NaN90 Invalid_operation
divx879 divide NaN sNaN89 -> NaN89 Invalid_operation
divx881 divide -NaN9 -Inf -> -NaN9
divx882 divide -NaN8 1000 -> -NaN8
divx883 divide -NaN7 Inf -> -NaN7
divx884 divide -NaN6 -NaN5 -> -NaN6
divx885 divide -Inf -NaN4 -> -NaN4
divx886 divide -1000 -NaN3 -> -NaN3
divx887 divide Inf -NaN2 -> -NaN2
divx891 divide -sNaN99 -Inf -> -NaN99 Invalid_operation
divx892 divide -sNaN98 -1 -> -NaN98 Invalid_operation
divx893 divide -sNaN97 NaN -> -NaN97 Invalid_operation
divx894 divide -sNaN96 -sNaN94 -> -NaN96 Invalid_operation
divx895 divide -NaN95 -sNaN93 -> -NaN93 Invalid_operation
divx896 divide -Inf -sNaN92 -> -NaN92 Invalid_operation
divx897 divide 0 -sNaN91 -> -NaN91 Invalid_operation
divx898 divide Inf -sNaN90 -> -NaN90 Invalid_operation
divx899 divide -NaN -sNaN89 -> -NaN89 Invalid_operation
maxexponent: 999999999
minexponent: -999999999
-- Various flavours of divide by 0
divx901 divide 0 0 -> NaN Division_undefined
divx902 divide 0.0E5 0 -> NaN Division_undefined
divx903 divide 0.000 0 -> NaN Division_undefined
divx904 divide 0.0001 0 -> Infinity Division_by_zero
divx905 divide 0.01 0 -> Infinity Division_by_zero
divx906 divide 0.1 0 -> Infinity Division_by_zero
divx907 divide 1 0 -> Infinity Division_by_zero
divx908 divide 1 0.0 -> Infinity Division_by_zero
divx909 divide 10 0.0 -> Infinity Division_by_zero
divx910 divide 1E+100 0.0 -> Infinity Division_by_zero
divx911 divide 1E+1000 0 -> Infinity Division_by_zero
divx921 divide -0.0001 0 -> -Infinity Division_by_zero
divx922 divide -0.01 0 -> -Infinity Division_by_zero
divx923 divide -0.1 0 -> -Infinity Division_by_zero
divx924 divide -1 0 -> -Infinity Division_by_zero
divx925 divide -1 0.0 -> -Infinity Division_by_zero
divx926 divide -10 0.0 -> -Infinity Division_by_zero
divx927 divide -1E+100 0.0 -> -Infinity Division_by_zero
divx928 divide -1E+1000 0 -> -Infinity Division_by_zero
divx931 divide 0.0001 -0 -> -Infinity Division_by_zero
divx932 divide 0.01 -0 -> -Infinity Division_by_zero
divx933 divide 0.1 -0 -> -Infinity Division_by_zero
divx934 divide 1 -0 -> -Infinity Division_by_zero
divx935 divide 1 -0.0 -> -Infinity Division_by_zero
divx936 divide 10 -0.0 -> -Infinity Division_by_zero
divx937 divide 1E+100 -0.0 -> -Infinity Division_by_zero
divx938 divide 1E+1000 -0 -> -Infinity Division_by_zero
divx941 divide -0.0001 -0 -> Infinity Division_by_zero
divx942 divide -0.01 -0 -> Infinity Division_by_zero
divx943 divide -0.1 -0 -> Infinity Division_by_zero
divx944 divide -1 -0 -> Infinity Division_by_zero
divx945 divide -1 -0.0 -> Infinity Division_by_zero
divx946 divide -10 -0.0 -> Infinity Division_by_zero
divx947 divide -1E+100 -0.0 -> Infinity Division_by_zero
divx948 divide -1E+1000 -0 -> Infinity Division_by_zero
-- overflow and underflow tests
precision: 9
maxexponent: 999999999
minexponent: -999999999
divx951 divide 9E+999999999 +0.23456789012345E-0 -> Infinity Inexact Overflow Rounded
divx952 divide +0.100 9E+999999999 -> 1.111111E-1000000001 Inexact Rounded Underflow Subnormal
divx953 divide 9E-999999999 +9.100 -> 9.8901099E-1000000000 Inexact Rounded Underflow Subnormal
divx954 divide -1.23456789 9E+999999999 -> -1.3717421E-1000000000 Subnormal
divx955 divide -1.23456789012345E-0 9E+999999999 -> -1.3717421E-1000000000 Underflow Subnormal Rounded Inexact
divx956 divide -1.23456789012345E-0 7E+999999999 -> -1.7636684E-1000000000 Inexact Rounded Underflow Subnormal
divx957 divide 9E+999999999 -0.83456789012345E-0 -> -Infinity Inexact Overflow Rounded
divx958 divide -0.100 9E+999999999 -> -1.111111E-1000000001 Subnormal Inexact Rounded Underflow
divx959 divide 9E-999999999 -9.100 -> -9.8901099E-1000000000 Inexact Rounded Underflow Subnormal
-- overflow and underflow (additional edge tests in multiply.decTest)
-- 'subnormal' results now possible (all hard underflow or overflow in
-- base arithmetic)
divx960 divide 1e-600000000 1e+400000001 -> 1E-1000000001 Subnormal
divx961 divide 1e-600000000 1e+400000002 -> 1E-1000000002 Subnormal
divx962 divide 1e-600000000 1e+400000003 -> 1E-1000000003 Subnormal
divx963 divide 1e-600000000 1e+400000004 -> 1E-1000000004 Subnormal
divx964 divide 1e-600000000 1e+400000005 -> 1E-1000000005 Subnormal
divx965 divide 1e-600000000 1e+400000006 -> 1E-1000000006 Subnormal
divx966 divide 1e-600000000 1e+400000007 -> 1E-1000000007 Subnormal
divx967 divide 1e-600000000 1e+400000008 -> 0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
divx968 divide 1e-600000000 1e+400000009 -> 0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
divx969 divide 1e-600000000 1e+400000010 -> 0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
-- [no equivalent of 'subnormal' for overflow]
divx970 divide 1e+600000000 1e-400000001 -> Infinity Overflow Inexact Rounded
divx971 divide 1e+600000000 1e-400000002 -> Infinity Overflow Inexact Rounded
divx972 divide 1e+600000000 1e-400000003 -> Infinity Overflow Inexact Rounded
divx973 divide 1e+600000000 1e-400000004 -> Infinity Overflow Inexact Rounded
divx974 divide 1e+600000000 1e-400000005 -> Infinity Overflow Inexact Rounded
divx975 divide 1e+600000000 1e-400000006 -> Infinity Overflow Inexact Rounded
divx976 divide 1e+600000000 1e-400000007 -> Infinity Overflow Inexact Rounded
divx977 divide 1e+600000000 1e-400000008 -> Infinity Overflow Inexact Rounded
divx978 divide 1e+600000000 1e-400000009 -> Infinity Overflow Inexact Rounded
divx979 divide 1e+600000000 1e-400000010 -> Infinity Overflow Inexact Rounded
-- Sign after overflow and underflow
divx980 divide 1e-600000000 1e+400000009 -> 0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
divx981 divide 1e-600000000 -1e+400000009 -> -0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
divx982 divide -1e-600000000 1e+400000009 -> -0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
divx983 divide -1e-600000000 -1e+400000009 -> 0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
divx984 divide 1e+600000000 1e-400000009 -> Infinity Overflow Inexact Rounded
divx985 divide 1e+600000000 -1e-400000009 -> -Infinity Overflow Inexact Rounded
divx986 divide -1e+600000000 1e-400000009 -> -Infinity Overflow Inexact Rounded
divx987 divide -1e+600000000 -1e-400000009 -> Infinity Overflow Inexact Rounded
-- Long operand overflow may be a different path
precision: 3
divx990 divide 1000 9.999E-999999999 -> Infinity Inexact Overflow Rounded
divx991 divide 1000 -9.999E-999999999 -> -Infinity Inexact Overflow Rounded
divx992 divide 9.999E+999999999 0.01 -> Infinity Inexact Overflow Rounded
divx993 divide -9.999E+999999999 0.01 -> -Infinity Inexact Overflow Rounded
-- check for double-rounded subnormals
precision: 5
maxexponent: 79
minexponent: -79
divx1001 divide 1.52444E-80 1 -> 1.524E-80 Inexact Rounded Subnormal Underflow
divx1002 divide 1.52445E-80 1 -> 1.524E-80 Inexact Rounded Subnormal Underflow
divx1003 divide 1.52446E-80 1 -> 1.524E-80 Inexact Rounded Subnormal Underflow
-- a rounding problem in one implementation
precision: 34
rounding: half_up
maxExponent: 6144
minExponent: -6143
-- Unbounded answer to 40 digits:
-- 1.465811965811965811965811965811965811966E+7000
divx1010 divide 343E6000 234E-1000 -> Infinity Overflow Inexact Rounded
precision: 34
rounding: half_up
maxExponent: 6144
minExponent: -6143
-- Examples from SQL proposal (Krishna Kulkarni)
precision: 7
divx1021 divide 1E0 1E0 -> 1
divx1022 divide 1E0 2E0 -> 0.5
divx1023 divide 1E0 3E0 -> 0.3333333 Inexact Rounded
divx1024 divide 100E-2 1000E-3 -> 1
divx1025 divide 24E-1 2E0 -> 1.2
divx1026 divide 2400E-3 2E0 -> 1.200
divx1027 divide 5E0 2E0 -> 2.5
divx1028 divide 5E0 20E-1 -> 2.5
divx1029 divide 5E0 2000E-3 -> 2.5
divx1030 divide 5E0 2E-1 -> 25
divx1031 divide 5E0 20E-2 -> 25
divx1032 divide 480E-2 3E0 -> 1.60
divx1033 divide 47E-1 2E0 -> 2.35
-- ECMAScript bad examples
rounding: half_down
precision: 7
divx1050 divide 5 9 -> 0.5555556 Inexact Rounded
rounding: half_even
divx1051 divide 5 11 -> 0.4545455 Inexact Rounded
-- payload decapitate
precision: 5
divx1055 divide sNaN987654321 1 -> NaN54321 Invalid_operation
-- Null tests
divx9998 divide 10 # -> NaN Invalid_operation
divx9999 divide # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,486 @@
------------------------------------------------------------------------
-- divideint.decTest -- decimal integer division --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
precision: 9
rounding: half_up
maxExponent: 384
minexponent: -383
dvix001 divideint 1 1 -> 1
dvix002 divideint 2 1 -> 2
dvix003 divideint 1 2 -> 0
dvix004 divideint 2 2 -> 1
dvix005 divideint 0 1 -> 0
dvix006 divideint 0 2 -> 0
dvix007 divideint 1 3 -> 0
dvix008 divideint 2 3 -> 0
dvix009 divideint 3 3 -> 1
dvix010 divideint 2.4 1 -> 2
dvix011 divideint 2.4 -1 -> -2
dvix012 divideint -2.4 1 -> -2
dvix013 divideint -2.4 -1 -> 2
dvix014 divideint 2.40 1 -> 2
dvix015 divideint 2.400 1 -> 2
dvix016 divideint 2.4 2 -> 1
dvix017 divideint 2.400 2 -> 1
dvix018 divideint 2. 2 -> 1
dvix019 divideint 20 20 -> 1
dvix020 divideint 187 187 -> 1
dvix021 divideint 5 2 -> 2
dvix022 divideint 5 2.0 -> 2
dvix023 divideint 5 2.000 -> 2
dvix024 divideint 5 0.200 -> 25
dvix025 divideint 5 0.200 -> 25
dvix030 divideint 1 2 -> 0
dvix031 divideint 1 4 -> 0
dvix032 divideint 1 8 -> 0
dvix033 divideint 1 16 -> 0
dvix034 divideint 1 32 -> 0
dvix035 divideint 1 64 -> 0
dvix040 divideint 1 -2 -> -0
dvix041 divideint 1 -4 -> -0
dvix042 divideint 1 -8 -> -0
dvix043 divideint 1 -16 -> -0
dvix044 divideint 1 -32 -> -0
dvix045 divideint 1 -64 -> -0
dvix050 divideint -1 2 -> -0
dvix051 divideint -1 4 -> -0
dvix052 divideint -1 8 -> -0
dvix053 divideint -1 16 -> -0
dvix054 divideint -1 32 -> -0
dvix055 divideint -1 64 -> -0
dvix060 divideint -1 -2 -> 0
dvix061 divideint -1 -4 -> 0
dvix062 divideint -1 -8 -> 0
dvix063 divideint -1 -16 -> 0
dvix064 divideint -1 -32 -> 0
dvix065 divideint -1 -64 -> 0
-- similar with powers of ten
dvix160 divideint 1 1 -> 1
dvix161 divideint 1 10 -> 0
dvix162 divideint 1 100 -> 0
dvix163 divideint 1 1000 -> 0
dvix164 divideint 1 10000 -> 0
dvix165 divideint 1 100000 -> 0
dvix166 divideint 1 1000000 -> 0
dvix167 divideint 1 10000000 -> 0
dvix168 divideint 1 100000000 -> 0
dvix170 divideint 1 -1 -> -1
dvix171 divideint 1 -10 -> -0
dvix172 divideint 1 -100 -> -0
dvix173 divideint 1 -1000 -> -0
dvix174 divideint 1 -10000 -> -0
dvix175 divideint 1 -100000 -> -0
dvix176 divideint 1 -1000000 -> -0
dvix177 divideint 1 -10000000 -> -0
dvix178 divideint 1 -100000000 -> -0
dvix180 divideint -1 1 -> -1
dvix181 divideint -1 10 -> -0
dvix182 divideint -1 100 -> -0
dvix183 divideint -1 1000 -> -0
dvix184 divideint -1 10000 -> -0
dvix185 divideint -1 100000 -> -0
dvix186 divideint -1 1000000 -> -0
dvix187 divideint -1 10000000 -> -0
dvix188 divideint -1 100000000 -> -0
dvix190 divideint -1 -1 -> 1
dvix191 divideint -1 -10 -> 0
dvix192 divideint -1 -100 -> 0
dvix193 divideint -1 -1000 -> 0
dvix194 divideint -1 -10000 -> 0
dvix195 divideint -1 -100000 -> 0
dvix196 divideint -1 -1000000 -> 0
dvix197 divideint -1 -10000000 -> 0
dvix198 divideint -1 -100000000 -> 0
-- some long operand cases here
dvix070 divideint 999999999 1 -> 999999999
dvix071 divideint 999999999.4 1 -> 999999999
dvix072 divideint 999999999.5 1 -> 999999999
dvix073 divideint 999999999.9 1 -> 999999999
dvix074 divideint 999999999.999 1 -> 999999999
precision: 6
dvix080 divideint 999999999 1 -> NaN Division_impossible
dvix081 divideint 99999999 1 -> NaN Division_impossible
dvix082 divideint 9999999 1 -> NaN Division_impossible
dvix083 divideint 999999 1 -> 999999
dvix084 divideint 99999 1 -> 99999
dvix085 divideint 9999 1 -> 9999
dvix086 divideint 999 1 -> 999
dvix087 divideint 99 1 -> 99
dvix088 divideint 9 1 -> 9
precision: 9
dvix090 divideint 0. 1 -> 0
dvix091 divideint .0 1 -> 0
dvix092 divideint 0.00 1 -> 0
dvix093 divideint 0.00E+9 1 -> 0
dvix094 divideint 0.0000E-50 1 -> 0
dvix100 divideint 1 1 -> 1
dvix101 divideint 1 2 -> 0
dvix102 divideint 1 3 -> 0
dvix103 divideint 1 4 -> 0
dvix104 divideint 1 5 -> 0
dvix105 divideint 1 6 -> 0
dvix106 divideint 1 7 -> 0
dvix107 divideint 1 8 -> 0
dvix108 divideint 1 9 -> 0
dvix109 divideint 1 10 -> 0
dvix110 divideint 1 1 -> 1
dvix111 divideint 2 1 -> 2
dvix112 divideint 3 1 -> 3
dvix113 divideint 4 1 -> 4
dvix114 divideint 5 1 -> 5
dvix115 divideint 6 1 -> 6
dvix116 divideint 7 1 -> 7
dvix117 divideint 8 1 -> 8
dvix118 divideint 9 1 -> 9
dvix119 divideint 10 1 -> 10
-- from DiagBigDecimal
dvix131 divideint 101.3 1 -> 101
dvix132 divideint 101.0 1 -> 101
dvix133 divideint 101.3 3 -> 33
dvix134 divideint 101.0 3 -> 33
dvix135 divideint 2.4 1 -> 2
dvix136 divideint 2.400 1 -> 2
dvix137 divideint 18 18 -> 1
dvix138 divideint 1120 1000 -> 1
dvix139 divideint 2.4 2 -> 1
dvix140 divideint 2.400 2 -> 1
dvix141 divideint 0.5 2.000 -> 0
dvix142 divideint 8.005 7 -> 1
dvix143 divideint 5 2 -> 2
dvix144 divideint 0 2 -> 0
dvix145 divideint 0.00 2 -> 0
-- Others
dvix150 divideint 12345 4.999 -> 2469
dvix151 divideint 12345 4.99 -> 2473
dvix152 divideint 12345 4.9 -> 2519
dvix153 divideint 12345 5 -> 2469
dvix154 divideint 12345 5.1 -> 2420
dvix155 divideint 12345 5.01 -> 2464
dvix156 divideint 12345 5.001 -> 2468
dvix157 divideint 101 7.6 -> 13
-- Various flavours of divideint by 0
maxexponent: 999999999
minexponent: -999999999
dvix201 divideint 0 0 -> NaN Division_undefined
dvix202 divideint 0.0E5 0 -> NaN Division_undefined
dvix203 divideint 0.000 0 -> NaN Division_undefined
dvix204 divideint 0.0001 0 -> Infinity Division_by_zero
dvix205 divideint 0.01 0 -> Infinity Division_by_zero
dvix206 divideint 0.1 0 -> Infinity Division_by_zero
dvix207 divideint 1 0 -> Infinity Division_by_zero
dvix208 divideint 1 0.0 -> Infinity Division_by_zero
dvix209 divideint 10 0.0 -> Infinity Division_by_zero
dvix210 divideint 1E+100 0.0 -> Infinity Division_by_zero
dvix211 divideint 1E+1000 0 -> Infinity Division_by_zero
dvix214 divideint -0.0001 0 -> -Infinity Division_by_zero
dvix215 divideint -0.01 0 -> -Infinity Division_by_zero
dvix216 divideint -0.1 0 -> -Infinity Division_by_zero
dvix217 divideint -1 0 -> -Infinity Division_by_zero
dvix218 divideint -1 0.0 -> -Infinity Division_by_zero
dvix219 divideint -10 0.0 -> -Infinity Division_by_zero
dvix220 divideint -1E+100 0.0 -> -Infinity Division_by_zero
dvix221 divideint -1E+1000 0 -> -Infinity Division_by_zero
-- test some cases that are close to exponent overflow
maxexponent: 999999999
minexponent: -999999999
dvix270 divideint 1 1e999999999 -> 0
dvix271 divideint 1 0.9e999999999 -> 0
dvix272 divideint 1 0.99e999999999 -> 0
dvix273 divideint 1 0.999999999e999999999 -> 0
dvix274 divideint 9e999999999 1 -> NaN Division_impossible
dvix275 divideint 9.9e999999999 1 -> NaN Division_impossible
dvix276 divideint 9.99e999999999 1 -> NaN Division_impossible
dvix277 divideint 9.99999999e999999999 1 -> NaN Division_impossible
dvix280 divideint 0.1 9e-999999999 -> NaN Division_impossible
dvix281 divideint 0.1 99e-999999999 -> NaN Division_impossible
dvix282 divideint 0.1 999e-999999999 -> NaN Division_impossible
dvix283 divideint 0.1 9e-999999998 -> NaN Division_impossible
dvix284 divideint 0.1 99e-999999998 -> NaN Division_impossible
dvix285 divideint 0.1 999e-999999998 -> NaN Division_impossible
dvix286 divideint 0.1 999e-999999997 -> NaN Division_impossible
dvix287 divideint 0.1 9999e-999999997 -> NaN Division_impossible
dvix288 divideint 0.1 99999e-999999997 -> NaN Division_impossible
-- GD edge cases: lhs smaller than rhs but more digits
dvix301 divideint 0.9 2 -> 0
dvix302 divideint 0.9 2.0 -> 0
dvix303 divideint 0.9 2.1 -> 0
dvix304 divideint 0.9 2.00 -> 0
dvix305 divideint 0.9 2.01 -> 0
dvix306 divideint 0.12 1 -> 0
dvix307 divideint 0.12 1.0 -> 0
dvix308 divideint 0.12 1.00 -> 0
dvix309 divideint 0.12 1.0 -> 0
dvix310 divideint 0.12 1.00 -> 0
dvix311 divideint 0.12 2 -> 0
dvix312 divideint 0.12 2.0 -> 0
dvix313 divideint 0.12 2.1 -> 0
dvix314 divideint 0.12 2.00 -> 0
dvix315 divideint 0.12 2.01 -> 0
-- overflow and underflow tests [from divide]
maxexponent: 999999999
minexponent: -999999999
dvix330 divideint +1.23456789012345E-0 9E+999999999 -> 0
dvix331 divideint 9E+999999999 +0.23456789012345E-0 -> NaN Division_impossible
dvix332 divideint +0.100 9E+999999999 -> 0
dvix333 divideint 9E-999999999 +9.100 -> 0
dvix335 divideint -1.23456789012345E-0 9E+999999999 -> -0
dvix336 divideint 9E+999999999 -0.83456789012345E-0 -> NaN Division_impossible
dvix337 divideint -0.100 9E+999999999 -> -0
dvix338 divideint 9E-999999999 -9.100 -> -0
-- long operand checks
maxexponent: 999
minexponent: -999
precision: 9
dvix401 divideint 12345678000 100 -> 123456780
dvix402 divideint 1 12345678000 -> 0
dvix403 divideint 1234567800 10 -> 123456780
dvix404 divideint 1 1234567800 -> 0
dvix405 divideint 1234567890 10 -> 123456789
dvix406 divideint 1 1234567890 -> 0
dvix407 divideint 1234567891 10 -> 123456789
dvix408 divideint 1 1234567891 -> 0
dvix409 divideint 12345678901 100 -> 123456789
dvix410 divideint 1 12345678901 -> 0
dvix411 divideint 1234567896 10 -> 123456789
dvix412 divideint 1 1234567896 -> 0
dvix413 divideint 12345678948 100 -> 123456789
dvix414 divideint 12345678949 100 -> 123456789
dvix415 divideint 12345678950 100 -> 123456789
dvix416 divideint 12345678951 100 -> 123456789
dvix417 divideint 12345678999 100 -> 123456789
precision: 15
dvix441 divideint 12345678000 1 -> 12345678000
dvix442 divideint 1 12345678000 -> 0
dvix443 divideint 1234567800 1 -> 1234567800
dvix444 divideint 1 1234567800 -> 0
dvix445 divideint 1234567890 1 -> 1234567890
dvix446 divideint 1 1234567890 -> 0
dvix447 divideint 1234567891 1 -> 1234567891
dvix448 divideint 1 1234567891 -> 0
dvix449 divideint 12345678901 1 -> 12345678901
dvix450 divideint 1 12345678901 -> 0
dvix451 divideint 1234567896 1 -> 1234567896
dvix452 divideint 1 1234567896 -> 0
precision: 9
rounding: half_up
maxExponent: 999
minexponent: -999
-- more zeros, etc.
dvix531 divideint 5.00 1E-3 -> 5000
dvix532 divideint 00.00 0.000 -> NaN Division_undefined
dvix533 divideint 00.00 0E-3 -> NaN Division_undefined
dvix534 divideint 0 -0 -> NaN Division_undefined
dvix535 divideint -0 0 -> NaN Division_undefined
dvix536 divideint -0 -0 -> NaN Division_undefined
dvix541 divideint 0 -1 -> -0
dvix542 divideint -0 -1 -> 0
dvix543 divideint 0 1 -> 0
dvix544 divideint -0 1 -> -0
dvix545 divideint -1 0 -> -Infinity Division_by_zero
dvix546 divideint -1 -0 -> Infinity Division_by_zero
dvix547 divideint 1 0 -> Infinity Division_by_zero
dvix548 divideint 1 -0 -> -Infinity Division_by_zero
dvix551 divideint 0.0 -1 -> -0
dvix552 divideint -0.0 -1 -> 0
dvix553 divideint 0.0 1 -> 0
dvix554 divideint -0.0 1 -> -0
dvix555 divideint -1.0 0 -> -Infinity Division_by_zero
dvix556 divideint -1.0 -0 -> Infinity Division_by_zero
dvix557 divideint 1.0 0 -> Infinity Division_by_zero
dvix558 divideint 1.0 -0 -> -Infinity Division_by_zero
dvix561 divideint 0 -1.0 -> -0
dvix562 divideint -0 -1.0 -> 0
dvix563 divideint 0 1.0 -> 0
dvix564 divideint -0 1.0 -> -0
dvix565 divideint -1 0.0 -> -Infinity Division_by_zero
dvix566 divideint -1 -0.0 -> Infinity Division_by_zero
dvix567 divideint 1 0.0 -> Infinity Division_by_zero
dvix568 divideint 1 -0.0 -> -Infinity Division_by_zero
dvix571 divideint 0.0 -1.0 -> -0
dvix572 divideint -0.0 -1.0 -> 0
dvix573 divideint 0.0 1.0 -> 0
dvix574 divideint -0.0 1.0 -> -0
dvix575 divideint -1.0 0.0 -> -Infinity Division_by_zero
dvix576 divideint -1.0 -0.0 -> Infinity Division_by_zero
dvix577 divideint 1.0 0.0 -> Infinity Division_by_zero
dvix578 divideint 1.0 -0.0 -> -Infinity Division_by_zero
-- Specials
dvix580 divideint Inf -Inf -> NaN Invalid_operation
dvix581 divideint Inf -1000 -> -Infinity
dvix582 divideint Inf -1 -> -Infinity
dvix583 divideint Inf -0 -> -Infinity
dvix584 divideint Inf 0 -> Infinity
dvix585 divideint Inf 1 -> Infinity
dvix586 divideint Inf 1000 -> Infinity
dvix587 divideint Inf Inf -> NaN Invalid_operation
dvix588 divideint -1000 Inf -> -0
dvix589 divideint -Inf Inf -> NaN Invalid_operation
dvix590 divideint -1 Inf -> -0
dvix591 divideint -0 Inf -> -0
dvix592 divideint 0 Inf -> 0
dvix593 divideint 1 Inf -> 0
dvix594 divideint 1000 Inf -> 0
dvix595 divideint Inf Inf -> NaN Invalid_operation
dvix600 divideint -Inf -Inf -> NaN Invalid_operation
dvix601 divideint -Inf -1000 -> Infinity
dvix602 divideint -Inf -1 -> Infinity
dvix603 divideint -Inf -0 -> Infinity
dvix604 divideint -Inf 0 -> -Infinity
dvix605 divideint -Inf 1 -> -Infinity
dvix606 divideint -Inf 1000 -> -Infinity
dvix607 divideint -Inf Inf -> NaN Invalid_operation
dvix608 divideint -1000 Inf -> -0
dvix609 divideint -Inf -Inf -> NaN Invalid_operation
dvix610 divideint -1 -Inf -> 0
dvix611 divideint -0 -Inf -> 0
dvix612 divideint 0 -Inf -> -0
dvix613 divideint 1 -Inf -> -0
dvix614 divideint 1000 -Inf -> -0
dvix615 divideint Inf -Inf -> NaN Invalid_operation
dvix621 divideint NaN -Inf -> NaN
dvix622 divideint NaN -1000 -> NaN
dvix623 divideint NaN -1 -> NaN
dvix624 divideint NaN -0 -> NaN
dvix625 divideint NaN 0 -> NaN
dvix626 divideint NaN 1 -> NaN
dvix627 divideint NaN 1000 -> NaN
dvix628 divideint NaN Inf -> NaN
dvix629 divideint NaN NaN -> NaN
dvix630 divideint -Inf NaN -> NaN
dvix631 divideint -1000 NaN -> NaN
dvix632 divideint -1 NaN -> NaN
dvix633 divideint -0 NaN -> NaN
dvix634 divideint 0 NaN -> NaN
dvix635 divideint 1 NaN -> NaN
dvix636 divideint 1000 NaN -> NaN
dvix637 divideint Inf NaN -> NaN
dvix641 divideint sNaN -Inf -> NaN Invalid_operation
dvix642 divideint sNaN -1000 -> NaN Invalid_operation
dvix643 divideint sNaN -1 -> NaN Invalid_operation
dvix644 divideint sNaN -0 -> NaN Invalid_operation
dvix645 divideint sNaN 0 -> NaN Invalid_operation
dvix646 divideint sNaN 1 -> NaN Invalid_operation
dvix647 divideint sNaN 1000 -> NaN Invalid_operation
dvix648 divideint sNaN NaN -> NaN Invalid_operation
dvix649 divideint sNaN sNaN -> NaN Invalid_operation
dvix650 divideint NaN sNaN -> NaN Invalid_operation
dvix651 divideint -Inf sNaN -> NaN Invalid_operation
dvix652 divideint -1000 sNaN -> NaN Invalid_operation
dvix653 divideint -1 sNaN -> NaN Invalid_operation
dvix654 divideint -0 sNaN -> NaN Invalid_operation
dvix655 divideint 0 sNaN -> NaN Invalid_operation
dvix656 divideint 1 sNaN -> NaN Invalid_operation
dvix657 divideint 1000 sNaN -> NaN Invalid_operation
dvix658 divideint Inf sNaN -> NaN Invalid_operation
dvix659 divideint NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dvix661 divideint NaN9 -Inf -> NaN9
dvix662 divideint NaN8 1000 -> NaN8
dvix663 divideint NaN7 Inf -> NaN7
dvix664 divideint -NaN6 NaN5 -> -NaN6
dvix665 divideint -Inf NaN4 -> NaN4
dvix666 divideint -1000 NaN3 -> NaN3
dvix667 divideint Inf -NaN2 -> -NaN2
dvix671 divideint -sNaN99 -Inf -> -NaN99 Invalid_operation
dvix672 divideint sNaN98 -1 -> NaN98 Invalid_operation
dvix673 divideint sNaN97 NaN -> NaN97 Invalid_operation
dvix674 divideint sNaN96 sNaN94 -> NaN96 Invalid_operation
dvix675 divideint NaN95 sNaN93 -> NaN93 Invalid_operation
dvix676 divideint -Inf sNaN92 -> NaN92 Invalid_operation
dvix677 divideint 0 sNaN91 -> NaN91 Invalid_operation
dvix678 divideint Inf -sNaN90 -> -NaN90 Invalid_operation
dvix679 divideint NaN sNaN89 -> NaN89 Invalid_operation
-- some long operand cases again
precision: 8
dvix710 divideint 100000001 1 -> NaN Division_impossible
dvix711 divideint 100000000.4 1 -> NaN Division_impossible
dvix712 divideint 100000000.5 1 -> NaN Division_impossible
dvix713 divideint 100000000.9 1 -> NaN Division_impossible
dvix714 divideint 100000000.999 1 -> NaN Division_impossible
precision: 6
dvix720 divideint 100000000 1 -> NaN Division_impossible
dvix721 divideint 10000000 1 -> NaN Division_impossible
dvix722 divideint 1000000 1 -> NaN Division_impossible
dvix723 divideint 100000 1 -> 100000
dvix724 divideint 10000 1 -> 10000
dvix725 divideint 1000 1 -> 1000
dvix726 divideint 100 1 -> 100
dvix727 divideint 10 1 -> 10
dvix728 divideint 1 1 -> 1
dvix729 divideint 1 10 -> 0
precision: 9
maxexponent: 999999999
minexponent: -999999999
dvix732 divideint 1 0.99e999999999 -> 0
dvix733 divideint 1 0.999999999e999999999 -> 0
dvix734 divideint 9e999999999 1 -> NaN Division_impossible
dvix735 divideint 9.9e999999999 1 -> NaN Division_impossible
dvix736 divideint 9.99e999999999 1 -> NaN Division_impossible
dvix737 divideint 9.99999999e999999999 1 -> NaN Division_impossible
dvix740 divideint 0.1 9e-999999999 -> NaN Division_impossible
dvix741 divideint 0.1 99e-999999999 -> NaN Division_impossible
dvix742 divideint 0.1 999e-999999999 -> NaN Division_impossible
dvix743 divideint 0.1 9e-999999998 -> NaN Division_impossible
dvix744 divideint 0.1 99e-999999998 -> NaN Division_impossible
dvix745 divideint 0.1 999e-999999998 -> NaN Division_impossible
dvix746 divideint 0.1 999e-999999997 -> NaN Division_impossible
dvix747 divideint 0.1 9999e-999999997 -> NaN Division_impossible
dvix748 divideint 0.1 99999e-999999997 -> NaN Division_impossible
-- Null tests
dvix900 divideint 10 # -> NaN Invalid_operation
dvix901 divideint # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,126 @@
------------------------------------------------------------------------
-- dqAbs.decTest -- decQuad absolute value, heeding sNaN --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqabs001 abs '1' -> '1'
dqabs002 abs '-1' -> '1'
dqabs003 abs '1.00' -> '1.00'
dqabs004 abs '-1.00' -> '1.00'
dqabs005 abs '0' -> '0'
dqabs006 abs '0.00' -> '0.00'
dqabs007 abs '00.0' -> '0.0'
dqabs008 abs '00.00' -> '0.00'
dqabs009 abs '00' -> '0'
dqabs010 abs '-2' -> '2'
dqabs011 abs '2' -> '2'
dqabs012 abs '-2.00' -> '2.00'
dqabs013 abs '2.00' -> '2.00'
dqabs014 abs '-0' -> '0'
dqabs015 abs '-0.00' -> '0.00'
dqabs016 abs '-00.0' -> '0.0'
dqabs017 abs '-00.00' -> '0.00'
dqabs018 abs '-00' -> '0'
dqabs020 abs '-2000000' -> '2000000'
dqabs021 abs '2000000' -> '2000000'
dqabs030 abs '+0.1' -> '0.1'
dqabs031 abs '-0.1' -> '0.1'
dqabs032 abs '+0.01' -> '0.01'
dqabs033 abs '-0.01' -> '0.01'
dqabs034 abs '+0.001' -> '0.001'
dqabs035 abs '-0.001' -> '0.001'
dqabs036 abs '+0.000001' -> '0.000001'
dqabs037 abs '-0.000001' -> '0.000001'
dqabs038 abs '+0.000000000001' -> '1E-12'
dqabs039 abs '-0.000000000001' -> '1E-12'
-- examples from decArith
dqabs040 abs '2.1' -> '2.1'
dqabs041 abs '-100' -> '100'
dqabs042 abs '101.5' -> '101.5'
dqabs043 abs '-101.5' -> '101.5'
-- more fixed, potential LHS swaps/overlays if done by subtract 0
dqabs060 abs '-56267E-10' -> '0.0000056267'
dqabs061 abs '-56267E-5' -> '0.56267'
dqabs062 abs '-56267E-2' -> '562.67'
dqabs063 abs '-56267E-1' -> '5626.7'
dqabs065 abs '-56267E-0' -> '56267'
-- subnormals and underflow
-- long operand tests
dqabs321 abs 1234567890123456 -> 1234567890123456
dqabs322 abs 12345678000 -> 12345678000
dqabs323 abs 1234567800 -> 1234567800
dqabs324 abs 1234567890 -> 1234567890
dqabs325 abs 1234567891 -> 1234567891
dqabs326 abs 12345678901 -> 12345678901
dqabs327 abs 1234567896 -> 1234567896
-- zeros
dqabs111 abs 0 -> 0
dqabs112 abs -0 -> 0
dqabs113 abs 0E+6 -> 0E+6
dqabs114 abs -0E+6 -> 0E+6
dqabs115 abs 0.0000 -> 0.0000
dqabs116 abs -0.0000 -> 0.0000
dqabs117 abs 0E-141 -> 0E-141
dqabs118 abs -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqabs121 abs 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqabs122 abs -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqabs123 abs 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
dqabs124 abs -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqabs131 abs 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqabs132 abs 1E-6143 -> 1E-6143
dqabs133 abs 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqabs134 abs 1E-6176 -> 1E-6176 Subnormal
dqabs135 abs -1E-6176 -> 1E-6176 Subnormal
dqabs136 abs -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqabs137 abs -1E-6143 -> 1E-6143
dqabs138 abs -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
-- specials
dqabs520 abs 'Inf' -> 'Infinity'
dqabs521 abs '-Inf' -> 'Infinity'
dqabs522 abs NaN -> NaN
dqabs523 abs sNaN -> NaN Invalid_operation
dqabs524 abs NaN22 -> NaN22
dqabs525 abs sNaN33 -> NaN33 Invalid_operation
dqabs526 abs -NaN22 -> -NaN22
dqabs527 abs -sNaN33 -> -NaN33 Invalid_operation
-- Null tests
dqabs900 abs # -> NaN Invalid_operation

View File

@@ -0,0 +1,420 @@
------------------------------------------------------------------------
-- dqAnd.decTest -- digitwise logical AND for decQuads --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check (truth table)
dqand001 and 0 0 -> 0
dqand002 and 0 1 -> 0
dqand003 and 1 0 -> 0
dqand004 and 1 1 -> 1
dqand005 and 1100 1010 -> 1000
-- and at msd and msd-1
-- 1234567890123456789012345678901234
dqand006 and 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqand007 and 0000000000000000000000000000000000 1000000000000000000000000000000000 -> 0
dqand008 and 1000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqand009 and 1000000000000000000000000000000000 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqand010 and 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqand011 and 0000000000000000000000000000000000 0100000000000000000000000000000000 -> 0
dqand012 and 0100000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqand013 and 0100000000000000000000000000000000 0100000000000000000000000000000000 -> 100000000000000000000000000000000
-- Various lengths
-- 1234567890123456789012345678901234
dqand601 and 0111111111111111111111111111111111 1111111111111111111111111111111111 -> 111111111111111111111111111111111
dqand602 and 1011111111111111111111111111111111 1111111111111111111111111111111111 -> 1011111111111111111111111111111111
dqand603 and 1101111111111111111111111111111111 1111111111111111111111111111111111 -> 1101111111111111111111111111111111
dqand604 and 1110111111111111111111111111111111 1111111111111111111111111111111111 -> 1110111111111111111111111111111111
dqand605 and 1111011111111111111111111111111111 1111111111111111111111111111111111 -> 1111011111111111111111111111111111
dqand606 and 1111101111111111111111111111111111 1111111111111111111111111111111111 -> 1111101111111111111111111111111111
dqand607 and 1111110111111111111111111111111111 1111111111111111111111111111111111 -> 1111110111111111111111111111111111
dqand608 and 1111111011111111111111111111111111 1111111111111111111111111111111111 -> 1111111011111111111111111111111111
dqand609 and 1111111101111111111111111111111111 1111111111111111111111111111111111 -> 1111111101111111111111111111111111
dqand610 and 1111111110111111111111111111111111 1111111111111111111111111111111111 -> 1111111110111111111111111111111111
dqand611 and 1111111111011111111111111111111111 1111111111111111111111111111111111 -> 1111111111011111111111111111111111
dqand612 and 1111111111101111111111111111111111 1111111111111111111111111111111111 -> 1111111111101111111111111111111111
dqand613 and 1111111111110111111111111111111111 1111111111111111111111111111111111 -> 1111111111110111111111111111111111
dqand614 and 1111111111111011111111111111111111 1111111111111111111111111111111111 -> 1111111111111011111111111111111111
dqand615 and 1111111111111101111111111111111111 1111111111111111111111111111111111 -> 1111111111111101111111111111111111
dqand616 and 1111111111111110111111111111111111 1111111111111111111111111111111111 -> 1111111111111110111111111111111111
dqand617 and 1111111111111111011111111111111111 1111111111111111111111111111111111 -> 1111111111111111011111111111111111
dqand618 and 1111111111111111101111111111111111 1111111111111111111111111111111111 -> 1111111111111111101111111111111111
dqand619 and 1111111111111111110111111111111111 1111111111111111111111111111111111 -> 1111111111111111110111111111111111
dqand620 and 1111111111111111111011111111111111 1111111111111111111111111111111111 -> 1111111111111111111011111111111111
dqand621 and 1111111111111111111101111111111111 1111111111111111111111111111111111 -> 1111111111111111111101111111111111
dqand622 and 1111111111111111111110111111111111 1111111111111111111111111111111111 -> 1111111111111111111110111111111111
dqand623 and 1111111111111111111111011111111111 1111111111111111111111111111111111 -> 1111111111111111111111011111111111
dqand624 and 1111111111111111111111101111111111 1111111111111111111111111111111111 -> 1111111111111111111111101111111111
dqand625 and 1111111111111111111111110111111111 1111111111111111111111111111111111 -> 1111111111111111111111110111111111
dqand626 and 1111111111111111111111111011111111 1111111111111111111111111111111111 -> 1111111111111111111111111011111111
dqand627 and 1111111111111111111111111101111111 1111111111111111111111111111111111 -> 1111111111111111111111111101111111
dqand628 and 1111111111111111111111111110111111 1111111111111111111111111111111111 -> 1111111111111111111111111110111111
dqand629 and 1111111111111111111111111111011111 1111111111111111111111111111111111 -> 1111111111111111111111111111011111
dqand630 and 1111111111111111111111111111101111 1111111111111111111111111111111111 -> 1111111111111111111111111111101111
dqand631 and 1111111111111111111111111111110111 1111111111111111111111111111111111 -> 1111111111111111111111111111110111
dqand632 and 1111111111111111111111111111111011 1111111111111111111111111111111111 -> 1111111111111111111111111111111011
dqand633 and 1111111111111111111111111111111101 1111111111111111111111111111111111 -> 1111111111111111111111111111111101
dqand634 and 1111111111111111111111111111111110 1111111111111111111111111111111111 -> 1111111111111111111111111111111110
dqand641 and 1111111111111111111111111111111111 0111111111111111111111111111111111 -> 111111111111111111111111111111111
dqand642 and 1111111111111111111111111111111111 1011111111111111111111111111111111 -> 1011111111111111111111111111111111
dqand643 and 1111111111111111111111111111111111 1101111111111111111111111111111111 -> 1101111111111111111111111111111111
dqand644 and 1111111111111111111111111111111111 1110111111111111111111111111111111 -> 1110111111111111111111111111111111
dqand645 and 1111111111111111111111111111111111 1111011111111111111111111111111111 -> 1111011111111111111111111111111111
dqand646 and 1111111111111111111111111111111111 1111101111111111111111111111111111 -> 1111101111111111111111111111111111
dqand647 and 1111111111111111111111111111111111 1111110111111111111111111111111111 -> 1111110111111111111111111111111111
dqand648 and 1111111111111111111111111111111111 1111111011111111111111111111111111 -> 1111111011111111111111111111111111
dqand649 and 1111111111111111111111111111111111 1111111101111111111111111111111111 -> 1111111101111111111111111111111111
dqand650 and 1111111111111111111111111111111111 1111111110111111111111111111111111 -> 1111111110111111111111111111111111
dqand651 and 1111111111111111111111111111111111 1111111111011111111111111111111111 -> 1111111111011111111111111111111111
dqand652 and 1111111111111111111111111111111111 1111111111101111111111111111111111 -> 1111111111101111111111111111111111
dqand653 and 1111111111111111111111111111111111 1111111111110111111111111111111111 -> 1111111111110111111111111111111111
dqand654 and 1111111111111111111111111111111111 1111111111111011111111111111111111 -> 1111111111111011111111111111111111
dqand655 and 1111111111111111111111111111111111 1111111111111101111111111111111111 -> 1111111111111101111111111111111111
dqand656 and 1111111111111111111111111111111111 1111111111111110111111111111111111 -> 1111111111111110111111111111111111
dqand657 and 1111111111111111111111111111111111 1111111111111111011111111111111111 -> 1111111111111111011111111111111111
dqand658 and 1111111111111111111111111111111111 1111111111111111101111111111111111 -> 1111111111111111101111111111111111
dqand659 and 1111111111111111111111111111111111 1111111111111111110111111111111111 -> 1111111111111111110111111111111111
dqand660 and 1111111111111111111111111111111111 1111111111111111111011111111111111 -> 1111111111111111111011111111111111
dqand661 and 1111111111111111111111111111111111 1111111111111111111101111111111111 -> 1111111111111111111101111111111111
dqand662 and 1111111111111111111111111111111111 1111111111111111111110111111111111 -> 1111111111111111111110111111111111
dqand663 and 1111111111111111111111111111111111 1111111111111111111111011111111111 -> 1111111111111111111111011111111111
dqand664 and 1111111111111111111111111111111111 1111111111111111111111101111111111 -> 1111111111111111111111101111111111
dqand665 and 1111111111111111111111111111111111 1111111111111111111111110111111111 -> 1111111111111111111111110111111111
dqand666 and 1111111111111111111111111111111111 1111111111111111111111111011111111 -> 1111111111111111111111111011111111
dqand667 and 1111111111111111111111111111111111 1111111111111111111111111101111111 -> 1111111111111111111111111101111111
dqand668 and 1111111111111111111111111111111111 1111111111111111111111111110111111 -> 1111111111111111111111111110111111
dqand669 and 1111111111111111111111111111111111 1111111111111111111111111111011111 -> 1111111111111111111111111111011111
dqand670 and 1111111111111111111111111111111111 1111111111111111111111111111101111 -> 1111111111111111111111111111101111
dqand671 and 1111111111111111111111111111111111 1111111111111111111111111111110111 -> 1111111111111111111111111111110111
dqand672 and 1111111111111111111111111111111111 1111111111111111111111111111111011 -> 1111111111111111111111111111111011
dqand673 and 1111111111111111111111111111111111 1111111111111111111111111111111101 -> 1111111111111111111111111111111101
dqand674 and 1111111111111111111111111111111111 1111111111111111111111111111111110 -> 1111111111111111111111111111111110
dqand675 and 0111111111111111111111111111111111 1111111111111111111111111111111110 -> 111111111111111111111111111111110
dqand676 and 1111111111111111111111111111111111 1111111111111111111111111111111110 -> 1111111111111111111111111111111110
dqand021 and 1111111111111111 1111111111111111 -> 1111111111111111
dqand024 and 1111111111111111 111111111111111 -> 111111111111111
dqand025 and 1111111111111111 11111111111111 -> 11111111111111
dqand026 and 1111111111111111 1111111111111 -> 1111111111111
dqand027 and 1111111111111111 111111111111 -> 111111111111
dqand028 and 1111111111111111 11111111111 -> 11111111111
dqand029 and 1111111111111111 1111111111 -> 1111111111
dqand030 and 1111111111111111 111111111 -> 111111111
dqand031 and 1111111111111111 11111111 -> 11111111
dqand032 and 1111111111111111 1111111 -> 1111111
dqand033 and 1111111111111111 111111 -> 111111
dqand034 and 1111111111111111 11111 -> 11111
dqand035 and 1111111111111111 1111 -> 1111
dqand036 and 1111111111111111 111 -> 111
dqand037 and 1111111111111111 11 -> 11
dqand038 and 1111111111111111 1 -> 1
dqand039 and 1111111111111111 0 -> 0
dqand040 and 1111111111111111 1111111111111111 -> 1111111111111111
dqand041 and 111111111111111 1111111111111111 -> 111111111111111
dqand042 and 111111111111111 1111111111111111 -> 111111111111111
dqand043 and 11111111111111 1111111111111111 -> 11111111111111
dqand044 and 1111111111111 1111111111111111 -> 1111111111111
dqand045 and 111111111111 1111111111111111 -> 111111111111
dqand046 and 11111111111 1111111111111111 -> 11111111111
dqand047 and 1111111111 1111111111111111 -> 1111111111
dqand048 and 111111111 1111111111111111 -> 111111111
dqand049 and 11111111 1111111111111111 -> 11111111
dqand050 and 1111111 1111111111111111 -> 1111111
dqand051 and 111111 1111111111111111 -> 111111
dqand052 and 11111 1111111111111111 -> 11111
dqand053 and 1111 1111111111111111 -> 1111
dqand054 and 111 1111111111111111 -> 111
dqand055 and 11 1111111111111111 -> 11
dqand056 and 1 1111111111111111 -> 1
dqand057 and 0 1111111111111111 -> 0
dqand150 and 1111111111 1 -> 1
dqand151 and 111111111 1 -> 1
dqand152 and 11111111 1 -> 1
dqand153 and 1111111 1 -> 1
dqand154 and 111111 1 -> 1
dqand155 and 11111 1 -> 1
dqand156 and 1111 1 -> 1
dqand157 and 111 1 -> 1
dqand158 and 11 1 -> 1
dqand159 and 1 1 -> 1
dqand160 and 1111111111 0 -> 0
dqand161 and 111111111 0 -> 0
dqand162 and 11111111 0 -> 0
dqand163 and 1111111 0 -> 0
dqand164 and 111111 0 -> 0
dqand165 and 11111 0 -> 0
dqand166 and 1111 0 -> 0
dqand167 and 111 0 -> 0
dqand168 and 11 0 -> 0
dqand169 and 1 0 -> 0
dqand170 and 1 1111111111 -> 1
dqand171 and 1 111111111 -> 1
dqand172 and 1 11111111 -> 1
dqand173 and 1 1111111 -> 1
dqand174 and 1 111111 -> 1
dqand175 and 1 11111 -> 1
dqand176 and 1 1111 -> 1
dqand177 and 1 111 -> 1
dqand178 and 1 11 -> 1
dqand179 and 1 1 -> 1
dqand180 and 0 1111111111 -> 0
dqand181 and 0 111111111 -> 0
dqand182 and 0 11111111 -> 0
dqand183 and 0 1111111 -> 0
dqand184 and 0 111111 -> 0
dqand185 and 0 11111 -> 0
dqand186 and 0 1111 -> 0
dqand187 and 0 111 -> 0
dqand188 and 0 11 -> 0
dqand189 and 0 1 -> 0
dqand090 and 011111111 111111111 -> 11111111
dqand091 and 101111111 111111111 -> 101111111
dqand092 and 110111111 111111111 -> 110111111
dqand093 and 111011111 111111111 -> 111011111
dqand094 and 111101111 111111111 -> 111101111
dqand095 and 111110111 111111111 -> 111110111
dqand096 and 111111011 111111111 -> 111111011
dqand097 and 111111101 111111111 -> 111111101
dqand098 and 111111110 111111111 -> 111111110
dqand100 and 111111111 011111111 -> 11111111
dqand101 and 111111111 101111111 -> 101111111
dqand102 and 111111111 110111111 -> 110111111
dqand103 and 111111111 111011111 -> 111011111
dqand104 and 111111111 111101111 -> 111101111
dqand105 and 111111111 111110111 -> 111110111
dqand106 and 111111111 111111011 -> 111111011
dqand107 and 111111111 111111101 -> 111111101
dqand108 and 111111111 111111110 -> 111111110
-- non-0/1 should not be accepted, nor should signs
dqand220 and 111111112 111111111 -> NaN Invalid_operation
dqand221 and 333333333 333333333 -> NaN Invalid_operation
dqand222 and 555555555 555555555 -> NaN Invalid_operation
dqand223 and 777777777 777777777 -> NaN Invalid_operation
dqand224 and 999999999 999999999 -> NaN Invalid_operation
dqand225 and 222222222 999999999 -> NaN Invalid_operation
dqand226 and 444444444 999999999 -> NaN Invalid_operation
dqand227 and 666666666 999999999 -> NaN Invalid_operation
dqand228 and 888888888 999999999 -> NaN Invalid_operation
dqand229 and 999999999 222222222 -> NaN Invalid_operation
dqand230 and 999999999 444444444 -> NaN Invalid_operation
dqand231 and 999999999 666666666 -> NaN Invalid_operation
dqand232 and 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
dqand240 and 567468689 -934981942 -> NaN Invalid_operation
dqand241 and 567367689 934981942 -> NaN Invalid_operation
dqand242 and -631917772 -706014634 -> NaN Invalid_operation
dqand243 and -756253257 138579234 -> NaN Invalid_operation
dqand244 and 835590149 567435400 -> NaN Invalid_operation
-- test MSD
dqand250 and 2000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqand251 and 7000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqand252 and 8000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqand253 and 9000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqand254 and 2000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqand255 and 7000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqand256 and 8000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqand257 and 9000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqand258 and 1000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqand259 and 1000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqand260 and 1000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqand261 and 1000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
dqand262 and 0000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqand263 and 0000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqand264 and 0000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqand265 and 0000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
-- test MSD-1
dqand270 and 0200000111000111000111001000000000 1000000111000111000111100000000010 -> NaN Invalid_operation
dqand271 and 0700000111000111000111000100000000 1000000111000111000111010000000100 -> NaN Invalid_operation
dqand272 and 0800000111000111000111000010000000 1000000111000111000111001000001000 -> NaN Invalid_operation
dqand273 and 0900000111000111000111000001000000 1000000111000111000111000100010000 -> NaN Invalid_operation
dqand274 and 1000000111000111000111000000100000 0200000111000111000111000010100000 -> NaN Invalid_operation
dqand275 and 1000000111000111000111000000010000 0700000111000111000111000001000000 -> NaN Invalid_operation
dqand276 and 1000000111000111000111000000001000 0800000111000111000111000010100000 -> NaN Invalid_operation
dqand277 and 1000000111000111000111000000000100 0900000111000111000111000000010000 -> NaN Invalid_operation
-- test LSD
dqand280 and 0010000111000111000111000000000002 1000000111000111000111000100000001 -> NaN Invalid_operation
dqand281 and 0001000111000111000111000000000007 1000000111000111000111001000000011 -> NaN Invalid_operation
dqand282 and 0000000111000111000111100000000008 1000000111000111000111010000000001 -> NaN Invalid_operation
dqand283 and 0000000111000111000111010000000009 1000000111000111000111100000000001 -> NaN Invalid_operation
dqand284 and 1000000111000111000111001000000000 0001000111000111000111000000000002 -> NaN Invalid_operation
dqand285 and 1000000111000111000111000100000000 0010000111000111000111000000000007 -> NaN Invalid_operation
dqand286 and 1000000111000111000111000010000000 0100000111000111000111000000000008 -> NaN Invalid_operation
dqand287 and 1000000111000111000111000001000000 1000000111000111000111000000000009 -> NaN Invalid_operation
-- test Middie
dqand288 and 0010000111000111000111000020000000 1000000111000111000111001000000000 -> NaN Invalid_operation
dqand289 and 0001000111000111000111000070000001 1000000111000111000111000100000000 -> NaN Invalid_operation
dqand290 and 0000000111000111000111100080000010 1000000111000111000111000010000000 -> NaN Invalid_operation
dqand291 and 0000000111000111000111010090000100 1000000111000111000111000001000000 -> NaN Invalid_operation
dqand292 and 1000000111000111000111001000001000 0000000111000111000111000020100000 -> NaN Invalid_operation
dqand293 and 1000000111000111000111000100010000 0000000111000111000111000070010000 -> NaN Invalid_operation
dqand294 and 1000000111000111000111000010100000 0000000111000111000111000080001000 -> NaN Invalid_operation
dqand295 and 1000000111000111000111000001000000 0000000111000111000111000090000100 -> NaN Invalid_operation
-- signs
dqand296 and -1000000111000111000111000001000000 -0000001110001110001110010000000100 -> NaN Invalid_operation
dqand297 and -1000000111000111000111000001000000 0000001110001110001110000010000100 -> NaN Invalid_operation
dqand298 and 1000000111000111000111000001000000 -0000001110001110001110001000000100 -> NaN Invalid_operation
dqand299 and 1000000111000111000111000001000000 0000001110001110001110000011000100 -> 110000110000110000001000000
-- Nmax, Nmin, Ntiny-like
dqand331 and 2 9.99999999E+999 -> NaN Invalid_operation
dqand332 and 3 1E-999 -> NaN Invalid_operation
dqand333 and 4 1.00000000E-999 -> NaN Invalid_operation
dqand334 and 5 1E-900 -> NaN Invalid_operation
dqand335 and 6 -1E-900 -> NaN Invalid_operation
dqand336 and 7 -1.00000000E-999 -> NaN Invalid_operation
dqand337 and 8 -1E-999 -> NaN Invalid_operation
dqand338 and 9 -9.99999999E+999 -> NaN Invalid_operation
dqand341 and 9.99999999E+999 -18 -> NaN Invalid_operation
dqand342 and 1E-999 01 -> NaN Invalid_operation
dqand343 and 1.00000000E-999 -18 -> NaN Invalid_operation
dqand344 and 1E-900 18 -> NaN Invalid_operation
dqand345 and -1E-900 -10 -> NaN Invalid_operation
dqand346 and -1.00000000E-999 18 -> NaN Invalid_operation
dqand347 and -1E-999 10 -> NaN Invalid_operation
dqand348 and -9.99999999E+999 -18 -> NaN Invalid_operation
-- A few other non-integers
dqand361 and 1.0 1 -> NaN Invalid_operation
dqand362 and 1E+1 1 -> NaN Invalid_operation
dqand363 and 0.0 1 -> NaN Invalid_operation
dqand364 and 0E+1 1 -> NaN Invalid_operation
dqand365 and 9.9 1 -> NaN Invalid_operation
dqand366 and 9E+1 1 -> NaN Invalid_operation
dqand371 and 0 1.0 -> NaN Invalid_operation
dqand372 and 0 1E+1 -> NaN Invalid_operation
dqand373 and 0 0.0 -> NaN Invalid_operation
dqand374 and 0 0E+1 -> NaN Invalid_operation
dqand375 and 0 9.9 -> NaN Invalid_operation
dqand376 and 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
dqand780 and -Inf -Inf -> NaN Invalid_operation
dqand781 and -Inf -1000 -> NaN Invalid_operation
dqand782 and -Inf -1 -> NaN Invalid_operation
dqand783 and -Inf -0 -> NaN Invalid_operation
dqand784 and -Inf 0 -> NaN Invalid_operation
dqand785 and -Inf 1 -> NaN Invalid_operation
dqand786 and -Inf 1000 -> NaN Invalid_operation
dqand787 and -1000 -Inf -> NaN Invalid_operation
dqand788 and -Inf -Inf -> NaN Invalid_operation
dqand789 and -1 -Inf -> NaN Invalid_operation
dqand790 and -0 -Inf -> NaN Invalid_operation
dqand791 and 0 -Inf -> NaN Invalid_operation
dqand792 and 1 -Inf -> NaN Invalid_operation
dqand793 and 1000 -Inf -> NaN Invalid_operation
dqand794 and Inf -Inf -> NaN Invalid_operation
dqand800 and Inf -Inf -> NaN Invalid_operation
dqand801 and Inf -1000 -> NaN Invalid_operation
dqand802 and Inf -1 -> NaN Invalid_operation
dqand803 and Inf -0 -> NaN Invalid_operation
dqand804 and Inf 0 -> NaN Invalid_operation
dqand805 and Inf 1 -> NaN Invalid_operation
dqand806 and Inf 1000 -> NaN Invalid_operation
dqand807 and Inf Inf -> NaN Invalid_operation
dqand808 and -1000 Inf -> NaN Invalid_operation
dqand809 and -Inf Inf -> NaN Invalid_operation
dqand810 and -1 Inf -> NaN Invalid_operation
dqand811 and -0 Inf -> NaN Invalid_operation
dqand812 and 0 Inf -> NaN Invalid_operation
dqand813 and 1 Inf -> NaN Invalid_operation
dqand814 and 1000 Inf -> NaN Invalid_operation
dqand815 and Inf Inf -> NaN Invalid_operation
dqand821 and NaN -Inf -> NaN Invalid_operation
dqand822 and NaN -1000 -> NaN Invalid_operation
dqand823 and NaN -1 -> NaN Invalid_operation
dqand824 and NaN -0 -> NaN Invalid_operation
dqand825 and NaN 0 -> NaN Invalid_operation
dqand826 and NaN 1 -> NaN Invalid_operation
dqand827 and NaN 1000 -> NaN Invalid_operation
dqand828 and NaN Inf -> NaN Invalid_operation
dqand829 and NaN NaN -> NaN Invalid_operation
dqand830 and -Inf NaN -> NaN Invalid_operation
dqand831 and -1000 NaN -> NaN Invalid_operation
dqand832 and -1 NaN -> NaN Invalid_operation
dqand833 and -0 NaN -> NaN Invalid_operation
dqand834 and 0 NaN -> NaN Invalid_operation
dqand835 and 1 NaN -> NaN Invalid_operation
dqand836 and 1000 NaN -> NaN Invalid_operation
dqand837 and Inf NaN -> NaN Invalid_operation
dqand841 and sNaN -Inf -> NaN Invalid_operation
dqand842 and sNaN -1000 -> NaN Invalid_operation
dqand843 and sNaN -1 -> NaN Invalid_operation
dqand844 and sNaN -0 -> NaN Invalid_operation
dqand845 and sNaN 0 -> NaN Invalid_operation
dqand846 and sNaN 1 -> NaN Invalid_operation
dqand847 and sNaN 1000 -> NaN Invalid_operation
dqand848 and sNaN NaN -> NaN Invalid_operation
dqand849 and sNaN sNaN -> NaN Invalid_operation
dqand850 and NaN sNaN -> NaN Invalid_operation
dqand851 and -Inf sNaN -> NaN Invalid_operation
dqand852 and -1000 sNaN -> NaN Invalid_operation
dqand853 and -1 sNaN -> NaN Invalid_operation
dqand854 and -0 sNaN -> NaN Invalid_operation
dqand855 and 0 sNaN -> NaN Invalid_operation
dqand856 and 1 sNaN -> NaN Invalid_operation
dqand857 and 1000 sNaN -> NaN Invalid_operation
dqand858 and Inf sNaN -> NaN Invalid_operation
dqand859 and NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqand861 and NaN1 -Inf -> NaN Invalid_operation
dqand862 and +NaN2 -1000 -> NaN Invalid_operation
dqand863 and NaN3 1000 -> NaN Invalid_operation
dqand864 and NaN4 Inf -> NaN Invalid_operation
dqand865 and NaN5 +NaN6 -> NaN Invalid_operation
dqand866 and -Inf NaN7 -> NaN Invalid_operation
dqand867 and -1000 NaN8 -> NaN Invalid_operation
dqand868 and 1000 NaN9 -> NaN Invalid_operation
dqand869 and Inf +NaN10 -> NaN Invalid_operation
dqand871 and sNaN11 -Inf -> NaN Invalid_operation
dqand872 and sNaN12 -1000 -> NaN Invalid_operation
dqand873 and sNaN13 1000 -> NaN Invalid_operation
dqand874 and sNaN14 NaN17 -> NaN Invalid_operation
dqand875 and sNaN15 sNaN18 -> NaN Invalid_operation
dqand876 and NaN16 sNaN19 -> NaN Invalid_operation
dqand877 and -Inf +sNaN20 -> NaN Invalid_operation
dqand878 and -1000 sNaN21 -> NaN Invalid_operation
dqand879 and 1000 sNaN22 -> NaN Invalid_operation
dqand880 and Inf sNaN23 -> NaN Invalid_operation
dqand881 and +NaN25 +sNaN24 -> NaN Invalid_operation
dqand882 and -NaN26 NaN28 -> NaN Invalid_operation
dqand883 and -sNaN27 sNaN29 -> NaN Invalid_operation
dqand884 and 1000 -NaN30 -> NaN Invalid_operation
dqand885 and 1000 -sNaN31 -> NaN Invalid_operation

View File

@@ -0,0 +1,77 @@
------------------------------------------------------------------------
-- dqClass.decTest -- decQuad Class operations --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- [New 2006.11.27]
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqcla001 class 0 -> +Zero
dqcla002 class 0.00 -> +Zero
dqcla003 class 0E+5 -> +Zero
dqcla004 class 1E-6176 -> +Subnormal
dqcla005 class 0.1E-6143 -> +Subnormal
dqcla006 class 0.99999999999999999999999999999999E-6143 -> +Subnormal
dqcla007 class 1.00000000000000000000000000000000E-6143 -> +Normal
dqcla008 class 1E-6143 -> +Normal
dqcla009 class 1E-100 -> +Normal
dqcla010 class 1E-10 -> +Normal
dqcla012 class 1E-1 -> +Normal
dqcla013 class 1 -> +Normal
dqcla014 class 2.50 -> +Normal
dqcla015 class 100.100 -> +Normal
dqcla016 class 1E+30 -> +Normal
dqcla017 class 1E+6144 -> +Normal
dqcla018 class 9.99999999999999999999999999999999E+6144 -> +Normal
dqcla019 class Inf -> +Infinity
dqcla021 class -0 -> -Zero
dqcla022 class -0.00 -> -Zero
dqcla023 class -0E+5 -> -Zero
dqcla024 class -1E-6176 -> -Subnormal
dqcla025 class -0.1E-6143 -> -Subnormal
dqcla026 class -0.99999999999999999999999999999999E-6143 -> -Subnormal
dqcla027 class -1.00000000000000000000000000000000E-6143 -> -Normal
dqcla028 class -1E-6143 -> -Normal
dqcla029 class -1E-100 -> -Normal
dqcla030 class -1E-10 -> -Normal
dqcla032 class -1E-1 -> -Normal
dqcla033 class -1 -> -Normal
dqcla034 class -2.50 -> -Normal
dqcla035 class -100.100 -> -Normal
dqcla036 class -1E+30 -> -Normal
dqcla037 class -1E+6144 -> -Normal
dqcla0614 class -9.99999999999999999999999999999999E+6144 -> -Normal
dqcla039 class -Inf -> -Infinity
dqcla041 class NaN -> NaN
dqcla042 class -NaN -> NaN
dqcla043 class +NaN12345 -> NaN
dqcla044 class sNaN -> sNaN
dqcla045 class -sNaN -> sNaN
dqcla046 class +sNaN12345 -> sNaN

View File

@@ -0,0 +1,753 @@
------------------------------------------------------------------------
-- dqCompare.decTest -- decQuad comparison that allows quiet NaNs --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Note that we cannot assume add/subtract tests cover paths adequately,
-- here, because the code might be quite different (comparison cannot
-- overflow or underflow, so actual subtractions are not necessary).
-- All operands and results are decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqcom001 compare -2 -2 -> 0
dqcom002 compare -2 -1 -> -1
dqcom003 compare -2 0 -> -1
dqcom004 compare -2 1 -> -1
dqcom005 compare -2 2 -> -1
dqcom006 compare -1 -2 -> 1
dqcom007 compare -1 -1 -> 0
dqcom008 compare -1 0 -> -1
dqcom009 compare -1 1 -> -1
dqcom010 compare -1 2 -> -1
dqcom011 compare 0 -2 -> 1
dqcom012 compare 0 -1 -> 1
dqcom013 compare 0 0 -> 0
dqcom014 compare 0 1 -> -1
dqcom015 compare 0 2 -> -1
dqcom016 compare 1 -2 -> 1
dqcom017 compare 1 -1 -> 1
dqcom018 compare 1 0 -> 1
dqcom019 compare 1 1 -> 0
dqcom020 compare 1 2 -> -1
dqcom021 compare 2 -2 -> 1
dqcom022 compare 2 -1 -> 1
dqcom023 compare 2 0 -> 1
dqcom025 compare 2 1 -> 1
dqcom026 compare 2 2 -> 0
dqcom031 compare -20 -20 -> 0
dqcom032 compare -20 -10 -> -1
dqcom033 compare -20 00 -> -1
dqcom034 compare -20 10 -> -1
dqcom035 compare -20 20 -> -1
dqcom036 compare -10 -20 -> 1
dqcom037 compare -10 -10 -> 0
dqcom038 compare -10 00 -> -1
dqcom039 compare -10 10 -> -1
dqcom040 compare -10 20 -> -1
dqcom041 compare 00 -20 -> 1
dqcom042 compare 00 -10 -> 1
dqcom043 compare 00 00 -> 0
dqcom044 compare 00 10 -> -1
dqcom045 compare 00 20 -> -1
dqcom046 compare 10 -20 -> 1
dqcom047 compare 10 -10 -> 1
dqcom048 compare 10 00 -> 1
dqcom049 compare 10 10 -> 0
dqcom050 compare 10 20 -> -1
dqcom051 compare 20 -20 -> 1
dqcom052 compare 20 -10 -> 1
dqcom053 compare 20 00 -> 1
dqcom055 compare 20 10 -> 1
dqcom056 compare 20 20 -> 0
dqcom061 compare -2.0 -2.0 -> 0
dqcom062 compare -2.0 -1.0 -> -1
dqcom063 compare -2.0 0.0 -> -1
dqcom064 compare -2.0 1.0 -> -1
dqcom065 compare -2.0 2.0 -> -1
dqcom066 compare -1.0 -2.0 -> 1
dqcom067 compare -1.0 -1.0 -> 0
dqcom068 compare -1.0 0.0 -> -1
dqcom069 compare -1.0 1.0 -> -1
dqcom070 compare -1.0 2.0 -> -1
dqcom071 compare 0.0 -2.0 -> 1
dqcom072 compare 0.0 -1.0 -> 1
dqcom073 compare 0.0 0.0 -> 0
dqcom074 compare 0.0 1.0 -> -1
dqcom075 compare 0.0 2.0 -> -1
dqcom076 compare 1.0 -2.0 -> 1
dqcom077 compare 1.0 -1.0 -> 1
dqcom078 compare 1.0 0.0 -> 1
dqcom079 compare 1.0 1.0 -> 0
dqcom080 compare 1.0 2.0 -> -1
dqcom081 compare 2.0 -2.0 -> 1
dqcom082 compare 2.0 -1.0 -> 1
dqcom083 compare 2.0 0.0 -> 1
dqcom085 compare 2.0 1.0 -> 1
dqcom086 compare 2.0 2.0 -> 0
-- now some cases which might overflow if subtract were used
dqcom090 compare 9.999999999999999999999999999999999E+6144 9.999999999999999999999999999999999E+6144 -> 0
dqcom091 compare -9.999999999999999999999999999999999E+6144 9.999999999999999999999999999999999E+6144 -> -1
dqcom092 compare 9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144 -> 1
dqcom093 compare -9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144 -> 0
-- some differing length/exponent cases
dqcom100 compare 7.0 7.0 -> 0
dqcom101 compare 7.0 7 -> 0
dqcom102 compare 7 7.0 -> 0
dqcom103 compare 7E+0 7.0 -> 0
dqcom104 compare 70E-1 7.0 -> 0
dqcom105 compare 0.7E+1 7 -> 0
dqcom106 compare 70E-1 7 -> 0
dqcom107 compare 7.0 7E+0 -> 0
dqcom108 compare 7.0 70E-1 -> 0
dqcom109 compare 7 0.7E+1 -> 0
dqcom110 compare 7 70E-1 -> 0
dqcom120 compare 8.0 7.0 -> 1
dqcom121 compare 8.0 7 -> 1
dqcom122 compare 8 7.0 -> 1
dqcom123 compare 8E+0 7.0 -> 1
dqcom124 compare 80E-1 7.0 -> 1
dqcom125 compare 0.8E+1 7 -> 1
dqcom126 compare 80E-1 7 -> 1
dqcom127 compare 8.0 7E+0 -> 1
dqcom128 compare 8.0 70E-1 -> 1
dqcom129 compare 8 0.7E+1 -> 1
dqcom130 compare 8 70E-1 -> 1
dqcom140 compare 8.0 9.0 -> -1
dqcom141 compare 8.0 9 -> -1
dqcom142 compare 8 9.0 -> -1
dqcom143 compare 8E+0 9.0 -> -1
dqcom144 compare 80E-1 9.0 -> -1
dqcom145 compare 0.8E+1 9 -> -1
dqcom146 compare 80E-1 9 -> -1
dqcom147 compare 8.0 9E+0 -> -1
dqcom148 compare 8.0 90E-1 -> -1
dqcom149 compare 8 0.9E+1 -> -1
dqcom150 compare 8 90E-1 -> -1
-- and again, with sign changes -+ ..
dqcom200 compare -7.0 7.0 -> -1
dqcom201 compare -7.0 7 -> -1
dqcom202 compare -7 7.0 -> -1
dqcom203 compare -7E+0 7.0 -> -1
dqcom204 compare -70E-1 7.0 -> -1
dqcom205 compare -0.7E+1 7 -> -1
dqcom206 compare -70E-1 7 -> -1
dqcom207 compare -7.0 7E+0 -> -1
dqcom208 compare -7.0 70E-1 -> -1
dqcom209 compare -7 0.7E+1 -> -1
dqcom210 compare -7 70E-1 -> -1
dqcom220 compare -8.0 7.0 -> -1
dqcom221 compare -8.0 7 -> -1
dqcom222 compare -8 7.0 -> -1
dqcom223 compare -8E+0 7.0 -> -1
dqcom224 compare -80E-1 7.0 -> -1
dqcom225 compare -0.8E+1 7 -> -1
dqcom226 compare -80E-1 7 -> -1
dqcom227 compare -8.0 7E+0 -> -1
dqcom228 compare -8.0 70E-1 -> -1
dqcom229 compare -8 0.7E+1 -> -1
dqcom230 compare -8 70E-1 -> -1
dqcom240 compare -8.0 9.0 -> -1
dqcom241 compare -8.0 9 -> -1
dqcom242 compare -8 9.0 -> -1
dqcom243 compare -8E+0 9.0 -> -1
dqcom244 compare -80E-1 9.0 -> -1
dqcom245 compare -0.8E+1 9 -> -1
dqcom246 compare -80E-1 9 -> -1
dqcom247 compare -8.0 9E+0 -> -1
dqcom248 compare -8.0 90E-1 -> -1
dqcom249 compare -8 0.9E+1 -> -1
dqcom250 compare -8 90E-1 -> -1
-- and again, with sign changes +- ..
dqcom300 compare 7.0 -7.0 -> 1
dqcom301 compare 7.0 -7 -> 1
dqcom302 compare 7 -7.0 -> 1
dqcom303 compare 7E+0 -7.0 -> 1
dqcom304 compare 70E-1 -7.0 -> 1
dqcom305 compare .7E+1 -7 -> 1
dqcom306 compare 70E-1 -7 -> 1
dqcom307 compare 7.0 -7E+0 -> 1
dqcom308 compare 7.0 -70E-1 -> 1
dqcom309 compare 7 -.7E+1 -> 1
dqcom310 compare 7 -70E-1 -> 1
dqcom320 compare 8.0 -7.0 -> 1
dqcom321 compare 8.0 -7 -> 1
dqcom322 compare 8 -7.0 -> 1
dqcom323 compare 8E+0 -7.0 -> 1
dqcom324 compare 80E-1 -7.0 -> 1
dqcom325 compare .8E+1 -7 -> 1
dqcom326 compare 80E-1 -7 -> 1
dqcom327 compare 8.0 -7E+0 -> 1
dqcom328 compare 8.0 -70E-1 -> 1
dqcom329 compare 8 -.7E+1 -> 1
dqcom330 compare 8 -70E-1 -> 1
dqcom340 compare 8.0 -9.0 -> 1
dqcom341 compare 8.0 -9 -> 1
dqcom342 compare 8 -9.0 -> 1
dqcom343 compare 8E+0 -9.0 -> 1
dqcom344 compare 80E-1 -9.0 -> 1
dqcom345 compare .8E+1 -9 -> 1
dqcom346 compare 80E-1 -9 -> 1
dqcom347 compare 8.0 -9E+0 -> 1
dqcom348 compare 8.0 -90E-1 -> 1
dqcom349 compare 8 -.9E+1 -> 1
dqcom350 compare 8 -90E-1 -> 1
-- and again, with sign changes -- ..
dqcom400 compare -7.0 -7.0 -> 0
dqcom401 compare -7.0 -7 -> 0
dqcom402 compare -7 -7.0 -> 0
dqcom403 compare -7E+0 -7.0 -> 0
dqcom404 compare -70E-1 -7.0 -> 0
dqcom405 compare -.7E+1 -7 -> 0
dqcom406 compare -70E-1 -7 -> 0
dqcom407 compare -7.0 -7E+0 -> 0
dqcom408 compare -7.0 -70E-1 -> 0
dqcom409 compare -7 -.7E+1 -> 0
dqcom410 compare -7 -70E-1 -> 0
dqcom420 compare -8.0 -7.0 -> -1
dqcom421 compare -8.0 -7 -> -1
dqcom422 compare -8 -7.0 -> -1
dqcom423 compare -8E+0 -7.0 -> -1
dqcom424 compare -80E-1 -7.0 -> -1
dqcom425 compare -.8E+1 -7 -> -1
dqcom426 compare -80E-1 -7 -> -1
dqcom427 compare -8.0 -7E+0 -> -1
dqcom428 compare -8.0 -70E-1 -> -1
dqcom429 compare -8 -.7E+1 -> -1
dqcom430 compare -8 -70E-1 -> -1
dqcom440 compare -8.0 -9.0 -> 1
dqcom441 compare -8.0 -9 -> 1
dqcom442 compare -8 -9.0 -> 1
dqcom443 compare -8E+0 -9.0 -> 1
dqcom444 compare -80E-1 -9.0 -> 1
dqcom445 compare -.8E+1 -9 -> 1
dqcom446 compare -80E-1 -9 -> 1
dqcom447 compare -8.0 -9E+0 -> 1
dqcom448 compare -8.0 -90E-1 -> 1
dqcom449 compare -8 -.9E+1 -> 1
dqcom450 compare -8 -90E-1 -> 1
-- misalignment traps for little-endian
dqcom451 compare 1.0 0.1 -> 1
dqcom452 compare 0.1 1.0 -> -1
dqcom453 compare 10.0 0.1 -> 1
dqcom454 compare 0.1 10.0 -> -1
dqcom455 compare 100 1.0 -> 1
dqcom456 compare 1.0 100 -> -1
dqcom457 compare 1000 10.0 -> 1
dqcom458 compare 10.0 1000 -> -1
dqcom459 compare 10000 100.0 -> 1
dqcom460 compare 100.0 10000 -> -1
dqcom461 compare 100000 1000.0 -> 1
dqcom462 compare 1000.0 100000 -> -1
dqcom463 compare 1000000 10000.0 -> 1
dqcom464 compare 10000.0 1000000 -> -1
-- testcases that subtract to lots of zeros at boundaries [pgr]
dqcom473 compare 123.9999999999999999994560000000000E-89 123.999999999999999999456E-89 -> 0
dqcom474 compare 123.999999999999999999456000000000E+89 123.999999999999999999456E+89 -> 0
dqcom475 compare 123.99999999999999999945600000000E-89 123.999999999999999999456E-89 -> 0
dqcom476 compare 123.9999999999999999994560000000E+89 123.999999999999999999456E+89 -> 0
dqcom477 compare 123.999999999999999999456000000E-89 123.999999999999999999456E-89 -> 0
dqcom478 compare 123.99999999999999999945600000E+89 123.999999999999999999456E+89 -> 0
dqcom479 compare 123.9999999999999999994560000E-89 123.999999999999999999456E-89 -> 0
dqcom480 compare 123.999999999999999999456000E+89 123.999999999999999999456E+89 -> 0
dqcom481 compare 123.99999999999999999945600E-89 123.999999999999999999456E-89 -> 0
dqcom482 compare 123.9999999999999999994560E+89 123.999999999999999999456E+89 -> 0
dqcom483 compare 123.999999999999999999456E-89 123.999999999999999999456E-89 -> 0
dqcom487 compare 123.999999999999999999456E+89 123.9999999999999999994560000000000E+89 -> 0
dqcom488 compare 123.999999999999999999456E-89 123.999999999999999999456000000000E-89 -> 0
dqcom489 compare 123.999999999999999999456E+89 123.99999999999999999945600000000E+89 -> 0
dqcom490 compare 123.999999999999999999456E-89 123.9999999999999999994560000000E-89 -> 0
dqcom491 compare 123.999999999999999999456E+89 123.999999999999999999456000000E+89 -> 0
dqcom492 compare 123.999999999999999999456E-89 123.99999999999999999945600000E-89 -> 0
dqcom493 compare 123.999999999999999999456E+89 123.9999999999999999994560000E+89 -> 0
dqcom494 compare 123.999999999999999999456E-89 123.999999999999999999456000E-89 -> 0
dqcom495 compare 123.999999999999999999456E+89 123.99999999999999999945600E+89 -> 0
dqcom496 compare 123.999999999999999999456E-89 123.9999999999999999994560E-89 -> 0
dqcom497 compare 123.999999999999999999456E+89 123.999999999999999999456E+89 -> 0
-- wide-ranging, around precision; signs equal
dqcom500 compare 1 1E-15 -> 1
dqcom501 compare 1 1E-14 -> 1
dqcom502 compare 1 1E-13 -> 1
dqcom503 compare 1 1E-12 -> 1
dqcom504 compare 1 1E-11 -> 1
dqcom505 compare 1 1E-10 -> 1
dqcom506 compare 1 1E-9 -> 1
dqcom507 compare 1 1E-8 -> 1
dqcom508 compare 1 1E-7 -> 1
dqcom509 compare 1 1E-6 -> 1
dqcom510 compare 1 1E-5 -> 1
dqcom511 compare 1 1E-4 -> 1
dqcom512 compare 1 1E-3 -> 1
dqcom513 compare 1 1E-2 -> 1
dqcom514 compare 1 1E-1 -> 1
dqcom515 compare 1 1E-0 -> 0
dqcom516 compare 1 1E+1 -> -1
dqcom517 compare 1 1E+2 -> -1
dqcom518 compare 1 1E+3 -> -1
dqcom519 compare 1 1E+4 -> -1
dqcom521 compare 1 1E+5 -> -1
dqcom522 compare 1 1E+6 -> -1
dqcom523 compare 1 1E+7 -> -1
dqcom524 compare 1 1E+8 -> -1
dqcom525 compare 1 1E+9 -> -1
dqcom526 compare 1 1E+10 -> -1
dqcom527 compare 1 1E+11 -> -1
dqcom528 compare 1 1E+12 -> -1
dqcom529 compare 1 1E+13 -> -1
dqcom530 compare 1 1E+14 -> -1
dqcom531 compare 1 1E+15 -> -1
-- LR swap
dqcom540 compare 1E-15 1 -> -1
dqcom541 compare 1E-14 1 -> -1
dqcom542 compare 1E-13 1 -> -1
dqcom543 compare 1E-12 1 -> -1
dqcom544 compare 1E-11 1 -> -1
dqcom545 compare 1E-10 1 -> -1
dqcom546 compare 1E-9 1 -> -1
dqcom547 compare 1E-8 1 -> -1
dqcom548 compare 1E-7 1 -> -1
dqcom549 compare 1E-6 1 -> -1
dqcom550 compare 1E-5 1 -> -1
dqcom551 compare 1E-4 1 -> -1
dqcom552 compare 1E-3 1 -> -1
dqcom553 compare 1E-2 1 -> -1
dqcom554 compare 1E-1 1 -> -1
dqcom555 compare 1E-0 1 -> 0
dqcom556 compare 1E+1 1 -> 1
dqcom557 compare 1E+2 1 -> 1
dqcom558 compare 1E+3 1 -> 1
dqcom559 compare 1E+4 1 -> 1
dqcom561 compare 1E+5 1 -> 1
dqcom562 compare 1E+6 1 -> 1
dqcom563 compare 1E+7 1 -> 1
dqcom564 compare 1E+8 1 -> 1
dqcom565 compare 1E+9 1 -> 1
dqcom566 compare 1E+10 1 -> 1
dqcom567 compare 1E+11 1 -> 1
dqcom568 compare 1E+12 1 -> 1
dqcom569 compare 1E+13 1 -> 1
dqcom570 compare 1E+14 1 -> 1
dqcom571 compare 1E+15 1 -> 1
-- similar with a useful coefficient, one side only
dqcom580 compare 0.000000987654321 1E-15 -> 1
dqcom581 compare 0.000000987654321 1E-14 -> 1
dqcom582 compare 0.000000987654321 1E-13 -> 1
dqcom583 compare 0.000000987654321 1E-12 -> 1
dqcom584 compare 0.000000987654321 1E-11 -> 1
dqcom585 compare 0.000000987654321 1E-10 -> 1
dqcom586 compare 0.000000987654321 1E-9 -> 1
dqcom587 compare 0.000000987654321 1E-8 -> 1
dqcom588 compare 0.000000987654321 1E-7 -> 1
dqcom589 compare 0.000000987654321 1E-6 -> -1
dqcom590 compare 0.000000987654321 1E-5 -> -1
dqcom591 compare 0.000000987654321 1E-4 -> -1
dqcom592 compare 0.000000987654321 1E-3 -> -1
dqcom593 compare 0.000000987654321 1E-2 -> -1
dqcom594 compare 0.000000987654321 1E-1 -> -1
dqcom595 compare 0.000000987654321 1E-0 -> -1
dqcom596 compare 0.000000987654321 1E+1 -> -1
dqcom597 compare 0.000000987654321 1E+2 -> -1
dqcom598 compare 0.000000987654321 1E+3 -> -1
dqcom599 compare 0.000000987654321 1E+4 -> -1
-- check some unit-y traps
dqcom600 compare 12 12.2345 -> -1
dqcom601 compare 12.0 12.2345 -> -1
dqcom602 compare 12.00 12.2345 -> -1
dqcom603 compare 12.000 12.2345 -> -1
dqcom604 compare 12.0000 12.2345 -> -1
dqcom605 compare 12.00000 12.2345 -> -1
dqcom606 compare 12.000000 12.2345 -> -1
dqcom607 compare 12.0000000 12.2345 -> -1
dqcom608 compare 12.00000000 12.2345 -> -1
dqcom609 compare 12.000000000 12.2345 -> -1
dqcom610 compare 12.1234 12 -> 1
dqcom611 compare 12.1234 12.0 -> 1
dqcom612 compare 12.1234 12.00 -> 1
dqcom613 compare 12.1234 12.000 -> 1
dqcom614 compare 12.1234 12.0000 -> 1
dqcom615 compare 12.1234 12.00000 -> 1
dqcom616 compare 12.1234 12.000000 -> 1
dqcom617 compare 12.1234 12.0000000 -> 1
dqcom618 compare 12.1234 12.00000000 -> 1
dqcom619 compare 12.1234 12.000000000 -> 1
dqcom620 compare -12 -12.2345 -> 1
dqcom621 compare -12.0 -12.2345 -> 1
dqcom622 compare -12.00 -12.2345 -> 1
dqcom623 compare -12.000 -12.2345 -> 1
dqcom624 compare -12.0000 -12.2345 -> 1
dqcom625 compare -12.00000 -12.2345 -> 1
dqcom626 compare -12.000000 -12.2345 -> 1
dqcom627 compare -12.0000000 -12.2345 -> 1
dqcom628 compare -12.00000000 -12.2345 -> 1
dqcom629 compare -12.000000000 -12.2345 -> 1
dqcom630 compare -12.1234 -12 -> -1
dqcom631 compare -12.1234 -12.0 -> -1
dqcom632 compare -12.1234 -12.00 -> -1
dqcom633 compare -12.1234 -12.000 -> -1
dqcom634 compare -12.1234 -12.0000 -> -1
dqcom635 compare -12.1234 -12.00000 -> -1
dqcom636 compare -12.1234 -12.000000 -> -1
dqcom637 compare -12.1234 -12.0000000 -> -1
dqcom638 compare -12.1234 -12.00000000 -> -1
dqcom639 compare -12.1234 -12.000000000 -> -1
-- extended zeros
dqcom640 compare 0 0 -> 0
dqcom641 compare 0 -0 -> 0
dqcom642 compare 0 -0.0 -> 0
dqcom643 compare 0 0.0 -> 0
dqcom644 compare -0 0 -> 0
dqcom645 compare -0 -0 -> 0
dqcom646 compare -0 -0.0 -> 0
dqcom647 compare -0 0.0 -> 0
dqcom648 compare 0.0 0 -> 0
dqcom649 compare 0.0 -0 -> 0
dqcom650 compare 0.0 -0.0 -> 0
dqcom651 compare 0.0 0.0 -> 0
dqcom652 compare -0.0 0 -> 0
dqcom653 compare -0.0 -0 -> 0
dqcom654 compare -0.0 -0.0 -> 0
dqcom655 compare -0.0 0.0 -> 0
dqcom656 compare -0E1 0.0 -> 0
dqcom657 compare -0E2 0.0 -> 0
dqcom658 compare 0E1 0.0 -> 0
dqcom659 compare 0E2 0.0 -> 0
dqcom660 compare -0E1 0 -> 0
dqcom661 compare -0E2 0 -> 0
dqcom662 compare 0E1 0 -> 0
dqcom663 compare 0E2 0 -> 0
dqcom664 compare -0E1 -0E1 -> 0
dqcom665 compare -0E2 -0E1 -> 0
dqcom666 compare 0E1 -0E1 -> 0
dqcom667 compare 0E2 -0E1 -> 0
dqcom668 compare -0E1 -0E2 -> 0
dqcom669 compare -0E2 -0E2 -> 0
dqcom670 compare 0E1 -0E2 -> 0
dqcom671 compare 0E2 -0E2 -> 0
dqcom672 compare -0E1 0E1 -> 0
dqcom673 compare -0E2 0E1 -> 0
dqcom674 compare 0E1 0E1 -> 0
dqcom675 compare 0E2 0E1 -> 0
dqcom676 compare -0E1 0E2 -> 0
dqcom677 compare -0E2 0E2 -> 0
dqcom678 compare 0E1 0E2 -> 0
dqcom679 compare 0E2 0E2 -> 0
-- trailing zeros; unit-y
dqcom680 compare 12 12 -> 0
dqcom681 compare 12 12.0 -> 0
dqcom682 compare 12 12.00 -> 0
dqcom683 compare 12 12.000 -> 0
dqcom684 compare 12 12.0000 -> 0
dqcom685 compare 12 12.00000 -> 0
dqcom686 compare 12 12.000000 -> 0
dqcom687 compare 12 12.0000000 -> 0
dqcom688 compare 12 12.00000000 -> 0
dqcom689 compare 12 12.000000000 -> 0
dqcom690 compare 12 12 -> 0
dqcom691 compare 12.0 12 -> 0
dqcom692 compare 12.00 12 -> 0
dqcom693 compare 12.000 12 -> 0
dqcom694 compare 12.0000 12 -> 0
dqcom695 compare 12.00000 12 -> 0
dqcom696 compare 12.000000 12 -> 0
dqcom697 compare 12.0000000 12 -> 0
dqcom698 compare 12.00000000 12 -> 0
dqcom699 compare 12.000000000 12 -> 0
-- first, second, & last digit
dqcom700 compare 1234567899999999999999999990123456 1234567899999999999999999990123455 -> 1
dqcom701 compare 1234567899999999999999999990123456 1234567899999999999999999990123456 -> 0
dqcom702 compare 1234567899999999999999999990123456 1234567899999999999999999990123457 -> -1
dqcom703 compare 1234567899999999999999999990123456 0234567899999999999999999990123456 -> 1
dqcom704 compare 1234567899999999999999999990123456 1234567899999999999999999990123456 -> 0
dqcom705 compare 1234567899999999999999999990123456 2234567899999999999999999990123456 -> -1
dqcom706 compare 1134567899999999999999999990123456 1034567899999999999999999990123456 -> 1
dqcom707 compare 1134567899999999999999999990123456 1134567899999999999999999990123456 -> 0
dqcom708 compare 1134567899999999999999999990123456 1234567899999999999999999990123456 -> -1
-- miscellaneous
dqcom721 compare 12345678000 1 -> 1
dqcom722 compare 1 12345678000 -> -1
dqcom723 compare 1234567800 1 -> 1
dqcom724 compare 1 1234567800 -> -1
dqcom725 compare 1234567890 1 -> 1
dqcom726 compare 1 1234567890 -> -1
dqcom727 compare 1234567891 1 -> 1
dqcom728 compare 1 1234567891 -> -1
dqcom729 compare 12345678901 1 -> 1
dqcom730 compare 1 12345678901 -> -1
dqcom731 compare 1234567896 1 -> 1
dqcom732 compare 1 1234567896 -> -1
-- residue cases at lower precision
dqcom740 compare 1 0.9999999 -> 1
dqcom741 compare 1 0.999999 -> 1
dqcom742 compare 1 0.99999 -> 1
dqcom743 compare 1 1.0000 -> 0
dqcom744 compare 1 1.00001 -> -1
dqcom745 compare 1 1.000001 -> -1
dqcom746 compare 1 1.0000001 -> -1
dqcom750 compare 0.9999999 1 -> -1
dqcom751 compare 0.999999 1 -> -1
dqcom752 compare 0.99999 1 -> -1
dqcom753 compare 1.0000 1 -> 0
dqcom754 compare 1.00001 1 -> 1
dqcom755 compare 1.000001 1 -> 1
dqcom756 compare 1.0000001 1 -> 1
-- Specials
dqcom780 compare Inf -Inf -> 1
dqcom781 compare Inf -1000 -> 1
dqcom782 compare Inf -1 -> 1
dqcom783 compare Inf -0 -> 1
dqcom784 compare Inf 0 -> 1
dqcom785 compare Inf 1 -> 1
dqcom786 compare Inf 1000 -> 1
dqcom787 compare Inf Inf -> 0
dqcom788 compare -1000 Inf -> -1
dqcom789 compare -Inf Inf -> -1
dqcom790 compare -1 Inf -> -1
dqcom791 compare -0 Inf -> -1
dqcom792 compare 0 Inf -> -1
dqcom793 compare 1 Inf -> -1
dqcom794 compare 1000 Inf -> -1
dqcom795 compare Inf Inf -> 0
dqcom800 compare -Inf -Inf -> 0
dqcom801 compare -Inf -1000 -> -1
dqcom802 compare -Inf -1 -> -1
dqcom803 compare -Inf -0 -> -1
dqcom804 compare -Inf 0 -> -1
dqcom805 compare -Inf 1 -> -1
dqcom806 compare -Inf 1000 -> -1
dqcom807 compare -Inf Inf -> -1
dqcom808 compare -Inf -Inf -> 0
dqcom809 compare -1000 -Inf -> 1
dqcom810 compare -1 -Inf -> 1
dqcom811 compare -0 -Inf -> 1
dqcom812 compare 0 -Inf -> 1
dqcom813 compare 1 -Inf -> 1
dqcom814 compare 1000 -Inf -> 1
dqcom815 compare Inf -Inf -> 1
dqcom821 compare NaN -Inf -> NaN
dqcom822 compare NaN -1000 -> NaN
dqcom823 compare NaN -1 -> NaN
dqcom824 compare NaN -0 -> NaN
dqcom825 compare NaN 0 -> NaN
dqcom826 compare NaN 1 -> NaN
dqcom827 compare NaN 1000 -> NaN
dqcom828 compare NaN Inf -> NaN
dqcom829 compare NaN NaN -> NaN
dqcom830 compare -Inf NaN -> NaN
dqcom831 compare -1000 NaN -> NaN
dqcom832 compare -1 NaN -> NaN
dqcom833 compare -0 NaN -> NaN
dqcom834 compare 0 NaN -> NaN
dqcom835 compare 1 NaN -> NaN
dqcom836 compare 1000 NaN -> NaN
dqcom837 compare Inf NaN -> NaN
dqcom838 compare -NaN -NaN -> -NaN
dqcom839 compare +NaN -NaN -> NaN
dqcom840 compare -NaN +NaN -> -NaN
dqcom841 compare sNaN -Inf -> NaN Invalid_operation
dqcom842 compare sNaN -1000 -> NaN Invalid_operation
dqcom843 compare sNaN -1 -> NaN Invalid_operation
dqcom844 compare sNaN -0 -> NaN Invalid_operation
dqcom845 compare sNaN 0 -> NaN Invalid_operation
dqcom846 compare sNaN 1 -> NaN Invalid_operation
dqcom847 compare sNaN 1000 -> NaN Invalid_operation
dqcom848 compare sNaN NaN -> NaN Invalid_operation
dqcom849 compare sNaN sNaN -> NaN Invalid_operation
dqcom850 compare NaN sNaN -> NaN Invalid_operation
dqcom851 compare -Inf sNaN -> NaN Invalid_operation
dqcom852 compare -1000 sNaN -> NaN Invalid_operation
dqcom853 compare -1 sNaN -> NaN Invalid_operation
dqcom854 compare -0 sNaN -> NaN Invalid_operation
dqcom855 compare 0 sNaN -> NaN Invalid_operation
dqcom856 compare 1 sNaN -> NaN Invalid_operation
dqcom857 compare 1000 sNaN -> NaN Invalid_operation
dqcom858 compare Inf sNaN -> NaN Invalid_operation
dqcom859 compare NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqcom860 compare NaN9 -Inf -> NaN9
dqcom861 compare NaN8 999 -> NaN8
dqcom862 compare NaN77 Inf -> NaN77
dqcom863 compare -NaN67 NaN5 -> -NaN67
dqcom864 compare -Inf -NaN4 -> -NaN4
dqcom865 compare -999 -NaN33 -> -NaN33
dqcom866 compare Inf NaN2 -> NaN2
dqcom867 compare -NaN41 -NaN42 -> -NaN41
dqcom868 compare +NaN41 -NaN42 -> NaN41
dqcom869 compare -NaN41 +NaN42 -> -NaN41
dqcom870 compare +NaN41 +NaN42 -> NaN41
dqcom871 compare -sNaN99 -Inf -> -NaN99 Invalid_operation
dqcom872 compare sNaN98 -11 -> NaN98 Invalid_operation
dqcom873 compare sNaN97 NaN -> NaN97 Invalid_operation
dqcom874 compare sNaN16 sNaN94 -> NaN16 Invalid_operation
dqcom875 compare NaN85 sNaN83 -> NaN83 Invalid_operation
dqcom876 compare -Inf sNaN92 -> NaN92 Invalid_operation
dqcom877 compare 088 sNaN81 -> NaN81 Invalid_operation
dqcom878 compare Inf sNaN90 -> NaN90 Invalid_operation
dqcom879 compare NaN -sNaN89 -> -NaN89 Invalid_operation
-- wide range
dqcom880 compare +1.23456789012345E-0 9E+6144 -> -1
dqcom881 compare 9E+6144 +1.23456789012345E-0 -> 1
dqcom882 compare +0.100 9E-6143 -> 1
dqcom883 compare 9E-6143 +0.100 -> -1
dqcom885 compare -1.23456789012345E-0 9E+6144 -> -1
dqcom886 compare 9E+6144 -1.23456789012345E-0 -> 1
dqcom887 compare -0.100 9E-6143 -> -1
dqcom888 compare 9E-6143 -0.100 -> 1
-- signs
dqcom901 compare 1e+77 1e+11 -> 1
dqcom902 compare 1e+77 -1e+11 -> 1
dqcom903 compare -1e+77 1e+11 -> -1
dqcom904 compare -1e+77 -1e+11 -> -1
dqcom905 compare 1e-77 1e-11 -> -1
dqcom906 compare 1e-77 -1e-11 -> 1
dqcom907 compare -1e-77 1e-11 -> -1
dqcom908 compare -1e-77 -1e-11 -> 1
-- full alignment range, both ways
dqcomp1001 compare 1 1.000000000000000000000000000000000 -> 0
dqcomp1002 compare 1 1.00000000000000000000000000000000 -> 0
dqcomp1003 compare 1 1.0000000000000000000000000000000 -> 0
dqcomp1004 compare 1 1.000000000000000000000000000000 -> 0
dqcomp1005 compare 1 1.00000000000000000000000000000 -> 0
dqcomp1006 compare 1 1.0000000000000000000000000000 -> 0
dqcomp1007 compare 1 1.000000000000000000000000000 -> 0
dqcomp1008 compare 1 1.00000000000000000000000000 -> 0
dqcomp1009 compare 1 1.0000000000000000000000000 -> 0
dqcomp1010 compare 1 1.000000000000000000000000 -> 0
dqcomp1011 compare 1 1.00000000000000000000000 -> 0
dqcomp1012 compare 1 1.0000000000000000000000 -> 0
dqcomp1013 compare 1 1.000000000000000000000 -> 0
dqcomp1014 compare 1 1.00000000000000000000 -> 0
dqcomp1015 compare 1 1.0000000000000000000 -> 0
dqcomp1016 compare 1 1.000000000000000000 -> 0
dqcomp1017 compare 1 1.00000000000000000 -> 0
dqcomp1018 compare 1 1.0000000000000000 -> 0
dqcomp1019 compare 1 1.000000000000000 -> 0
dqcomp1020 compare 1 1.00000000000000 -> 0
dqcomp1021 compare 1 1.0000000000000 -> 0
dqcomp1022 compare 1 1.000000000000 -> 0
dqcomp1023 compare 1 1.00000000000 -> 0
dqcomp1024 compare 1 1.0000000000 -> 0
dqcomp1025 compare 1 1.000000000 -> 0
dqcomp1026 compare 1 1.00000000 -> 0
dqcomp1027 compare 1 1.0000000 -> 0
dqcomp1028 compare 1 1.000000 -> 0
dqcomp1029 compare 1 1.00000 -> 0
dqcomp1030 compare 1 1.0000 -> 0
dqcomp1031 compare 1 1.000 -> 0
dqcomp1032 compare 1 1.00 -> 0
dqcomp1033 compare 1 1.0 -> 0
dqcomp1041 compare 1.000000000000000000000000000000000 1 -> 0
dqcomp1042 compare 1.00000000000000000000000000000000 1 -> 0
dqcomp1043 compare 1.0000000000000000000000000000000 1 -> 0
dqcomp1044 compare 1.000000000000000000000000000000 1 -> 0
dqcomp1045 compare 1.00000000000000000000000000000 1 -> 0
dqcomp1046 compare 1.0000000000000000000000000000 1 -> 0
dqcomp1047 compare 1.000000000000000000000000000 1 -> 0
dqcomp1048 compare 1.00000000000000000000000000 1 -> 0
dqcomp1049 compare 1.0000000000000000000000000 1 -> 0
dqcomp1050 compare 1.000000000000000000000000 1 -> 0
dqcomp1051 compare 1.00000000000000000000000 1 -> 0
dqcomp1052 compare 1.0000000000000000000000 1 -> 0
dqcomp1053 compare 1.000000000000000000000 1 -> 0
dqcomp1054 compare 1.00000000000000000000 1 -> 0
dqcomp1055 compare 1.0000000000000000000 1 -> 0
dqcomp1056 compare 1.000000000000000000 1 -> 0
dqcomp1057 compare 1.00000000000000000 1 -> 0
dqcomp1058 compare 1.0000000000000000 1 -> 0
dqcomp1059 compare 1.000000000000000 1 -> 0
dqcomp1060 compare 1.00000000000000 1 -> 0
dqcomp1061 compare 1.0000000000000 1 -> 0
dqcomp1062 compare 1.000000000000 1 -> 0
dqcomp1063 compare 1.00000000000 1 -> 0
dqcomp1064 compare 1.0000000000 1 -> 0
dqcomp1065 compare 1.000000000 1 -> 0
dqcomp1066 compare 1.00000000 1 -> 0
dqcomp1067 compare 1.0000000 1 -> 0
dqcomp1068 compare 1.000000 1 -> 0
dqcomp1069 compare 1.00000 1 -> 0
dqcomp1070 compare 1.0000 1 -> 0
dqcomp1071 compare 1.000 1 -> 0
dqcomp1072 compare 1.00 1 -> 0
dqcomp1073 compare 1.0 1 -> 0
-- check MSD always detected non-zero
dqcomp1080 compare 0 0.000000000000000000000000000000000 -> 0
dqcomp1081 compare 0 1.000000000000000000000000000000000 -> -1
dqcomp1082 compare 0 2.000000000000000000000000000000000 -> -1
dqcomp1083 compare 0 3.000000000000000000000000000000000 -> -1
dqcomp1084 compare 0 4.000000000000000000000000000000000 -> -1
dqcomp1085 compare 0 5.000000000000000000000000000000000 -> -1
dqcomp1086 compare 0 6.000000000000000000000000000000000 -> -1
dqcomp1087 compare 0 7.000000000000000000000000000000000 -> -1
dqcomp1088 compare 0 8.000000000000000000000000000000000 -> -1
dqcomp1089 compare 0 9.000000000000000000000000000000000 -> -1
dqcomp1090 compare 0.000000000000000000000000000000000 0 -> 0
dqcomp1091 compare 1.000000000000000000000000000000000 0 -> 1
dqcomp1092 compare 2.000000000000000000000000000000000 0 -> 1
dqcomp1093 compare 3.000000000000000000000000000000000 0 -> 1
dqcomp1094 compare 4.000000000000000000000000000000000 0 -> 1
dqcomp1095 compare 5.000000000000000000000000000000000 0 -> 1
dqcomp1096 compare 6.000000000000000000000000000000000 0 -> 1
dqcomp1097 compare 7.000000000000000000000000000000000 0 -> 1
dqcomp1098 compare 8.000000000000000000000000000000000 0 -> 1
dqcomp1099 compare 9.000000000000000000000000000000000 0 -> 1
-- Null tests
dqcom990 compare 10 # -> NaN Invalid_operation
dqcom991 compare # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,647 @@
------------------------------------------------------------------------
-- dqCompareSig.decTest -- decQuad comparison; all NaNs signal --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Note that we cannot assume add/subtract tests cover paths adequately,
-- here, because the code might be quite different (comparison cannot
-- overflow or underflow, so actual subtractions are not necessary).
-- All operands and results are decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqcms001 comparesig -2 -2 -> 0
dqcms002 comparesig -2 -1 -> -1
dqcms003 comparesig -2 0 -> -1
dqcms004 comparesig -2 1 -> -1
dqcms005 comparesig -2 2 -> -1
dqcms006 comparesig -1 -2 -> 1
dqcms007 comparesig -1 -1 -> 0
dqcms008 comparesig -1 0 -> -1
dqcms009 comparesig -1 1 -> -1
dqcms010 comparesig -1 2 -> -1
dqcms011 comparesig 0 -2 -> 1
dqcms012 comparesig 0 -1 -> 1
dqcms013 comparesig 0 0 -> 0
dqcms014 comparesig 0 1 -> -1
dqcms015 comparesig 0 2 -> -1
dqcms016 comparesig 1 -2 -> 1
dqcms017 comparesig 1 -1 -> 1
dqcms018 comparesig 1 0 -> 1
dqcms019 comparesig 1 1 -> 0
dqcms020 comparesig 1 2 -> -1
dqcms021 comparesig 2 -2 -> 1
dqcms022 comparesig 2 -1 -> 1
dqcms023 comparesig 2 0 -> 1
dqcms025 comparesig 2 1 -> 1
dqcms026 comparesig 2 2 -> 0
dqcms031 comparesig -20 -20 -> 0
dqcms032 comparesig -20 -10 -> -1
dqcms033 comparesig -20 00 -> -1
dqcms034 comparesig -20 10 -> -1
dqcms035 comparesig -20 20 -> -1
dqcms036 comparesig -10 -20 -> 1
dqcms037 comparesig -10 -10 -> 0
dqcms038 comparesig -10 00 -> -1
dqcms039 comparesig -10 10 -> -1
dqcms040 comparesig -10 20 -> -1
dqcms041 comparesig 00 -20 -> 1
dqcms042 comparesig 00 -10 -> 1
dqcms043 comparesig 00 00 -> 0
dqcms044 comparesig 00 10 -> -1
dqcms045 comparesig 00 20 -> -1
dqcms046 comparesig 10 -20 -> 1
dqcms047 comparesig 10 -10 -> 1
dqcms048 comparesig 10 00 -> 1
dqcms049 comparesig 10 10 -> 0
dqcms050 comparesig 10 20 -> -1
dqcms051 comparesig 20 -20 -> 1
dqcms052 comparesig 20 -10 -> 1
dqcms053 comparesig 20 00 -> 1
dqcms055 comparesig 20 10 -> 1
dqcms056 comparesig 20 20 -> 0
dqcms061 comparesig -2.0 -2.0 -> 0
dqcms062 comparesig -2.0 -1.0 -> -1
dqcms063 comparesig -2.0 0.0 -> -1
dqcms064 comparesig -2.0 1.0 -> -1
dqcms065 comparesig -2.0 2.0 -> -1
dqcms066 comparesig -1.0 -2.0 -> 1
dqcms067 comparesig -1.0 -1.0 -> 0
dqcms068 comparesig -1.0 0.0 -> -1
dqcms069 comparesig -1.0 1.0 -> -1
dqcms070 comparesig -1.0 2.0 -> -1
dqcms071 comparesig 0.0 -2.0 -> 1
dqcms072 comparesig 0.0 -1.0 -> 1
dqcms073 comparesig 0.0 0.0 -> 0
dqcms074 comparesig 0.0 1.0 -> -1
dqcms075 comparesig 0.0 2.0 -> -1
dqcms076 comparesig 1.0 -2.0 -> 1
dqcms077 comparesig 1.0 -1.0 -> 1
dqcms078 comparesig 1.0 0.0 -> 1
dqcms079 comparesig 1.0 1.0 -> 0
dqcms080 comparesig 1.0 2.0 -> -1
dqcms081 comparesig 2.0 -2.0 -> 1
dqcms082 comparesig 2.0 -1.0 -> 1
dqcms083 comparesig 2.0 0.0 -> 1
dqcms085 comparesig 2.0 1.0 -> 1
dqcms086 comparesig 2.0 2.0 -> 0
-- now some cases which might overflow if subtract were used
dqcms090 comparesig 9.999999999999999999999999999999999E+6144 9.999999999999999999999999999999999E+6144 -> 0
dqcms091 comparesig -9.999999999999999999999999999999999E+6144 9.999999999999999999999999999999999E+6144 -> -1
dqcms092 comparesig 9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144 -> 1
dqcms093 comparesig -9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144 -> 0
-- some differing length/exponent cases
dqcms100 comparesig 7.0 7.0 -> 0
dqcms101 comparesig 7.0 7 -> 0
dqcms102 comparesig 7 7.0 -> 0
dqcms103 comparesig 7E+0 7.0 -> 0
dqcms104 comparesig 70E-1 7.0 -> 0
dqcms105 comparesig 0.7E+1 7 -> 0
dqcms106 comparesig 70E-1 7 -> 0
dqcms107 comparesig 7.0 7E+0 -> 0
dqcms108 comparesig 7.0 70E-1 -> 0
dqcms109 comparesig 7 0.7E+1 -> 0
dqcms110 comparesig 7 70E-1 -> 0
dqcms120 comparesig 8.0 7.0 -> 1
dqcms121 comparesig 8.0 7 -> 1
dqcms122 comparesig 8 7.0 -> 1
dqcms123 comparesig 8E+0 7.0 -> 1
dqcms124 comparesig 80E-1 7.0 -> 1
dqcms125 comparesig 0.8E+1 7 -> 1
dqcms126 comparesig 80E-1 7 -> 1
dqcms127 comparesig 8.0 7E+0 -> 1
dqcms128 comparesig 8.0 70E-1 -> 1
dqcms129 comparesig 8 0.7E+1 -> 1
dqcms130 comparesig 8 70E-1 -> 1
dqcms140 comparesig 8.0 9.0 -> -1
dqcms141 comparesig 8.0 9 -> -1
dqcms142 comparesig 8 9.0 -> -1
dqcms143 comparesig 8E+0 9.0 -> -1
dqcms144 comparesig 80E-1 9.0 -> -1
dqcms145 comparesig 0.8E+1 9 -> -1
dqcms146 comparesig 80E-1 9 -> -1
dqcms147 comparesig 8.0 9E+0 -> -1
dqcms148 comparesig 8.0 90E-1 -> -1
dqcms149 comparesig 8 0.9E+1 -> -1
dqcms150 comparesig 8 90E-1 -> -1
-- and again, with sign changes -+ ..
dqcms200 comparesig -7.0 7.0 -> -1
dqcms201 comparesig -7.0 7 -> -1
dqcms202 comparesig -7 7.0 -> -1
dqcms203 comparesig -7E+0 7.0 -> -1
dqcms204 comparesig -70E-1 7.0 -> -1
dqcms205 comparesig -0.7E+1 7 -> -1
dqcms206 comparesig -70E-1 7 -> -1
dqcms207 comparesig -7.0 7E+0 -> -1
dqcms208 comparesig -7.0 70E-1 -> -1
dqcms209 comparesig -7 0.7E+1 -> -1
dqcms210 comparesig -7 70E-1 -> -1
dqcms220 comparesig -8.0 7.0 -> -1
dqcms221 comparesig -8.0 7 -> -1
dqcms222 comparesig -8 7.0 -> -1
dqcms223 comparesig -8E+0 7.0 -> -1
dqcms224 comparesig -80E-1 7.0 -> -1
dqcms225 comparesig -0.8E+1 7 -> -1
dqcms226 comparesig -80E-1 7 -> -1
dqcms227 comparesig -8.0 7E+0 -> -1
dqcms228 comparesig -8.0 70E-1 -> -1
dqcms229 comparesig -8 0.7E+1 -> -1
dqcms230 comparesig -8 70E-1 -> -1
dqcms240 comparesig -8.0 9.0 -> -1
dqcms241 comparesig -8.0 9 -> -1
dqcms242 comparesig -8 9.0 -> -1
dqcms243 comparesig -8E+0 9.0 -> -1
dqcms244 comparesig -80E-1 9.0 -> -1
dqcms245 comparesig -0.8E+1 9 -> -1
dqcms246 comparesig -80E-1 9 -> -1
dqcms247 comparesig -8.0 9E+0 -> -1
dqcms248 comparesig -8.0 90E-1 -> -1
dqcms249 comparesig -8 0.9E+1 -> -1
dqcms250 comparesig -8 90E-1 -> -1
-- and again, with sign changes +- ..
dqcms300 comparesig 7.0 -7.0 -> 1
dqcms301 comparesig 7.0 -7 -> 1
dqcms302 comparesig 7 -7.0 -> 1
dqcms303 comparesig 7E+0 -7.0 -> 1
dqcms304 comparesig 70E-1 -7.0 -> 1
dqcms305 comparesig .7E+1 -7 -> 1
dqcms306 comparesig 70E-1 -7 -> 1
dqcms307 comparesig 7.0 -7E+0 -> 1
dqcms308 comparesig 7.0 -70E-1 -> 1
dqcms309 comparesig 7 -.7E+1 -> 1
dqcms310 comparesig 7 -70E-1 -> 1
dqcms320 comparesig 8.0 -7.0 -> 1
dqcms321 comparesig 8.0 -7 -> 1
dqcms322 comparesig 8 -7.0 -> 1
dqcms323 comparesig 8E+0 -7.0 -> 1
dqcms324 comparesig 80E-1 -7.0 -> 1
dqcms325 comparesig .8E+1 -7 -> 1
dqcms326 comparesig 80E-1 -7 -> 1
dqcms327 comparesig 8.0 -7E+0 -> 1
dqcms328 comparesig 8.0 -70E-1 -> 1
dqcms329 comparesig 8 -.7E+1 -> 1
dqcms330 comparesig 8 -70E-1 -> 1
dqcms340 comparesig 8.0 -9.0 -> 1
dqcms341 comparesig 8.0 -9 -> 1
dqcms342 comparesig 8 -9.0 -> 1
dqcms343 comparesig 8E+0 -9.0 -> 1
dqcms344 comparesig 80E-1 -9.0 -> 1
dqcms345 comparesig .8E+1 -9 -> 1
dqcms346 comparesig 80E-1 -9 -> 1
dqcms347 comparesig 8.0 -9E+0 -> 1
dqcms348 comparesig 8.0 -90E-1 -> 1
dqcms349 comparesig 8 -.9E+1 -> 1
dqcms350 comparesig 8 -90E-1 -> 1
-- and again, with sign changes -- ..
dqcms400 comparesig -7.0 -7.0 -> 0
dqcms401 comparesig -7.0 -7 -> 0
dqcms402 comparesig -7 -7.0 -> 0
dqcms403 comparesig -7E+0 -7.0 -> 0
dqcms404 comparesig -70E-1 -7.0 -> 0
dqcms405 comparesig -.7E+1 -7 -> 0
dqcms406 comparesig -70E-1 -7 -> 0
dqcms407 comparesig -7.0 -7E+0 -> 0
dqcms408 comparesig -7.0 -70E-1 -> 0
dqcms409 comparesig -7 -.7E+1 -> 0
dqcms410 comparesig -7 -70E-1 -> 0
dqcms420 comparesig -8.0 -7.0 -> -1
dqcms421 comparesig -8.0 -7 -> -1
dqcms422 comparesig -8 -7.0 -> -1
dqcms423 comparesig -8E+0 -7.0 -> -1
dqcms424 comparesig -80E-1 -7.0 -> -1
dqcms425 comparesig -.8E+1 -7 -> -1
dqcms426 comparesig -80E-1 -7 -> -1
dqcms427 comparesig -8.0 -7E+0 -> -1
dqcms428 comparesig -8.0 -70E-1 -> -1
dqcms429 comparesig -8 -.7E+1 -> -1
dqcms430 comparesig -8 -70E-1 -> -1
dqcms440 comparesig -8.0 -9.0 -> 1
dqcms441 comparesig -8.0 -9 -> 1
dqcms442 comparesig -8 -9.0 -> 1
dqcms443 comparesig -8E+0 -9.0 -> 1
dqcms444 comparesig -80E-1 -9.0 -> 1
dqcms445 comparesig -.8E+1 -9 -> 1
dqcms446 comparesig -80E-1 -9 -> 1
dqcms447 comparesig -8.0 -9E+0 -> 1
dqcms448 comparesig -8.0 -90E-1 -> 1
dqcms449 comparesig -8 -.9E+1 -> 1
dqcms450 comparesig -8 -90E-1 -> 1
-- testcases that subtract to lots of zeros at boundaries [pgr]
dqcms473 comparesig 123.9999999999999999994560000000000E-89 123.999999999999999999456E-89 -> 0
dqcms474 comparesig 123.999999999999999999456000000000E+89 123.999999999999999999456E+89 -> 0
dqcms475 comparesig 123.99999999999999999945600000000E-89 123.999999999999999999456E-89 -> 0
dqcms476 comparesig 123.9999999999999999994560000000E+89 123.999999999999999999456E+89 -> 0
dqcms477 comparesig 123.999999999999999999456000000E-89 123.999999999999999999456E-89 -> 0
dqcms478 comparesig 123.99999999999999999945600000E+89 123.999999999999999999456E+89 -> 0
dqcms479 comparesig 123.9999999999999999994560000E-89 123.999999999999999999456E-89 -> 0
dqcms480 comparesig 123.999999999999999999456000E+89 123.999999999999999999456E+89 -> 0
dqcms481 comparesig 123.99999999999999999945600E-89 123.999999999999999999456E-89 -> 0
dqcms482 comparesig 123.9999999999999999994560E+89 123.999999999999999999456E+89 -> 0
dqcms483 comparesig 123.999999999999999999456E-89 123.999999999999999999456E-89 -> 0
dqcms487 comparesig 123.999999999999999999456E+89 123.9999999999999999994560000000000E+89 -> 0
dqcms488 comparesig 123.999999999999999999456E-89 123.999999999999999999456000000000E-89 -> 0
dqcms489 comparesig 123.999999999999999999456E+89 123.99999999999999999945600000000E+89 -> 0
dqcms490 comparesig 123.999999999999999999456E-89 123.9999999999999999994560000000E-89 -> 0
dqcms491 comparesig 123.999999999999999999456E+89 123.999999999999999999456000000E+89 -> 0
dqcms492 comparesig 123.999999999999999999456E-89 123.99999999999999999945600000E-89 -> 0
dqcms493 comparesig 123.999999999999999999456E+89 123.9999999999999999994560000E+89 -> 0
dqcms494 comparesig 123.999999999999999999456E-89 123.999999999999999999456000E-89 -> 0
dqcms495 comparesig 123.999999999999999999456E+89 123.99999999999999999945600E+89 -> 0
dqcms496 comparesig 123.999999999999999999456E-89 123.9999999999999999994560E-89 -> 0
dqcms497 comparesig 123.999999999999999999456E+89 123.999999999999999999456E+89 -> 0
-- wide-ranging, around precision; signs equal
dqcms500 comparesig 1 1E-15 -> 1
dqcms501 comparesig 1 1E-14 -> 1
dqcms502 comparesig 1 1E-13 -> 1
dqcms503 comparesig 1 1E-12 -> 1
dqcms504 comparesig 1 1E-11 -> 1
dqcms505 comparesig 1 1E-10 -> 1
dqcms506 comparesig 1 1E-9 -> 1
dqcms507 comparesig 1 1E-8 -> 1
dqcms508 comparesig 1 1E-7 -> 1
dqcms509 comparesig 1 1E-6 -> 1
dqcms510 comparesig 1 1E-5 -> 1
dqcms511 comparesig 1 1E-4 -> 1
dqcms512 comparesig 1 1E-3 -> 1
dqcms513 comparesig 1 1E-2 -> 1
dqcms514 comparesig 1 1E-1 -> 1
dqcms515 comparesig 1 1E-0 -> 0
dqcms516 comparesig 1 1E+1 -> -1
dqcms517 comparesig 1 1E+2 -> -1
dqcms518 comparesig 1 1E+3 -> -1
dqcms519 comparesig 1 1E+4 -> -1
dqcms521 comparesig 1 1E+5 -> -1
dqcms522 comparesig 1 1E+6 -> -1
dqcms523 comparesig 1 1E+7 -> -1
dqcms524 comparesig 1 1E+8 -> -1
dqcms525 comparesig 1 1E+9 -> -1
dqcms526 comparesig 1 1E+10 -> -1
dqcms527 comparesig 1 1E+11 -> -1
dqcms528 comparesig 1 1E+12 -> -1
dqcms529 comparesig 1 1E+13 -> -1
dqcms530 comparesig 1 1E+14 -> -1
dqcms531 comparesig 1 1E+15 -> -1
-- LR swap
dqcms540 comparesig 1E-15 1 -> -1
dqcms541 comparesig 1E-14 1 -> -1
dqcms542 comparesig 1E-13 1 -> -1
dqcms543 comparesig 1E-12 1 -> -1
dqcms544 comparesig 1E-11 1 -> -1
dqcms545 comparesig 1E-10 1 -> -1
dqcms546 comparesig 1E-9 1 -> -1
dqcms547 comparesig 1E-8 1 -> -1
dqcms548 comparesig 1E-7 1 -> -1
dqcms549 comparesig 1E-6 1 -> -1
dqcms550 comparesig 1E-5 1 -> -1
dqcms551 comparesig 1E-4 1 -> -1
dqcms552 comparesig 1E-3 1 -> -1
dqcms553 comparesig 1E-2 1 -> -1
dqcms554 comparesig 1E-1 1 -> -1
dqcms555 comparesig 1E-0 1 -> 0
dqcms556 comparesig 1E+1 1 -> 1
dqcms557 comparesig 1E+2 1 -> 1
dqcms558 comparesig 1E+3 1 -> 1
dqcms559 comparesig 1E+4 1 -> 1
dqcms561 comparesig 1E+5 1 -> 1
dqcms562 comparesig 1E+6 1 -> 1
dqcms563 comparesig 1E+7 1 -> 1
dqcms564 comparesig 1E+8 1 -> 1
dqcms565 comparesig 1E+9 1 -> 1
dqcms566 comparesig 1E+10 1 -> 1
dqcms567 comparesig 1E+11 1 -> 1
dqcms568 comparesig 1E+12 1 -> 1
dqcms569 comparesig 1E+13 1 -> 1
dqcms570 comparesig 1E+14 1 -> 1
dqcms571 comparesig 1E+15 1 -> 1
-- similar with a useful coefficient, one side only
dqcms580 comparesig 0.000000987654321 1E-15 -> 1
dqcms581 comparesig 0.000000987654321 1E-14 -> 1
dqcms582 comparesig 0.000000987654321 1E-13 -> 1
dqcms583 comparesig 0.000000987654321 1E-12 -> 1
dqcms584 comparesig 0.000000987654321 1E-11 -> 1
dqcms585 comparesig 0.000000987654321 1E-10 -> 1
dqcms586 comparesig 0.000000987654321 1E-9 -> 1
dqcms587 comparesig 0.000000987654321 1E-8 -> 1
dqcms588 comparesig 0.000000987654321 1E-7 -> 1
dqcms589 comparesig 0.000000987654321 1E-6 -> -1
dqcms590 comparesig 0.000000987654321 1E-5 -> -1
dqcms591 comparesig 0.000000987654321 1E-4 -> -1
dqcms592 comparesig 0.000000987654321 1E-3 -> -1
dqcms593 comparesig 0.000000987654321 1E-2 -> -1
dqcms594 comparesig 0.000000987654321 1E-1 -> -1
dqcms595 comparesig 0.000000987654321 1E-0 -> -1
dqcms596 comparesig 0.000000987654321 1E+1 -> -1
dqcms597 comparesig 0.000000987654321 1E+2 -> -1
dqcms598 comparesig 0.000000987654321 1E+3 -> -1
dqcms599 comparesig 0.000000987654321 1E+4 -> -1
-- check some unit-y traps
dqcms600 comparesig 12 12.2345 -> -1
dqcms601 comparesig 12.0 12.2345 -> -1
dqcms602 comparesig 12.00 12.2345 -> -1
dqcms603 comparesig 12.000 12.2345 -> -1
dqcms604 comparesig 12.0000 12.2345 -> -1
dqcms605 comparesig 12.00000 12.2345 -> -1
dqcms606 comparesig 12.000000 12.2345 -> -1
dqcms607 comparesig 12.0000000 12.2345 -> -1
dqcms608 comparesig 12.00000000 12.2345 -> -1
dqcms609 comparesig 12.000000000 12.2345 -> -1
dqcms610 comparesig 12.1234 12 -> 1
dqcms611 comparesig 12.1234 12.0 -> 1
dqcms612 comparesig 12.1234 12.00 -> 1
dqcms613 comparesig 12.1234 12.000 -> 1
dqcms614 comparesig 12.1234 12.0000 -> 1
dqcms615 comparesig 12.1234 12.00000 -> 1
dqcms616 comparesig 12.1234 12.000000 -> 1
dqcms617 comparesig 12.1234 12.0000000 -> 1
dqcms618 comparesig 12.1234 12.00000000 -> 1
dqcms619 comparesig 12.1234 12.000000000 -> 1
dqcms620 comparesig -12 -12.2345 -> 1
dqcms621 comparesig -12.0 -12.2345 -> 1
dqcms622 comparesig -12.00 -12.2345 -> 1
dqcms623 comparesig -12.000 -12.2345 -> 1
dqcms624 comparesig -12.0000 -12.2345 -> 1
dqcms625 comparesig -12.00000 -12.2345 -> 1
dqcms626 comparesig -12.000000 -12.2345 -> 1
dqcms627 comparesig -12.0000000 -12.2345 -> 1
dqcms628 comparesig -12.00000000 -12.2345 -> 1
dqcms629 comparesig -12.000000000 -12.2345 -> 1
dqcms630 comparesig -12.1234 -12 -> -1
dqcms631 comparesig -12.1234 -12.0 -> -1
dqcms632 comparesig -12.1234 -12.00 -> -1
dqcms633 comparesig -12.1234 -12.000 -> -1
dqcms634 comparesig -12.1234 -12.0000 -> -1
dqcms635 comparesig -12.1234 -12.00000 -> -1
dqcms636 comparesig -12.1234 -12.000000 -> -1
dqcms637 comparesig -12.1234 -12.0000000 -> -1
dqcms638 comparesig -12.1234 -12.00000000 -> -1
dqcms639 comparesig -12.1234 -12.000000000 -> -1
-- extended zeros
dqcms640 comparesig 0 0 -> 0
dqcms641 comparesig 0 -0 -> 0
dqcms642 comparesig 0 -0.0 -> 0
dqcms643 comparesig 0 0.0 -> 0
dqcms644 comparesig -0 0 -> 0
dqcms645 comparesig -0 -0 -> 0
dqcms646 comparesig -0 -0.0 -> 0
dqcms647 comparesig -0 0.0 -> 0
dqcms648 comparesig 0.0 0 -> 0
dqcms649 comparesig 0.0 -0 -> 0
dqcms650 comparesig 0.0 -0.0 -> 0
dqcms651 comparesig 0.0 0.0 -> 0
dqcms652 comparesig -0.0 0 -> 0
dqcms653 comparesig -0.0 -0 -> 0
dqcms654 comparesig -0.0 -0.0 -> 0
dqcms655 comparesig -0.0 0.0 -> 0
dqcms656 comparesig -0E1 0.0 -> 0
dqcms657 comparesig -0E2 0.0 -> 0
dqcms658 comparesig 0E1 0.0 -> 0
dqcms659 comparesig 0E2 0.0 -> 0
dqcms660 comparesig -0E1 0 -> 0
dqcms661 comparesig -0E2 0 -> 0
dqcms662 comparesig 0E1 0 -> 0
dqcms663 comparesig 0E2 0 -> 0
dqcms664 comparesig -0E1 -0E1 -> 0
dqcms665 comparesig -0E2 -0E1 -> 0
dqcms666 comparesig 0E1 -0E1 -> 0
dqcms667 comparesig 0E2 -0E1 -> 0
dqcms668 comparesig -0E1 -0E2 -> 0
dqcms669 comparesig -0E2 -0E2 -> 0
dqcms670 comparesig 0E1 -0E2 -> 0
dqcms671 comparesig 0E2 -0E2 -> 0
dqcms672 comparesig -0E1 0E1 -> 0
dqcms673 comparesig -0E2 0E1 -> 0
dqcms674 comparesig 0E1 0E1 -> 0
dqcms675 comparesig 0E2 0E1 -> 0
dqcms676 comparesig -0E1 0E2 -> 0
dqcms677 comparesig -0E2 0E2 -> 0
dqcms678 comparesig 0E1 0E2 -> 0
dqcms679 comparesig 0E2 0E2 -> 0
-- trailing zeros; unit-y
dqcms680 comparesig 12 12 -> 0
dqcms681 comparesig 12 12.0 -> 0
dqcms682 comparesig 12 12.00 -> 0
dqcms683 comparesig 12 12.000 -> 0
dqcms684 comparesig 12 12.0000 -> 0
dqcms685 comparesig 12 12.00000 -> 0
dqcms686 comparesig 12 12.000000 -> 0
dqcms687 comparesig 12 12.0000000 -> 0
dqcms688 comparesig 12 12.00000000 -> 0
dqcms689 comparesig 12 12.000000000 -> 0
dqcms690 comparesig 12 12 -> 0
dqcms691 comparesig 12.0 12 -> 0
dqcms692 comparesig 12.00 12 -> 0
dqcms693 comparesig 12.000 12 -> 0
dqcms694 comparesig 12.0000 12 -> 0
dqcms695 comparesig 12.00000 12 -> 0
dqcms696 comparesig 12.000000 12 -> 0
dqcms697 comparesig 12.0000000 12 -> 0
dqcms698 comparesig 12.00000000 12 -> 0
dqcms699 comparesig 12.000000000 12 -> 0
-- first, second, & last digit
dqcms700 comparesig 1234567899999999999999999990123456 1234567899999999999999999990123455 -> 1
dqcms701 comparesig 1234567899999999999999999990123456 1234567899999999999999999990123456 -> 0
dqcms702 comparesig 1234567899999999999999999990123456 1234567899999999999999999990123457 -> -1
dqcms703 comparesig 1234567899999999999999999990123456 0234567899999999999999999990123456 -> 1
dqcms704 comparesig 1234567899999999999999999990123456 1234567899999999999999999990123456 -> 0
dqcms705 comparesig 1234567899999999999999999990123456 2234567899999999999999999990123456 -> -1
dqcms706 comparesig 1134567899999999999999999990123456 1034567899999999999999999990123456 -> 1
dqcms707 comparesig 1134567899999999999999999990123456 1134567899999999999999999990123456 -> 0
dqcms708 comparesig 1134567899999999999999999990123456 1234567899999999999999999990123456 -> -1
-- miscellaneous
dqcms721 comparesig 12345678000 1 -> 1
dqcms722 comparesig 1 12345678000 -> -1
dqcms723 comparesig 1234567800 1 -> 1
dqcms724 comparesig 1 1234567800 -> -1
dqcms725 comparesig 1234567890 1 -> 1
dqcms726 comparesig 1 1234567890 -> -1
dqcms727 comparesig 1234567891 1 -> 1
dqcms728 comparesig 1 1234567891 -> -1
dqcms729 comparesig 12345678901 1 -> 1
dqcms730 comparesig 1 12345678901 -> -1
dqcms731 comparesig 1234567896 1 -> 1
dqcms732 comparesig 1 1234567896 -> -1
-- residue cases at lower precision
dqcms740 comparesig 1 0.9999999 -> 1
dqcms741 comparesig 1 0.999999 -> 1
dqcms742 comparesig 1 0.99999 -> 1
dqcms743 comparesig 1 1.0000 -> 0
dqcms744 comparesig 1 1.00001 -> -1
dqcms745 comparesig 1 1.000001 -> -1
dqcms746 comparesig 1 1.0000001 -> -1
dqcms750 comparesig 0.9999999 1 -> -1
dqcms751 comparesig 0.999999 1 -> -1
dqcms752 comparesig 0.99999 1 -> -1
dqcms753 comparesig 1.0000 1 -> 0
dqcms754 comparesig 1.00001 1 -> 1
dqcms755 comparesig 1.000001 1 -> 1
dqcms756 comparesig 1.0000001 1 -> 1
-- Specials
dqcms780 comparesig Inf -Inf -> 1
dqcms781 comparesig Inf -1000 -> 1
dqcms782 comparesig Inf -1 -> 1
dqcms783 comparesig Inf -0 -> 1
dqcms784 comparesig Inf 0 -> 1
dqcms785 comparesig Inf 1 -> 1
dqcms786 comparesig Inf 1000 -> 1
dqcms787 comparesig Inf Inf -> 0
dqcms788 comparesig -1000 Inf -> -1
dqcms789 comparesig -Inf Inf -> -1
dqcms790 comparesig -1 Inf -> -1
dqcms791 comparesig -0 Inf -> -1
dqcms792 comparesig 0 Inf -> -1
dqcms793 comparesig 1 Inf -> -1
dqcms794 comparesig 1000 Inf -> -1
dqcms795 comparesig Inf Inf -> 0
dqcms800 comparesig -Inf -Inf -> 0
dqcms801 comparesig -Inf -1000 -> -1
dqcms802 comparesig -Inf -1 -> -1
dqcms803 comparesig -Inf -0 -> -1
dqcms804 comparesig -Inf 0 -> -1
dqcms805 comparesig -Inf 1 -> -1
dqcms806 comparesig -Inf 1000 -> -1
dqcms807 comparesig -Inf Inf -> -1
dqcms808 comparesig -Inf -Inf -> 0
dqcms809 comparesig -1000 -Inf -> 1
dqcms810 comparesig -1 -Inf -> 1
dqcms811 comparesig -0 -Inf -> 1
dqcms812 comparesig 0 -Inf -> 1
dqcms813 comparesig 1 -Inf -> 1
dqcms814 comparesig 1000 -Inf -> 1
dqcms815 comparesig Inf -Inf -> 1
dqcms821 comparesig NaN -Inf -> NaN Invalid_operation
dqcms822 comparesig NaN -1000 -> NaN Invalid_operation
dqcms823 comparesig NaN -1 -> NaN Invalid_operation
dqcms824 comparesig NaN -0 -> NaN Invalid_operation
dqcms825 comparesig NaN 0 -> NaN Invalid_operation
dqcms826 comparesig NaN 1 -> NaN Invalid_operation
dqcms827 comparesig NaN 1000 -> NaN Invalid_operation
dqcms828 comparesig NaN Inf -> NaN Invalid_operation
dqcms829 comparesig NaN NaN -> NaN Invalid_operation
dqcms830 comparesig -Inf NaN -> NaN Invalid_operation
dqcms831 comparesig -1000 NaN -> NaN Invalid_operation
dqcms832 comparesig -1 NaN -> NaN Invalid_operation
dqcms833 comparesig -0 NaN -> NaN Invalid_operation
dqcms834 comparesig 0 NaN -> NaN Invalid_operation
dqcms835 comparesig 1 NaN -> NaN Invalid_operation
dqcms836 comparesig 1000 NaN -> NaN Invalid_operation
dqcms837 comparesig Inf NaN -> NaN Invalid_operation
dqcms838 comparesig -NaN -NaN -> -NaN Invalid_operation
dqcms839 comparesig +NaN -NaN -> NaN Invalid_operation
dqcms840 comparesig -NaN +NaN -> -NaN Invalid_operation
dqcms841 comparesig sNaN -Inf -> NaN Invalid_operation
dqcms842 comparesig sNaN -1000 -> NaN Invalid_operation
dqcms843 comparesig sNaN -1 -> NaN Invalid_operation
dqcms844 comparesig sNaN -0 -> NaN Invalid_operation
dqcms845 comparesig sNaN 0 -> NaN Invalid_operation
dqcms846 comparesig sNaN 1 -> NaN Invalid_operation
dqcms847 comparesig sNaN 1000 -> NaN Invalid_operation
dqcms848 comparesig sNaN NaN -> NaN Invalid_operation
dqcms849 comparesig sNaN sNaN -> NaN Invalid_operation
dqcms850 comparesig NaN sNaN -> NaN Invalid_operation
dqcms851 comparesig -Inf sNaN -> NaN Invalid_operation
dqcms852 comparesig -1000 sNaN -> NaN Invalid_operation
dqcms853 comparesig -1 sNaN -> NaN Invalid_operation
dqcms854 comparesig -0 sNaN -> NaN Invalid_operation
dqcms855 comparesig 0 sNaN -> NaN Invalid_operation
dqcms856 comparesig 1 sNaN -> NaN Invalid_operation
dqcms857 comparesig 1000 sNaN -> NaN Invalid_operation
dqcms858 comparesig Inf sNaN -> NaN Invalid_operation
dqcms859 comparesig NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqcms860 comparesig NaN9 -Inf -> NaN9 Invalid_operation
dqcms861 comparesig NaN8 999 -> NaN8 Invalid_operation
dqcms862 comparesig NaN77 Inf -> NaN77 Invalid_operation
dqcms863 comparesig -NaN67 NaN5 -> -NaN67 Invalid_operation
dqcms864 comparesig -Inf -NaN4 -> -NaN4 Invalid_operation
dqcms865 comparesig -999 -NaN33 -> -NaN33 Invalid_operation
dqcms866 comparesig Inf NaN2 -> NaN2 Invalid_operation
dqcms867 comparesig -NaN41 -NaN42 -> -NaN41 Invalid_operation
dqcms868 comparesig +NaN41 -NaN42 -> NaN41 Invalid_operation
dqcms869 comparesig -NaN41 +NaN42 -> -NaN41 Invalid_operation
dqcms870 comparesig +NaN41 +NaN42 -> NaN41 Invalid_operation
dqcms871 comparesig -sNaN99 -Inf -> -NaN99 Invalid_operation
dqcms872 comparesig sNaN98 -11 -> NaN98 Invalid_operation
dqcms873 comparesig sNaN97 NaN -> NaN97 Invalid_operation
dqcms874 comparesig sNaN16 sNaN94 -> NaN16 Invalid_operation
dqcms875 comparesig NaN85 sNaN83 -> NaN83 Invalid_operation
dqcms876 comparesig -Inf sNaN92 -> NaN92 Invalid_operation
dqcms877 comparesig 088 sNaN81 -> NaN81 Invalid_operation
dqcms878 comparesig Inf sNaN90 -> NaN90 Invalid_operation
dqcms879 comparesig NaN -sNaN89 -> -NaN89 Invalid_operation
-- wide range
dqcms880 comparesig +1.23456789012345E-0 9E+6144 -> -1
dqcms881 comparesig 9E+6144 +1.23456789012345E-0 -> 1
dqcms882 comparesig +0.100 9E-6143 -> 1
dqcms883 comparesig 9E-6143 +0.100 -> -1
dqcms885 comparesig -1.23456789012345E-0 9E+6144 -> -1
dqcms886 comparesig 9E+6144 -1.23456789012345E-0 -> 1
dqcms887 comparesig -0.100 9E-6143 -> -1
dqcms888 comparesig 9E-6143 -0.100 -> 1
-- signs
dqcms901 comparesig 1e+77 1e+11 -> 1
dqcms902 comparesig 1e+77 -1e+11 -> 1
dqcms903 comparesig -1e+77 1e+11 -> -1
dqcms904 comparesig -1e+77 -1e+11 -> -1
dqcms905 comparesig 1e-77 1e-11 -> -1
dqcms906 comparesig 1e-77 -1e-11 -> 1
dqcms907 comparesig -1e-77 1e-11 -> -1
dqcms908 comparesig -1e-77 -1e-11 -> 1
-- Null tests
dqcms990 comparesig 10 # -> NaN Invalid_operation
dqcms991 comparesig # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,706 @@
------------------------------------------------------------------------
-- dqCompareTotal.decTest -- decQuad comparison using total ordering --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Note that we cannot assume add/subtract tests cover paths adequately,
-- here, because the code might be quite different (comparison cannot
-- overflow or underflow, so actual subtractions are not necessary).
-- Similarly, comparetotal will have some radically different paths
-- than compare.
-- All operands and results are decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqcot001 comparetotal -2 -2 -> 0
dqcot002 comparetotal -2 -1 -> -1
dqcot003 comparetotal -2 0 -> -1
dqcot004 comparetotal -2 1 -> -1
dqcot005 comparetotal -2 2 -> -1
dqcot006 comparetotal -1 -2 -> 1
dqcot007 comparetotal -1 -1 -> 0
dqcot008 comparetotal -1 0 -> -1
dqcot009 comparetotal -1 1 -> -1
dqcot010 comparetotal -1 2 -> -1
dqcot011 comparetotal 0 -2 -> 1
dqcot012 comparetotal 0 -1 -> 1
dqcot013 comparetotal 0 0 -> 0
dqcot014 comparetotal 0 1 -> -1
dqcot015 comparetotal 0 2 -> -1
dqcot016 comparetotal 1 -2 -> 1
dqcot017 comparetotal 1 -1 -> 1
dqcot018 comparetotal 1 0 -> 1
dqcot019 comparetotal 1 1 -> 0
dqcot020 comparetotal 1 2 -> -1
dqcot021 comparetotal 2 -2 -> 1
dqcot022 comparetotal 2 -1 -> 1
dqcot023 comparetotal 2 0 -> 1
dqcot025 comparetotal 2 1 -> 1
dqcot026 comparetotal 2 2 -> 0
dqcot031 comparetotal -20 -20 -> 0
dqcot032 comparetotal -20 -10 -> -1
dqcot033 comparetotal -20 00 -> -1
dqcot034 comparetotal -20 10 -> -1
dqcot035 comparetotal -20 20 -> -1
dqcot036 comparetotal -10 -20 -> 1
dqcot037 comparetotal -10 -10 -> 0
dqcot038 comparetotal -10 00 -> -1
dqcot039 comparetotal -10 10 -> -1
dqcot040 comparetotal -10 20 -> -1
dqcot041 comparetotal 00 -20 -> 1
dqcot042 comparetotal 00 -10 -> 1
dqcot043 comparetotal 00 00 -> 0
dqcot044 comparetotal 00 10 -> -1
dqcot045 comparetotal 00 20 -> -1
dqcot046 comparetotal 10 -20 -> 1
dqcot047 comparetotal 10 -10 -> 1
dqcot048 comparetotal 10 00 -> 1
dqcot049 comparetotal 10 10 -> 0
dqcot050 comparetotal 10 20 -> -1
dqcot051 comparetotal 20 -20 -> 1
dqcot052 comparetotal 20 -10 -> 1
dqcot053 comparetotal 20 00 -> 1
dqcot055 comparetotal 20 10 -> 1
dqcot056 comparetotal 20 20 -> 0
dqcot061 comparetotal -2.0 -2.0 -> 0
dqcot062 comparetotal -2.0 -1.0 -> -1
dqcot063 comparetotal -2.0 0.0 -> -1
dqcot064 comparetotal -2.0 1.0 -> -1
dqcot065 comparetotal -2.0 2.0 -> -1
dqcot066 comparetotal -1.0 -2.0 -> 1
dqcot067 comparetotal -1.0 -1.0 -> 0
dqcot068 comparetotal -1.0 0.0 -> -1
dqcot069 comparetotal -1.0 1.0 -> -1
dqcot070 comparetotal -1.0 2.0 -> -1
dqcot071 comparetotal 0.0 -2.0 -> 1
dqcot072 comparetotal 0.0 -1.0 -> 1
dqcot073 comparetotal 0.0 0.0 -> 0
dqcot074 comparetotal 0.0 1.0 -> -1
dqcot075 comparetotal 0.0 2.0 -> -1
dqcot076 comparetotal 1.0 -2.0 -> 1
dqcot077 comparetotal 1.0 -1.0 -> 1
dqcot078 comparetotal 1.0 0.0 -> 1
dqcot079 comparetotal 1.0 1.0 -> 0
dqcot080 comparetotal 1.0 2.0 -> -1
dqcot081 comparetotal 2.0 -2.0 -> 1
dqcot082 comparetotal 2.0 -1.0 -> 1
dqcot083 comparetotal 2.0 0.0 -> 1
dqcot085 comparetotal 2.0 1.0 -> 1
dqcot086 comparetotal 2.0 2.0 -> 0
-- now some cases which might overflow if subtract were used
dqcot090 comparetotal 9.99999999999999999999999999999E+6144 9.99999999999999999999999999999E+6144 -> 0
dqcot091 comparetotal -9.99999999999999999999999999999E+6144 9.99999999999999999999999999999E+6144 -> -1
dqcot092 comparetotal 9.99999999999999999999999999999E+6144 -9.99999999999999999999999999999E+6144 -> 1
dqcot093 comparetotal -9.99999999999999999999999999999E+6144 -9.99999999999999999999999999999E+6144 -> 0
-- some differing length/exponent cases
-- in this first group, compare would compare all equal
dqcot100 comparetotal 7.0 7.0 -> 0
dqcot101 comparetotal 7.0 7 -> -1
dqcot102 comparetotal 7 7.0 -> 1
dqcot103 comparetotal 7E+0 7.0 -> 1
dqcot104 comparetotal 70E-1 7.0 -> 0
dqcot105 comparetotal 0.7E+1 7 -> 0
dqcot106 comparetotal 70E-1 7 -> -1
dqcot107 comparetotal 7.0 7E+0 -> -1
dqcot108 comparetotal 7.0 70E-1 -> 0
dqcot109 comparetotal 7 0.7E+1 -> 0
dqcot110 comparetotal 7 70E-1 -> 1
dqcot120 comparetotal 8.0 7.0 -> 1
dqcot121 comparetotal 8.0 7 -> 1
dqcot122 comparetotal 8 7.0 -> 1
dqcot123 comparetotal 8E+0 7.0 -> 1
dqcot124 comparetotal 80E-1 7.0 -> 1
dqcot125 comparetotal 0.8E+1 7 -> 1
dqcot126 comparetotal 80E-1 7 -> 1
dqcot127 comparetotal 8.0 7E+0 -> 1
dqcot128 comparetotal 8.0 70E-1 -> 1
dqcot129 comparetotal 8 0.7E+1 -> 1
dqcot130 comparetotal 8 70E-1 -> 1
dqcot140 comparetotal 8.0 9.0 -> -1
dqcot141 comparetotal 8.0 9 -> -1
dqcot142 comparetotal 8 9.0 -> -1
dqcot143 comparetotal 8E+0 9.0 -> -1
dqcot144 comparetotal 80E-1 9.0 -> -1
dqcot145 comparetotal 0.8E+1 9 -> -1
dqcot146 comparetotal 80E-1 9 -> -1
dqcot147 comparetotal 8.0 9E+0 -> -1
dqcot148 comparetotal 8.0 90E-1 -> -1
dqcot149 comparetotal 8 0.9E+1 -> -1
dqcot150 comparetotal 8 90E-1 -> -1
-- and again, with sign changes -+ ..
dqcot200 comparetotal -7.0 7.0 -> -1
dqcot201 comparetotal -7.0 7 -> -1
dqcot202 comparetotal -7 7.0 -> -1
dqcot203 comparetotal -7E+0 7.0 -> -1
dqcot204 comparetotal -70E-1 7.0 -> -1
dqcot205 comparetotal -0.7E+1 7 -> -1
dqcot206 comparetotal -70E-1 7 -> -1
dqcot207 comparetotal -7.0 7E+0 -> -1
dqcot208 comparetotal -7.0 70E-1 -> -1
dqcot209 comparetotal -7 0.7E+1 -> -1
dqcot210 comparetotal -7 70E-1 -> -1
dqcot220 comparetotal -8.0 7.0 -> -1
dqcot221 comparetotal -8.0 7 -> -1
dqcot222 comparetotal -8 7.0 -> -1
dqcot223 comparetotal -8E+0 7.0 -> -1
dqcot224 comparetotal -80E-1 7.0 -> -1
dqcot225 comparetotal -0.8E+1 7 -> -1
dqcot226 comparetotal -80E-1 7 -> -1
dqcot227 comparetotal -8.0 7E+0 -> -1
dqcot228 comparetotal -8.0 70E-1 -> -1
dqcot229 comparetotal -8 0.7E+1 -> -1
dqcot230 comparetotal -8 70E-1 -> -1
dqcot240 comparetotal -8.0 9.0 -> -1
dqcot241 comparetotal -8.0 9 -> -1
dqcot242 comparetotal -8 9.0 -> -1
dqcot243 comparetotal -8E+0 9.0 -> -1
dqcot244 comparetotal -80E-1 9.0 -> -1
dqcot245 comparetotal -0.8E+1 9 -> -1
dqcot246 comparetotal -80E-1 9 -> -1
dqcot247 comparetotal -8.0 9E+0 -> -1
dqcot248 comparetotal -8.0 90E-1 -> -1
dqcot249 comparetotal -8 0.9E+1 -> -1
dqcot250 comparetotal -8 90E-1 -> -1
-- and again, with sign changes +- ..
dqcot300 comparetotal 7.0 -7.0 -> 1
dqcot301 comparetotal 7.0 -7 -> 1
dqcot302 comparetotal 7 -7.0 -> 1
dqcot303 comparetotal 7E+0 -7.0 -> 1
dqcot304 comparetotal 70E-1 -7.0 -> 1
dqcot305 comparetotal .7E+1 -7 -> 1
dqcot306 comparetotal 70E-1 -7 -> 1
dqcot307 comparetotal 7.0 -7E+0 -> 1
dqcot308 comparetotal 7.0 -70E-1 -> 1
dqcot309 comparetotal 7 -.7E+1 -> 1
dqcot310 comparetotal 7 -70E-1 -> 1
dqcot320 comparetotal 8.0 -7.0 -> 1
dqcot321 comparetotal 8.0 -7 -> 1
dqcot322 comparetotal 8 -7.0 -> 1
dqcot323 comparetotal 8E+0 -7.0 -> 1
dqcot324 comparetotal 80E-1 -7.0 -> 1
dqcot325 comparetotal .8E+1 -7 -> 1
dqcot326 comparetotal 80E-1 -7 -> 1
dqcot327 comparetotal 8.0 -7E+0 -> 1
dqcot328 comparetotal 8.0 -70E-1 -> 1
dqcot329 comparetotal 8 -.7E+1 -> 1
dqcot330 comparetotal 8 -70E-1 -> 1
dqcot340 comparetotal 8.0 -9.0 -> 1
dqcot341 comparetotal 8.0 -9 -> 1
dqcot342 comparetotal 8 -9.0 -> 1
dqcot343 comparetotal 8E+0 -9.0 -> 1
dqcot344 comparetotal 80E-1 -9.0 -> 1
dqcot345 comparetotal .8E+1 -9 -> 1
dqcot346 comparetotal 80E-1 -9 -> 1
dqcot347 comparetotal 8.0 -9E+0 -> 1
dqcot348 comparetotal 8.0 -90E-1 -> 1
dqcot349 comparetotal 8 -.9E+1 -> 1
dqcot350 comparetotal 8 -90E-1 -> 1
-- and again, with sign changes -- ..
dqcot400 comparetotal -7.0 -7.0 -> 0
dqcot401 comparetotal -7.0 -7 -> 1
dqcot402 comparetotal -7 -7.0 -> -1
dqcot403 comparetotal -7E+0 -7.0 -> -1
dqcot404 comparetotal -70E-1 -7.0 -> 0
dqcot405 comparetotal -.7E+1 -7 -> 0
dqcot406 comparetotal -70E-1 -7 -> 1
dqcot407 comparetotal -7.0 -7E+0 -> 1
dqcot408 comparetotal -7.0 -70E-1 -> 0
dqcot409 comparetotal -7 -.7E+1 -> 0
dqcot410 comparetotal -7 -70E-1 -> -1
dqcot420 comparetotal -8.0 -7.0 -> -1
dqcot421 comparetotal -8.0 -7 -> -1
dqcot422 comparetotal -8 -7.0 -> -1
dqcot423 comparetotal -8E+0 -7.0 -> -1
dqcot424 comparetotal -80E-1 -7.0 -> -1
dqcot425 comparetotal -.8E+1 -7 -> -1
dqcot426 comparetotal -80E-1 -7 -> -1
dqcot427 comparetotal -8.0 -7E+0 -> -1
dqcot428 comparetotal -8.0 -70E-1 -> -1
dqcot429 comparetotal -8 -.7E+1 -> -1
dqcot430 comparetotal -8 -70E-1 -> -1
dqcot440 comparetotal -8.0 -9.0 -> 1
dqcot441 comparetotal -8.0 -9 -> 1
dqcot442 comparetotal -8 -9.0 -> 1
dqcot443 comparetotal -8E+0 -9.0 -> 1
dqcot444 comparetotal -80E-1 -9.0 -> 1
dqcot445 comparetotal -.8E+1 -9 -> 1
dqcot446 comparetotal -80E-1 -9 -> 1
dqcot447 comparetotal -8.0 -9E+0 -> 1
dqcot448 comparetotal -8.0 -90E-1 -> 1
dqcot449 comparetotal -8 -.9E+1 -> 1
dqcot450 comparetotal -8 -90E-1 -> 1
-- testcases that subtract to lots of zeros at boundaries [pgr]
dqcot473 comparetotal 123.4560000000000E-89 123.456E-89 -> -1
dqcot474 comparetotal 123.456000000000E+89 123.456E+89 -> -1
dqcot475 comparetotal 123.45600000000E-89 123.456E-89 -> -1
dqcot476 comparetotal 123.4560000000E+89 123.456E+89 -> -1
dqcot477 comparetotal 123.456000000E-89 123.456E-89 -> -1
dqcot478 comparetotal 123.45600000E+89 123.456E+89 -> -1
dqcot479 comparetotal 123.4560000E-89 123.456E-89 -> -1
dqcot480 comparetotal 123.456000E+89 123.456E+89 -> -1
dqcot481 comparetotal 123.45600E-89 123.456E-89 -> -1
dqcot482 comparetotal 123.4560E+89 123.456E+89 -> -1
dqcot483 comparetotal 123.456E-89 123.456E-89 -> 0
dqcot487 comparetotal 123.456E+89 123.4560000000000E+89 -> 1
dqcot488 comparetotal 123.456E-89 123.456000000000E-89 -> 1
dqcot489 comparetotal 123.456E+89 123.45600000000E+89 -> 1
dqcot490 comparetotal 123.456E-89 123.4560000000E-89 -> 1
dqcot491 comparetotal 123.456E+89 123.456000000E+89 -> 1
dqcot492 comparetotal 123.456E-89 123.45600000E-89 -> 1
dqcot493 comparetotal 123.456E+89 123.4560000E+89 -> 1
dqcot494 comparetotal 123.456E-89 123.456000E-89 -> 1
dqcot495 comparetotal 123.456E+89 123.45600E+89 -> 1
dqcot496 comparetotal 123.456E-89 123.4560E-89 -> 1
dqcot497 comparetotal 123.456E+89 123.456E+89 -> 0
-- wide-ranging, around precision; signs equal
dqcot498 comparetotal 1 1E-17 -> 1
dqcot499 comparetotal 1 1E-16 -> 1
dqcot500 comparetotal 1 1E-15 -> 1
dqcot501 comparetotal 1 1E-14 -> 1
dqcot502 comparetotal 1 1E-13 -> 1
dqcot503 comparetotal 1 1E-12 -> 1
dqcot504 comparetotal 1 1E-11 -> 1
dqcot505 comparetotal 1 1E-10 -> 1
dqcot506 comparetotal 1 1E-9 -> 1
dqcot507 comparetotal 1 1E-8 -> 1
dqcot508 comparetotal 1 1E-7 -> 1
dqcot509 comparetotal 1 1E-6 -> 1
dqcot510 comparetotal 1 1E-5 -> 1
dqcot511 comparetotal 1 1E-4 -> 1
dqcot512 comparetotal 1 1E-3 -> 1
dqcot513 comparetotal 1 1E-2 -> 1
dqcot514 comparetotal 1 1E-1 -> 1
dqcot515 comparetotal 1 1E-0 -> 0
dqcot516 comparetotal 1 1E+1 -> -1
dqcot517 comparetotal 1 1E+2 -> -1
dqcot518 comparetotal 1 1E+3 -> -1
dqcot519 comparetotal 1 1E+4 -> -1
dqcot521 comparetotal 1 1E+5 -> -1
dqcot522 comparetotal 1 1E+6 -> -1
dqcot523 comparetotal 1 1E+7 -> -1
dqcot524 comparetotal 1 1E+8 -> -1
dqcot525 comparetotal 1 1E+9 -> -1
dqcot526 comparetotal 1 1E+10 -> -1
dqcot527 comparetotal 1 1E+11 -> -1
dqcot528 comparetotal 1 1E+12 -> -1
dqcot529 comparetotal 1 1E+13 -> -1
dqcot530 comparetotal 1 1E+14 -> -1
dqcot531 comparetotal 1 1E+15 -> -1
dqcot532 comparetotal 1 1E+16 -> -1
dqcot533 comparetotal 1 1E+17 -> -1
-- LR swap
dqcot538 comparetotal 1E-17 1 -> -1
dqcot539 comparetotal 1E-16 1 -> -1
dqcot540 comparetotal 1E-15 1 -> -1
dqcot541 comparetotal 1E-14 1 -> -1
dqcot542 comparetotal 1E-13 1 -> -1
dqcot543 comparetotal 1E-12 1 -> -1
dqcot544 comparetotal 1E-11 1 -> -1
dqcot545 comparetotal 1E-10 1 -> -1
dqcot546 comparetotal 1E-9 1 -> -1
dqcot547 comparetotal 1E-8 1 -> -1
dqcot548 comparetotal 1E-7 1 -> -1
dqcot549 comparetotal 1E-6 1 -> -1
dqcot550 comparetotal 1E-5 1 -> -1
dqcot551 comparetotal 1E-4 1 -> -1
dqcot552 comparetotal 1E-3 1 -> -1
dqcot553 comparetotal 1E-2 1 -> -1
dqcot554 comparetotal 1E-1 1 -> -1
dqcot555 comparetotal 1E-0 1 -> 0
dqcot556 comparetotal 1E+1 1 -> 1
dqcot557 comparetotal 1E+2 1 -> 1
dqcot558 comparetotal 1E+3 1 -> 1
dqcot559 comparetotal 1E+4 1 -> 1
dqcot561 comparetotal 1E+5 1 -> 1
dqcot562 comparetotal 1E+6 1 -> 1
dqcot563 comparetotal 1E+7 1 -> 1
dqcot564 comparetotal 1E+8 1 -> 1
dqcot565 comparetotal 1E+9 1 -> 1
dqcot566 comparetotal 1E+10 1 -> 1
dqcot567 comparetotal 1E+11 1 -> 1
dqcot568 comparetotal 1E+12 1 -> 1
dqcot569 comparetotal 1E+13 1 -> 1
dqcot570 comparetotal 1E+14 1 -> 1
dqcot571 comparetotal 1E+15 1 -> 1
dqcot572 comparetotal 1E+16 1 -> 1
dqcot573 comparetotal 1E+17 1 -> 1
-- similar with a useful coefficient, one side only
dqcot578 comparetotal 0.000000987654321 1E-17 -> 1
dqcot579 comparetotal 0.000000987654321 1E-16 -> 1
dqcot580 comparetotal 0.000000987654321 1E-15 -> 1
dqcot581 comparetotal 0.000000987654321 1E-14 -> 1
dqcot582 comparetotal 0.000000987654321 1E-13 -> 1
dqcot583 comparetotal 0.000000987654321 1E-12 -> 1
dqcot584 comparetotal 0.000000987654321 1E-11 -> 1
dqcot585 comparetotal 0.000000987654321 1E-10 -> 1
dqcot586 comparetotal 0.000000987654321 1E-9 -> 1
dqcot587 comparetotal 0.000000987654321 1E-8 -> 1
dqcot588 comparetotal 0.000000987654321 1E-7 -> 1
dqcot589 comparetotal 0.000000987654321 1E-6 -> -1
dqcot590 comparetotal 0.000000987654321 1E-5 -> -1
dqcot591 comparetotal 0.000000987654321 1E-4 -> -1
dqcot592 comparetotal 0.000000987654321 1E-3 -> -1
dqcot593 comparetotal 0.000000987654321 1E-2 -> -1
dqcot594 comparetotal 0.000000987654321 1E-1 -> -1
dqcot595 comparetotal 0.000000987654321 1E-0 -> -1
dqcot596 comparetotal 0.000000987654321 1E+1 -> -1
dqcot597 comparetotal 0.000000987654321 1E+2 -> -1
dqcot598 comparetotal 0.000000987654321 1E+3 -> -1
dqcot599 comparetotal 0.000000987654321 1E+4 -> -1
-- check some unit-y traps
dqcot600 comparetotal 12 12.2345 -> -1
dqcot601 comparetotal 12.0 12.2345 -> -1
dqcot602 comparetotal 12.00 12.2345 -> -1
dqcot603 comparetotal 12.000 12.2345 -> -1
dqcot604 comparetotal 12.0000 12.2345 -> -1
dqcot605 comparetotal 12.00000 12.2345 -> -1
dqcot606 comparetotal 12.000000 12.2345 -> -1
dqcot607 comparetotal 12.0000000 12.2345 -> -1
dqcot608 comparetotal 12.00000000 12.2345 -> -1
dqcot609 comparetotal 12.000000000 12.2345 -> -1
dqcot610 comparetotal 12.1234 12 -> 1
dqcot611 comparetotal 12.1234 12.0 -> 1
dqcot612 comparetotal 12.1234 12.00 -> 1
dqcot613 comparetotal 12.1234 12.000 -> 1
dqcot614 comparetotal 12.1234 12.0000 -> 1
dqcot615 comparetotal 12.1234 12.00000 -> 1
dqcot616 comparetotal 12.1234 12.000000 -> 1
dqcot617 comparetotal 12.1234 12.0000000 -> 1
dqcot618 comparetotal 12.1234 12.00000000 -> 1
dqcot619 comparetotal 12.1234 12.000000000 -> 1
dqcot620 comparetotal -12 -12.2345 -> 1
dqcot621 comparetotal -12.0 -12.2345 -> 1
dqcot622 comparetotal -12.00 -12.2345 -> 1
dqcot623 comparetotal -12.000 -12.2345 -> 1
dqcot624 comparetotal -12.0000 -12.2345 -> 1
dqcot625 comparetotal -12.00000 -12.2345 -> 1
dqcot626 comparetotal -12.000000 -12.2345 -> 1
dqcot627 comparetotal -12.0000000 -12.2345 -> 1
dqcot628 comparetotal -12.00000000 -12.2345 -> 1
dqcot629 comparetotal -12.000000000 -12.2345 -> 1
dqcot630 comparetotal -12.1234 -12 -> -1
dqcot631 comparetotal -12.1234 -12.0 -> -1
dqcot632 comparetotal -12.1234 -12.00 -> -1
dqcot633 comparetotal -12.1234 -12.000 -> -1
dqcot634 comparetotal -12.1234 -12.0000 -> -1
dqcot635 comparetotal -12.1234 -12.00000 -> -1
dqcot636 comparetotal -12.1234 -12.000000 -> -1
dqcot637 comparetotal -12.1234 -12.0000000 -> -1
dqcot638 comparetotal -12.1234 -12.00000000 -> -1
dqcot639 comparetotal -12.1234 -12.000000000 -> -1
-- extended zeros
dqcot640 comparetotal 0 0 -> 0
dqcot641 comparetotal 0 -0 -> 1
dqcot642 comparetotal 0 -0.0 -> 1
dqcot643 comparetotal 0 0.0 -> 1
dqcot644 comparetotal -0 0 -> -1
dqcot645 comparetotal -0 -0 -> 0
dqcot646 comparetotal -0 -0.0 -> -1
dqcot647 comparetotal -0 0.0 -> -1
dqcot648 comparetotal 0.0 0 -> -1
dqcot649 comparetotal 0.0 -0 -> 1
dqcot650 comparetotal 0.0 -0.0 -> 1
dqcot651 comparetotal 0.0 0.0 -> 0
dqcot652 comparetotal -0.0 0 -> -1
dqcot653 comparetotal -0.0 -0 -> 1
dqcot654 comparetotal -0.0 -0.0 -> 0
dqcot655 comparetotal -0.0 0.0 -> -1
dqcot656 comparetotal -0E1 0.0 -> -1
dqcot657 comparetotal -0E2 0.0 -> -1
dqcot658 comparetotal 0E1 0.0 -> 1
dqcot659 comparetotal 0E2 0.0 -> 1
dqcot660 comparetotal -0E1 0 -> -1
dqcot661 comparetotal -0E2 0 -> -1
dqcot662 comparetotal 0E1 0 -> 1
dqcot663 comparetotal 0E2 0 -> 1
dqcot664 comparetotal -0E1 -0E1 -> 0
dqcot665 comparetotal -0E2 -0E1 -> -1
dqcot666 comparetotal 0E1 -0E1 -> 1
dqcot667 comparetotal 0E2 -0E1 -> 1
dqcot668 comparetotal -0E1 -0E2 -> 1
dqcot669 comparetotal -0E2 -0E2 -> 0
dqcot670 comparetotal 0E1 -0E2 -> 1
dqcot671 comparetotal 0E2 -0E2 -> 1
dqcot672 comparetotal -0E1 0E1 -> -1
dqcot673 comparetotal -0E2 0E1 -> -1
dqcot674 comparetotal 0E1 0E1 -> 0
dqcot675 comparetotal 0E2 0E1 -> 1
dqcot676 comparetotal -0E1 0E2 -> -1
dqcot677 comparetotal -0E2 0E2 -> -1
dqcot678 comparetotal 0E1 0E2 -> -1
dqcot679 comparetotal 0E2 0E2 -> 0
-- trailing zeros; unit-y
dqcot680 comparetotal 12 12 -> 0
dqcot681 comparetotal 12 12.0 -> 1
dqcot682 comparetotal 12 12.00 -> 1
dqcot683 comparetotal 12 12.000 -> 1
dqcot684 comparetotal 12 12.0000 -> 1
dqcot685 comparetotal 12 12.00000 -> 1
dqcot686 comparetotal 12 12.000000 -> 1
dqcot687 comparetotal 12 12.0000000 -> 1
dqcot688 comparetotal 12 12.00000000 -> 1
dqcot689 comparetotal 12 12.000000000 -> 1
dqcot690 comparetotal 12 12 -> 0
dqcot691 comparetotal 12.0 12 -> -1
dqcot692 comparetotal 12.00 12 -> -1
dqcot693 comparetotal 12.000 12 -> -1
dqcot694 comparetotal 12.0000 12 -> -1
dqcot695 comparetotal 12.00000 12 -> -1
dqcot696 comparetotal 12.000000 12 -> -1
dqcot697 comparetotal 12.0000000 12 -> -1
dqcot698 comparetotal 12.00000000 12 -> -1
dqcot699 comparetotal 12.000000000 12 -> -1
-- old long operand checks
dqcot701 comparetotal 12345678000 1 -> 1
dqcot702 comparetotal 1 12345678000 -> -1
dqcot703 comparetotal 1234567800 1 -> 1
dqcot704 comparetotal 1 1234567800 -> -1
dqcot705 comparetotal 1234567890 1 -> 1
dqcot706 comparetotal 1 1234567890 -> -1
dqcot707 comparetotal 1234567891 1 -> 1
dqcot708 comparetotal 1 1234567891 -> -1
dqcot709 comparetotal 12345678901 1 -> 1
dqcot710 comparetotal 1 12345678901 -> -1
dqcot711 comparetotal 1234567896 1 -> 1
dqcot712 comparetotal 1 1234567896 -> -1
dqcot713 comparetotal -1234567891 1 -> -1
dqcot714 comparetotal 1 -1234567891 -> 1
dqcot715 comparetotal -12345678901 1 -> -1
dqcot716 comparetotal 1 -12345678901 -> 1
dqcot717 comparetotal -1234567896 1 -> -1
dqcot718 comparetotal 1 -1234567896 -> 1
-- old residue cases
dqcot740 comparetotal 1 0.9999999 -> 1
dqcot741 comparetotal 1 0.999999 -> 1
dqcot742 comparetotal 1 0.99999 -> 1
dqcot743 comparetotal 1 1.0000 -> 1
dqcot744 comparetotal 1 1.00001 -> -1
dqcot745 comparetotal 1 1.000001 -> -1
dqcot746 comparetotal 1 1.0000001 -> -1
dqcot750 comparetotal 0.9999999 1 -> -1
dqcot751 comparetotal 0.999999 1 -> -1
dqcot752 comparetotal 0.99999 1 -> -1
dqcot753 comparetotal 1.0000 1 -> -1
dqcot754 comparetotal 1.00001 1 -> 1
dqcot755 comparetotal 1.000001 1 -> 1
dqcot756 comparetotal 1.0000001 1 -> 1
-- Specials
dqcot780 comparetotal Inf -Inf -> 1
dqcot781 comparetotal Inf -1000 -> 1
dqcot782 comparetotal Inf -1 -> 1
dqcot783 comparetotal Inf -0 -> 1
dqcot784 comparetotal Inf 0 -> 1
dqcot785 comparetotal Inf 1 -> 1
dqcot786 comparetotal Inf 1000 -> 1
dqcot787 comparetotal Inf Inf -> 0
dqcot788 comparetotal -1000 Inf -> -1
dqcot789 comparetotal -Inf Inf -> -1
dqcot790 comparetotal -1 Inf -> -1
dqcot791 comparetotal -0 Inf -> -1
dqcot792 comparetotal 0 Inf -> -1
dqcot793 comparetotal 1 Inf -> -1
dqcot794 comparetotal 1000 Inf -> -1
dqcot795 comparetotal Inf Inf -> 0
dqcot800 comparetotal -Inf -Inf -> 0
dqcot801 comparetotal -Inf -1000 -> -1
dqcot802 comparetotal -Inf -1 -> -1
dqcot803 comparetotal -Inf -0 -> -1
dqcot804 comparetotal -Inf 0 -> -1
dqcot805 comparetotal -Inf 1 -> -1
dqcot806 comparetotal -Inf 1000 -> -1
dqcot807 comparetotal -Inf Inf -> -1
dqcot808 comparetotal -Inf -Inf -> 0
dqcot809 comparetotal -1000 -Inf -> 1
dqcot810 comparetotal -1 -Inf -> 1
dqcot811 comparetotal -0 -Inf -> 1
dqcot812 comparetotal 0 -Inf -> 1
dqcot813 comparetotal 1 -Inf -> 1
dqcot814 comparetotal 1000 -Inf -> 1
dqcot815 comparetotal Inf -Inf -> 1
dqcot821 comparetotal NaN -Inf -> 1
dqcot822 comparetotal NaN -1000 -> 1
dqcot823 comparetotal NaN -1 -> 1
dqcot824 comparetotal NaN -0 -> 1
dqcot825 comparetotal NaN 0 -> 1
dqcot826 comparetotal NaN 1 -> 1
dqcot827 comparetotal NaN 1000 -> 1
dqcot828 comparetotal NaN Inf -> 1
dqcot829 comparetotal NaN NaN -> 0
dqcot830 comparetotal -Inf NaN -> -1
dqcot831 comparetotal -1000 NaN -> -1
dqcot832 comparetotal -1 NaN -> -1
dqcot833 comparetotal -0 NaN -> -1
dqcot834 comparetotal 0 NaN -> -1
dqcot835 comparetotal 1 NaN -> -1
dqcot836 comparetotal 1000 NaN -> -1
dqcot837 comparetotal Inf NaN -> -1
dqcot838 comparetotal -NaN -NaN -> 0
dqcot839 comparetotal +NaN -NaN -> 1
dqcot840 comparetotal -NaN +NaN -> -1
dqcot841 comparetotal sNaN -sNaN -> 1
dqcot842 comparetotal sNaN -NaN -> 1
dqcot843 comparetotal sNaN -Inf -> 1
dqcot844 comparetotal sNaN -1000 -> 1
dqcot845 comparetotal sNaN -1 -> 1
dqcot846 comparetotal sNaN -0 -> 1
dqcot847 comparetotal sNaN 0 -> 1
dqcot848 comparetotal sNaN 1 -> 1
dqcot849 comparetotal sNaN 1000 -> 1
dqcot850 comparetotal sNaN NaN -> -1
dqcot851 comparetotal sNaN sNaN -> 0
dqcot852 comparetotal -sNaN sNaN -> -1
dqcot853 comparetotal -NaN sNaN -> -1
dqcot854 comparetotal -Inf sNaN -> -1
dqcot855 comparetotal -1000 sNaN -> -1
dqcot856 comparetotal -1 sNaN -> -1
dqcot857 comparetotal -0 sNaN -> -1
dqcot858 comparetotal 0 sNaN -> -1
dqcot859 comparetotal 1 sNaN -> -1
dqcot860 comparetotal 1000 sNaN -> -1
dqcot861 comparetotal Inf sNaN -> -1
dqcot862 comparetotal NaN sNaN -> 1
dqcot863 comparetotal sNaN sNaN -> 0
dqcot871 comparetotal -sNaN -sNaN -> 0
dqcot872 comparetotal -sNaN -NaN -> 1
dqcot873 comparetotal -sNaN -Inf -> -1
dqcot874 comparetotal -sNaN -1000 -> -1
dqcot875 comparetotal -sNaN -1 -> -1
dqcot876 comparetotal -sNaN -0 -> -1
dqcot877 comparetotal -sNaN 0 -> -1
dqcot878 comparetotal -sNaN 1 -> -1
dqcot879 comparetotal -sNaN 1000 -> -1
dqcot880 comparetotal -sNaN NaN -> -1
dqcot881 comparetotal -sNaN sNaN -> -1
dqcot882 comparetotal -sNaN -sNaN -> 0
dqcot883 comparetotal -NaN -sNaN -> -1
dqcot884 comparetotal -Inf -sNaN -> 1
dqcot885 comparetotal -1000 -sNaN -> 1
dqcot886 comparetotal -1 -sNaN -> 1
dqcot887 comparetotal -0 -sNaN -> 1
dqcot888 comparetotal 0 -sNaN -> 1
dqcot889 comparetotal 1 -sNaN -> 1
dqcot890 comparetotal 1000 -sNaN -> 1
dqcot891 comparetotal Inf -sNaN -> 1
dqcot892 comparetotal NaN -sNaN -> 1
dqcot893 comparetotal sNaN -sNaN -> 1
-- NaNs with payload
dqcot960 comparetotal NaN9 -Inf -> 1
dqcot961 comparetotal NaN8 999 -> 1
dqcot962 comparetotal NaN77 Inf -> 1
dqcot963 comparetotal -NaN67 NaN5 -> -1
dqcot964 comparetotal -Inf -NaN4 -> 1
dqcot965 comparetotal -999 -NaN33 -> 1
dqcot966 comparetotal Inf NaN2 -> -1
dqcot970 comparetotal -NaN41 -NaN42 -> 1
dqcot971 comparetotal +NaN41 -NaN42 -> 1
dqcot972 comparetotal -NaN41 +NaN42 -> -1
dqcot973 comparetotal +NaN41 +NaN42 -> -1
dqcot974 comparetotal -NaN42 -NaN01 -> -1
dqcot975 comparetotal +NaN42 -NaN01 -> 1
dqcot976 comparetotal -NaN42 +NaN01 -> -1
dqcot977 comparetotal +NaN42 +NaN01 -> 1
dqcot980 comparetotal -sNaN771 -sNaN772 -> 1
dqcot981 comparetotal +sNaN771 -sNaN772 -> 1
dqcot982 comparetotal -sNaN771 +sNaN772 -> -1
dqcot983 comparetotal +sNaN771 +sNaN772 -> -1
dqcot984 comparetotal -sNaN772 -sNaN771 -> -1
dqcot985 comparetotal +sNaN772 -sNaN771 -> 1
dqcot986 comparetotal -sNaN772 +sNaN771 -> -1
dqcot987 comparetotal +sNaN772 +sNaN771 -> 1
dqcot991 comparetotal -sNaN99 -Inf -> -1
dqcot992 comparetotal sNaN98 -11 -> 1
dqcot993 comparetotal sNaN97 NaN -> -1
dqcot994 comparetotal sNaN16 sNaN94 -> -1
dqcot995 comparetotal NaN85 sNaN83 -> 1
dqcot996 comparetotal -Inf sNaN92 -> -1
dqcot997 comparetotal 088 sNaN81 -> -1
dqcot998 comparetotal Inf sNaN90 -> -1
dqcot999 comparetotal NaN -sNaN89 -> 1
-- spread zeros
dqcot1110 comparetotal 0E-6143 0 -> -1
dqcot1111 comparetotal 0E-6143 -0 -> 1
dqcot1112 comparetotal -0E-6143 0 -> -1
dqcot1113 comparetotal -0E-6143 -0 -> 1
dqcot1114 comparetotal 0E-6143 0E+6144 -> -1
dqcot1115 comparetotal 0E-6143 -0E+6144 -> 1
dqcot1116 comparetotal -0E-6143 0E+6144 -> -1
dqcot1117 comparetotal -0E-6143 -0E+6144 -> 1
dqcot1118 comparetotal 0 0E+6144 -> -1
dqcot1119 comparetotal 0 -0E+6144 -> 1
dqcot1120 comparetotal -0 0E+6144 -> -1
dqcot1121 comparetotal -0 -0E+6144 -> 1
dqcot1130 comparetotal 0E+6144 0 -> 1
dqcot1131 comparetotal 0E+6144 -0 -> 1
dqcot1132 comparetotal -0E+6144 0 -> -1
dqcot1133 comparetotal -0E+6144 -0 -> -1
dqcot1134 comparetotal 0E+6144 0E-6143 -> 1
dqcot1135 comparetotal 0E+6144 -0E-6143 -> 1
dqcot1136 comparetotal -0E+6144 0E-6143 -> -1
dqcot1137 comparetotal -0E+6144 -0E-6143 -> -1
dqcot1138 comparetotal 0 0E-6143 -> 1
dqcot1139 comparetotal 0 -0E-6143 -> 1
dqcot1140 comparetotal -0 0E-6143 -> -1
dqcot1141 comparetotal -0 -0E-6143 -> -1
-- Null tests
dqcot9990 comparetotal 10 # -> NaN Invalid_operation
dqcot9991 comparetotal # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,88 @@
------------------------------------------------------------------------
-- dqCopy.decTest -- quiet decQuad copy --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqcpy001 copy +7.50 -> 7.50
-- Infinities
dqcpy011 copy Infinity -> Infinity
dqcpy012 copy -Infinity -> -Infinity
-- NaNs, 0 payload
dqcpy021 copy NaN -> NaN
dqcpy022 copy -NaN -> -NaN
dqcpy023 copy sNaN -> sNaN
dqcpy024 copy -sNaN -> -sNaN
-- NaNs, non-0 payload
dqcpy031 copy NaN10 -> NaN10
dqcpy032 copy -NaN10 -> -NaN10
dqcpy033 copy sNaN10 -> sNaN10
dqcpy034 copy -sNaN10 -> -sNaN10
dqcpy035 copy NaN7 -> NaN7
dqcpy036 copy -NaN7 -> -NaN7
dqcpy037 copy sNaN101 -> sNaN101
dqcpy038 copy -sNaN101 -> -sNaN101
-- finites
dqcpy101 copy 7 -> 7
dqcpy102 copy -7 -> -7
dqcpy103 copy 75 -> 75
dqcpy104 copy -75 -> -75
dqcpy105 copy 7.50 -> 7.50
dqcpy106 copy -7.50 -> -7.50
dqcpy107 copy 7.500 -> 7.500
dqcpy108 copy -7.500 -> -7.500
-- zeros
dqcpy111 copy 0 -> 0
dqcpy112 copy -0 -> -0
dqcpy113 copy 0E+4 -> 0E+4
dqcpy114 copy -0E+4 -> -0E+4
dqcpy115 copy 0.0000 -> 0.0000
dqcpy116 copy -0.0000 -> -0.0000
dqcpy117 copy 0E-141 -> 0E-141
dqcpy118 copy -0E-141 -> -0E-141
-- full coefficients, alternating bits
dqcpy121 copy 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqcpy122 copy -2682682682682682682682682682682682 -> -2682682682682682682682682682682682
dqcpy123 copy 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
dqcpy124 copy -1341341341341341341341341341341341 -> -1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcpy131 copy 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqcpy132 copy 1E-6143 -> 1E-6143
dqcpy133 copy 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqcpy134 copy 1E-6176 -> 1E-6176
dqcpy135 copy -1E-6176 -> -1E-6176
dqcpy136 copy -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqcpy137 copy -1E-6143 -> -1E-6143
dqcpy138 copy -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144

View File

@@ -0,0 +1,88 @@
------------------------------------------------------------------------
-- dqCopyAbs.decTest -- quiet decQuad copy and set sign to zero --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqcpa001 copyabs +7.50 -> 7.50
-- Infinities
dqcpa011 copyabs Infinity -> Infinity
dqcpa012 copyabs -Infinity -> Infinity
-- NaNs, 0 payload
dqcpa021 copyabs NaN -> NaN
dqcpa022 copyabs -NaN -> NaN
dqcpa023 copyabs sNaN -> sNaN
dqcpa024 copyabs -sNaN -> sNaN
-- NaNs, non-0 payload
dqcpa031 copyabs NaN10 -> NaN10
dqcpa032 copyabs -NaN15 -> NaN15
dqcpa033 copyabs sNaN15 -> sNaN15
dqcpa034 copyabs -sNaN10 -> sNaN10
dqcpa035 copyabs NaN7 -> NaN7
dqcpa036 copyabs -NaN7 -> NaN7
dqcpa037 copyabs sNaN101 -> sNaN101
dqcpa038 copyabs -sNaN101 -> sNaN101
-- finites
dqcpa101 copyabs 7 -> 7
dqcpa102 copyabs -7 -> 7
dqcpa103 copyabs 75 -> 75
dqcpa104 copyabs -75 -> 75
dqcpa105 copyabs 7.10 -> 7.10
dqcpa106 copyabs -7.10 -> 7.10
dqcpa107 copyabs 7.500 -> 7.500
dqcpa108 copyabs -7.500 -> 7.500
-- zeros
dqcpa111 copyabs 0 -> 0
dqcpa112 copyabs -0 -> 0
dqcpa113 copyabs 0E+6 -> 0E+6
dqcpa114 copyabs -0E+6 -> 0E+6
dqcpa115 copyabs 0.0000 -> 0.0000
dqcpa116 copyabs -0.0000 -> 0.0000
dqcpa117 copyabs 0E-141 -> 0E-141
dqcpa118 copyabs -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqcpa121 copyabs 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqcpa122 copyabs -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqcpa123 copyabs 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
dqcpa124 copyabs -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcpa131 copyabs 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqcpa132 copyabs 1E-6143 -> 1E-6143
dqcpa133 copyabs 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqcpa134 copyabs 1E-6176 -> 1E-6176
dqcpa135 copyabs -1E-6176 -> 1E-6176
dqcpa136 copyabs -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqcpa137 copyabs -1E-6143 -> 1E-6143
dqcpa138 copyabs -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144

View File

@@ -0,0 +1,88 @@
------------------------------------------------------------------------
-- dqCopyNegate.decTest -- quiet decQuad copy and negate --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqcpn001 copynegate +7.50 -> -7.50
-- Infinities
dqcpn011 copynegate Infinity -> -Infinity
dqcpn012 copynegate -Infinity -> Infinity
-- NaNs, 0 payload
dqcpn021 copynegate NaN -> -NaN
dqcpn022 copynegate -NaN -> NaN
dqcpn023 copynegate sNaN -> -sNaN
dqcpn024 copynegate -sNaN -> sNaN
-- NaNs, non-0 payload
dqcpn031 copynegate NaN13 -> -NaN13
dqcpn032 copynegate -NaN13 -> NaN13
dqcpn033 copynegate sNaN13 -> -sNaN13
dqcpn034 copynegate -sNaN13 -> sNaN13
dqcpn035 copynegate NaN70 -> -NaN70
dqcpn036 copynegate -NaN70 -> NaN70
dqcpn037 copynegate sNaN101 -> -sNaN101
dqcpn038 copynegate -sNaN101 -> sNaN101
-- finites
dqcpn101 copynegate 7 -> -7
dqcpn102 copynegate -7 -> 7
dqcpn103 copynegate 75 -> -75
dqcpn104 copynegate -75 -> 75
dqcpn105 copynegate 7.50 -> -7.50
dqcpn106 copynegate -7.50 -> 7.50
dqcpn107 copynegate 7.500 -> -7.500
dqcpn108 copynegate -7.500 -> 7.500
-- zeros
dqcpn111 copynegate 0 -> -0
dqcpn112 copynegate -0 -> 0
dqcpn113 copynegate 0E+4 -> -0E+4
dqcpn114 copynegate -0E+4 -> 0E+4
dqcpn115 copynegate 0.0000 -> -0.0000
dqcpn116 copynegate -0.0000 -> 0.0000
dqcpn117 copynegate 0E-141 -> -0E-141
dqcpn118 copynegate -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqcpn121 copynegate 2682682682682682682682682682682682 -> -2682682682682682682682682682682682
dqcpn122 copynegate -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqcpn123 copynegate 1341341341341341341341341341341341 -> -1341341341341341341341341341341341
dqcpn124 copynegate -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcpn131 copynegate 9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
dqcpn132 copynegate 1E-6143 -> -1E-6143
dqcpn133 copynegate 1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqcpn134 copynegate 1E-6176 -> -1E-6176
dqcpn135 copynegate -1E-6176 -> 1E-6176
dqcpn136 copynegate -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqcpn137 copynegate -1E-6143 -> 1E-6143
dqcpn138 copynegate -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144

View File

@@ -0,0 +1,175 @@
------------------------------------------------------------------------
-- dqCopySign.decTest -- quiet decQuad copy with sign from rhs --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqcps001 copysign +7.50 11 -> 7.50
-- Infinities
dqcps011 copysign Infinity 11 -> Infinity
dqcps012 copysign -Infinity 11 -> Infinity
-- NaNs, 0 payload
dqcps021 copysign NaN 11 -> NaN
dqcps022 copysign -NaN 11 -> NaN
dqcps023 copysign sNaN 11 -> sNaN
dqcps024 copysign -sNaN 11 -> sNaN
-- NaNs, non-0 payload
dqcps031 copysign NaN10 11 -> NaN10
dqcps032 copysign -NaN10 11 -> NaN10
dqcps033 copysign sNaN10 11 -> sNaN10
dqcps034 copysign -sNaN10 11 -> sNaN10
dqcps035 copysign NaN7 11 -> NaN7
dqcps036 copysign -NaN7 11 -> NaN7
dqcps037 copysign sNaN101 11 -> sNaN101
dqcps038 copysign -sNaN101 11 -> sNaN101
-- finites
dqcps101 copysign 7 11 -> 7
dqcps102 copysign -7 11 -> 7
dqcps103 copysign 75 11 -> 75
dqcps104 copysign -75 11 -> 75
dqcps105 copysign 7.50 11 -> 7.50
dqcps106 copysign -7.50 11 -> 7.50
dqcps107 copysign 7.500 11 -> 7.500
dqcps108 copysign -7.500 11 -> 7.500
-- zeros
dqcps111 copysign 0 11 -> 0
dqcps112 copysign -0 11 -> 0
dqcps113 copysign 0E+4 11 -> 0E+4
dqcps114 copysign -0E+4 11 -> 0E+4
dqcps115 copysign 0.0000 11 -> 0.0000
dqcps116 copysign -0.0000 11 -> 0.0000
dqcps117 copysign 0E-141 11 -> 0E-141
dqcps118 copysign -0E-141 11 -> 0E-141
-- full coefficients, alternating bits
dqcps121 copysign 2682682682682682682682682682682682 8 -> 2682682682682682682682682682682682
dqcps122 copysign -2682682682682682682682682682682682 8 -> 2682682682682682682682682682682682
dqcps123 copysign 1341341341341341341341341341341341 8 -> 1341341341341341341341341341341341
dqcps124 copysign -1341341341341341341341341341341341 8 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcps131 copysign 9.999999999999999999999999999999999E+6144 8 -> 9.999999999999999999999999999999999E+6144
dqcps132 copysign 1E-6143 8 -> 1E-6143
dqcps133 copysign 1.000000000000000000000000000000000E-6143 8 -> 1.000000000000000000000000000000000E-6143
dqcps134 copysign 1E-6176 8 -> 1E-6176
dqcps135 copysign -1E-6176 8 -> 1E-6176
dqcps136 copysign -1.000000000000000000000000000000000E-6143 8 -> 1.000000000000000000000000000000000E-6143
dqcps137 copysign -1E-6143 8 -> 1E-6143
dqcps138 copysign -9.999999999999999999999999999999999E+6144 8 -> 9.999999999999999999999999999999999E+6144
-- repeat with negative RHS
-- Infinities
dqcps211 copysign Infinity -34 -> -Infinity
dqcps212 copysign -Infinity -34 -> -Infinity
-- NaNs, 0 payload
dqcps221 copysign NaN -34 -> -NaN
dqcps222 copysign -NaN -34 -> -NaN
dqcps223 copysign sNaN -34 -> -sNaN
dqcps224 copysign -sNaN -34 -> -sNaN
-- NaNs, non-0 payload
dqcps231 copysign NaN10 -34 -> -NaN10
dqcps232 copysign -NaN10 -34 -> -NaN10
dqcps233 copysign sNaN10 -34 -> -sNaN10
dqcps234 copysign -sNaN10 -34 -> -sNaN10
dqcps235 copysign NaN7 -34 -> -NaN7
dqcps236 copysign -NaN7 -34 -> -NaN7
dqcps237 copysign sNaN101 -34 -> -sNaN101
dqcps238 copysign -sNaN101 -34 -> -sNaN101
-- finites
dqcps301 copysign 7 -34 -> -7
dqcps302 copysign -7 -34 -> -7
dqcps303 copysign 75 -34 -> -75
dqcps304 copysign -75 -34 -> -75
dqcps305 copysign 7.50 -34 -> -7.50
dqcps306 copysign -7.50 -34 -> -7.50
dqcps307 copysign 7.500 -34 -> -7.500
dqcps308 copysign -7.500 -34 -> -7.500
-- zeros
dqcps311 copysign 0 -34 -> -0
dqcps312 copysign -0 -34 -> -0
dqcps313 copysign 0E+4 -34 -> -0E+4
dqcps314 copysign -0E+4 -34 -> -0E+4
dqcps315 copysign 0.0000 -34 -> -0.0000
dqcps316 copysign -0.0000 -34 -> -0.0000
dqcps317 copysign 0E-141 -34 -> -0E-141
dqcps318 copysign -0E-141 -34 -> -0E-141
-- full coefficients, alternating bits
dqcps321 copysign 2682682682682682682682682682682682 -9 -> -2682682682682682682682682682682682
dqcps322 copysign -2682682682682682682682682682682682 -9 -> -2682682682682682682682682682682682
dqcps323 copysign 1341341341341341341341341341341341 -9 -> -1341341341341341341341341341341341
dqcps324 copysign -1341341341341341341341341341341341 -9 -> -1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcps331 copysign 9.999999999999999999999999999999999E+6144 -1 -> -9.999999999999999999999999999999999E+6144
dqcps332 copysign 1E-6143 -1 -> -1E-6143
dqcps333 copysign 1.000000000000000000000000000000000E-6143 -1 -> -1.000000000000000000000000000000000E-6143
dqcps334 copysign 1E-6176 -1 -> -1E-6176
dqcps335 copysign -1E-6176 -3 -> -1E-6176
dqcps336 copysign -1.000000000000000000000000000000000E-6143 -3 -> -1.000000000000000000000000000000000E-6143
dqcps337 copysign -1E-6143 -3 -> -1E-6143
dqcps338 copysign -9.999999999999999999999999999999999E+6144 -3 -> -9.999999999999999999999999999999999E+6144
-- Other kinds of RHS
dqcps401 copysign 701 -34 -> -701
dqcps402 copysign -720 -34 -> -720
dqcps403 copysign 701 -0 -> -701
dqcps404 copysign -720 -0 -> -720
dqcps405 copysign 701 +0 -> 701
dqcps406 copysign -720 +0 -> 720
dqcps407 copysign 701 +34 -> 701
dqcps408 copysign -720 +34 -> 720
dqcps413 copysign 701 -Inf -> -701
dqcps414 copysign -720 -Inf -> -720
dqcps415 copysign 701 +Inf -> 701
dqcps416 copysign -720 +Inf -> 720
dqcps420 copysign 701 -NaN -> -701
dqcps421 copysign -720 -NaN -> -720
dqcps422 copysign 701 +NaN -> 701
dqcps423 copysign -720 +NaN -> 720
dqcps425 copysign -720 +NaN8 -> 720
dqcps426 copysign 701 -sNaN -> -701
dqcps427 copysign -720 -sNaN -> -720
dqcps428 copysign 701 +sNaN -> 701
dqcps429 copysign -720 +sNaN -> 720
dqcps430 copysign -720 +sNaN3 -> 720

View File

@@ -0,0 +1,808 @@
------------------------------------------------------------------------
-- dqDivide.decTest -- decQuad division --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqdiv001 divide 1 1 -> 1
dqdiv002 divide 2 1 -> 2
dqdiv003 divide 1 2 -> 0.5
dqdiv004 divide 2 2 -> 1
dqdiv005 divide 0 1 -> 0
dqdiv006 divide 0 2 -> 0
dqdiv007 divide 1 3 -> 0.3333333333333333333333333333333333 Inexact Rounded
dqdiv008 divide 2 3 -> 0.6666666666666666666666666666666667 Inexact Rounded
dqdiv009 divide 3 3 -> 1
dqdiv010 divide 2.4 1 -> 2.4
dqdiv011 divide 2.4 -1 -> -2.4
dqdiv012 divide -2.4 1 -> -2.4
dqdiv013 divide -2.4 -1 -> 2.4
dqdiv014 divide 2.40 1 -> 2.40
dqdiv015 divide 2.400 1 -> 2.400
dqdiv016 divide 2.4 2 -> 1.2
dqdiv017 divide 2.400 2 -> 1.200
dqdiv018 divide 2. 2 -> 1
dqdiv019 divide 20 20 -> 1
dqdiv020 divide 187 187 -> 1
dqdiv021 divide 5 2 -> 2.5
dqdiv022 divide 50 20 -> 2.5
dqdiv023 divide 500 200 -> 2.5
dqdiv024 divide 50.0 20.0 -> 2.5
dqdiv025 divide 5.00 2.00 -> 2.5
dqdiv026 divide 5 2.0 -> 2.5
dqdiv027 divide 5 2.000 -> 2.5
dqdiv028 divide 5 0.20 -> 25
dqdiv029 divide 5 0.200 -> 25
dqdiv030 divide 10 1 -> 10
dqdiv031 divide 100 1 -> 100
dqdiv032 divide 1000 1 -> 1000
dqdiv033 divide 1000 100 -> 10
dqdiv035 divide 1 2 -> 0.5
dqdiv036 divide 1 4 -> 0.25
dqdiv037 divide 1 8 -> 0.125
dqdiv038 divide 1 16 -> 0.0625
dqdiv039 divide 1 32 -> 0.03125
dqdiv040 divide 1 64 -> 0.015625
dqdiv041 divide 1 -2 -> -0.5
dqdiv042 divide 1 -4 -> -0.25
dqdiv043 divide 1 -8 -> -0.125
dqdiv044 divide 1 -16 -> -0.0625
dqdiv045 divide 1 -32 -> -0.03125
dqdiv046 divide 1 -64 -> -0.015625
dqdiv047 divide -1 2 -> -0.5
dqdiv048 divide -1 4 -> -0.25
dqdiv049 divide -1 8 -> -0.125
dqdiv050 divide -1 16 -> -0.0625
dqdiv051 divide -1 32 -> -0.03125
dqdiv052 divide -1 64 -> -0.015625
dqdiv053 divide -1 -2 -> 0.5
dqdiv054 divide -1 -4 -> 0.25
dqdiv055 divide -1 -8 -> 0.125
dqdiv056 divide -1 -16 -> 0.0625
dqdiv057 divide -1 -32 -> 0.03125
dqdiv058 divide -1 -64 -> 0.015625
-- bcdTime
dqdiv060 divide 1 7 -> 0.1428571428571428571428571428571429 Inexact Rounded
dqdiv061 divide 1.2345678 1.9876543 -> 0.6211179680490717123193907511985359 Inexact Rounded
-- 1234567890123456
dqdiv067 divide 9999999999999999999999999999999999 1 -> 9999999999999999999999999999999999
dqdiv068 divide 999999999999999999999999999999999 1 -> 999999999999999999999999999999999
dqdiv069 divide 99999999999999999999999999999999 1 -> 99999999999999999999999999999999
dqdiv070 divide 99999999999999999 1 -> 99999999999999999
dqdiv071 divide 9999999999999999 1 -> 9999999999999999
dqdiv072 divide 999999999999999 1 -> 999999999999999
dqdiv073 divide 99999999999999 1 -> 99999999999999
dqdiv074 divide 9999999999999 1 -> 9999999999999
dqdiv075 divide 999999999999 1 -> 999999999999
dqdiv076 divide 99999999999 1 -> 99999999999
dqdiv077 divide 9999999999 1 -> 9999999999
dqdiv078 divide 999999999 1 -> 999999999
dqdiv079 divide 99999999 1 -> 99999999
dqdiv080 divide 9999999 1 -> 9999999
dqdiv081 divide 999999 1 -> 999999
dqdiv082 divide 99999 1 -> 99999
dqdiv083 divide 9999 1 -> 9999
dqdiv084 divide 999 1 -> 999
dqdiv085 divide 99 1 -> 99
dqdiv086 divide 9 1 -> 9
dqdiv090 divide 0. 1 -> 0
dqdiv091 divide .0 1 -> 0.0
dqdiv092 divide 0.00 1 -> 0.00
dqdiv093 divide 0.00E+9 1 -> 0E+7
dqdiv094 divide 0.0000E-50 1 -> 0E-54
dqdiv095 divide 1 1E-8 -> 1E+8
dqdiv096 divide 1 1E-9 -> 1E+9
dqdiv097 divide 1 1E-10 -> 1E+10
dqdiv098 divide 1 1E-11 -> 1E+11
dqdiv099 divide 1 1E-12 -> 1E+12
dqdiv100 divide 1 1 -> 1
dqdiv101 divide 1 2 -> 0.5
dqdiv102 divide 1 3 -> 0.3333333333333333333333333333333333 Inexact Rounded
dqdiv103 divide 1 4 -> 0.25
dqdiv104 divide 1 5 -> 0.2
dqdiv105 divide 1 6 -> 0.1666666666666666666666666666666667 Inexact Rounded
dqdiv106 divide 1 7 -> 0.1428571428571428571428571428571429 Inexact Rounded
dqdiv107 divide 1 8 -> 0.125
dqdiv108 divide 1 9 -> 0.1111111111111111111111111111111111 Inexact Rounded
dqdiv109 divide 1 10 -> 0.1
dqdiv110 divide 1 1 -> 1
dqdiv111 divide 2 1 -> 2
dqdiv112 divide 3 1 -> 3
dqdiv113 divide 4 1 -> 4
dqdiv114 divide 5 1 -> 5
dqdiv115 divide 6 1 -> 6
dqdiv116 divide 7 1 -> 7
dqdiv117 divide 8 1 -> 8
dqdiv118 divide 9 1 -> 9
dqdiv119 divide 10 1 -> 10
dqdiv120 divide 3E+1 0.001 -> 3E+4
dqdiv121 divide 2.200 2 -> 1.100
dqdiv130 divide 12345 4.999 -> 2469.493898779755951190238047609522 Inexact Rounded
dqdiv131 divide 12345 4.99 -> 2473.947895791583166332665330661323 Inexact Rounded
dqdiv132 divide 12345 4.9 -> 2519.387755102040816326530612244898 Inexact Rounded
dqdiv133 divide 12345 5 -> 2469
dqdiv134 divide 12345 5.1 -> 2420.588235294117647058823529411765 Inexact Rounded
dqdiv135 divide 12345 5.01 -> 2464.071856287425149700598802395210 Inexact Rounded
dqdiv136 divide 12345 5.001 -> 2468.506298740251949610077984403119 Inexact Rounded
-- test possibly imprecise results
dqdiv220 divide 391 597 -> 0.6549413735343383584589614740368509 Inexact Rounded
dqdiv221 divide 391 -597 -> -0.6549413735343383584589614740368509 Inexact Rounded
dqdiv222 divide -391 597 -> -0.6549413735343383584589614740368509 Inexact Rounded
dqdiv223 divide -391 -597 -> 0.6549413735343383584589614740368509 Inexact Rounded
-- test some cases that are close to exponent overflow
dqdiv270 divide 1 1e6144 -> 1E-6144 Subnormal
dqdiv271 divide 1 0.9e6144 -> 1.11111111111111111111111111111111E-6144 Rounded Inexact Subnormal Underflow
dqdiv272 divide 1 0.99e6144 -> 1.01010101010101010101010101010101E-6144 Rounded Inexact Subnormal Underflow
dqdiv273 divide 1 0.9999999999999999e6144 -> 1.00000000000000010000000000000001E-6144 Rounded Inexact Subnormal Underflow
dqdiv274 divide 9e6144 1 -> 9.000000000000000000000000000000000E+6144 Clamped
dqdiv275 divide 9.9e6144 1 -> 9.900000000000000000000000000000000E+6144 Clamped
dqdiv276 divide 9.99e6144 1 -> 9.990000000000000000000000000000000E+6144 Clamped
dqdiv277 divide 9.999999999999999e6144 1 -> 9.999999999999999000000000000000000E+6144 Clamped
dqdiv278 divide 1 0.9999999999999999999999999999999999e6144 -> 1.00000000000000000000000000000000E-6144 Rounded Inexact Subnormal Underflow
dqdiv279 divide 9.999999999999999999999999999999999e6144 1 -> 9.999999999999999999999999999999999E+6144
-- Divide into 0 tests
dqdiv301 divide 0 7 -> 0
dqdiv302 divide 0 7E-5 -> 0E+5
dqdiv303 divide 0 7E-1 -> 0E+1
dqdiv304 divide 0 7E+1 -> 0.0
dqdiv305 divide 0 7E+5 -> 0.00000
dqdiv306 divide 0 7E+6 -> 0.000000
dqdiv307 divide 0 7E+7 -> 0E-7
dqdiv308 divide 0 70E-5 -> 0E+5
dqdiv309 divide 0 70E-1 -> 0E+1
dqdiv310 divide 0 70E+0 -> 0
dqdiv311 divide 0 70E+1 -> 0.0
dqdiv312 divide 0 70E+5 -> 0.00000
dqdiv313 divide 0 70E+6 -> 0.000000
dqdiv314 divide 0 70E+7 -> 0E-7
dqdiv315 divide 0 700E-5 -> 0E+5
dqdiv316 divide 0 700E-1 -> 0E+1
dqdiv317 divide 0 700E+0 -> 0
dqdiv318 divide 0 700E+1 -> 0.0
dqdiv319 divide 0 700E+5 -> 0.00000
dqdiv320 divide 0 700E+6 -> 0.000000
dqdiv321 divide 0 700E+7 -> 0E-7
dqdiv322 divide 0 700E+77 -> 0E-77
dqdiv331 divide 0E-3 7E-5 -> 0E+2
dqdiv332 divide 0E-3 7E-1 -> 0.00
dqdiv333 divide 0E-3 7E+1 -> 0.0000
dqdiv334 divide 0E-3 7E+5 -> 0E-8
dqdiv335 divide 0E-1 7E-5 -> 0E+4
dqdiv336 divide 0E-1 7E-1 -> 0
dqdiv337 divide 0E-1 7E+1 -> 0.00
dqdiv338 divide 0E-1 7E+5 -> 0.000000
dqdiv339 divide 0E+1 7E-5 -> 0E+6
dqdiv340 divide 0E+1 7E-1 -> 0E+2
dqdiv341 divide 0E+1 7E+1 -> 0
dqdiv342 divide 0E+1 7E+5 -> 0.0000
dqdiv343 divide 0E+3 7E-5 -> 0E+8
dqdiv344 divide 0E+3 7E-1 -> 0E+4
dqdiv345 divide 0E+3 7E+1 -> 0E+2
dqdiv346 divide 0E+3 7E+5 -> 0.00
-- These were 'input rounding'
dqdiv441 divide 12345678000 1 -> 12345678000
dqdiv442 divide 1 12345678000 -> 8.100000664200054464404466081166219E-11 Inexact Rounded
dqdiv443 divide 1234567800 1 -> 1234567800
dqdiv444 divide 1 1234567800 -> 8.100000664200054464404466081166219E-10 Inexact Rounded
dqdiv445 divide 1234567890 1 -> 1234567890
dqdiv446 divide 1 1234567890 -> 8.100000073710000670761006103925156E-10 Inexact Rounded
dqdiv447 divide 1234567891 1 -> 1234567891
dqdiv448 divide 1 1234567891 -> 8.100000067149000556665214614754629E-10 Inexact Rounded
dqdiv449 divide 12345678901 1 -> 12345678901
dqdiv450 divide 1 12345678901 -> 8.100000073053900658873130042376760E-11 Inexact Rounded
dqdiv451 divide 1234567896 1 -> 1234567896
dqdiv452 divide 1 1234567896 -> 8.100000034344000145618560617422697E-10 Inexact Rounded
-- high-lows
dqdiv453 divide 1e+1 1 -> 1E+1
dqdiv454 divide 1e+1 1.0 -> 1E+1
dqdiv455 divide 1e+1 1.00 -> 1E+1
dqdiv456 divide 1e+2 2 -> 5E+1
dqdiv457 divide 1e+2 2.0 -> 5E+1
dqdiv458 divide 1e+2 2.00 -> 5E+1
-- some from IEEE discussions
dqdiv460 divide 3e0 2e0 -> 1.5
dqdiv461 divide 30e-1 2e0 -> 1.5
dqdiv462 divide 300e-2 2e0 -> 1.50
dqdiv464 divide 3000e-3 2e0 -> 1.500
dqdiv465 divide 3e0 20e-1 -> 1.5
dqdiv466 divide 30e-1 20e-1 -> 1.5
dqdiv467 divide 300e-2 20e-1 -> 1.5
dqdiv468 divide 3000e-3 20e-1 -> 1.50
dqdiv469 divide 3e0 200e-2 -> 1.5
dqdiv470 divide 30e-1 200e-2 -> 1.5
dqdiv471 divide 300e-2 200e-2 -> 1.5
dqdiv472 divide 3000e-3 200e-2 -> 1.5
dqdiv473 divide 3e0 2000e-3 -> 1.5
dqdiv474 divide 30e-1 2000e-3 -> 1.5
dqdiv475 divide 300e-2 2000e-3 -> 1.5
dqdiv476 divide 3000e-3 2000e-3 -> 1.5
-- some reciprocals
dqdiv480 divide 1 1.0E+33 -> 1E-33
dqdiv481 divide 1 10E+33 -> 1E-34
dqdiv482 divide 1 1.0E-33 -> 1E+33
dqdiv483 divide 1 10E-33 -> 1E+32
-- RMS discussion table
dqdiv484 divide 0e5 1e3 -> 0E+2
dqdiv485 divide 0e5 2e3 -> 0E+2
dqdiv486 divide 0e5 10e2 -> 0E+3
dqdiv487 divide 0e5 20e2 -> 0E+3
dqdiv488 divide 0e5 100e1 -> 0E+4
dqdiv489 divide 0e5 200e1 -> 0E+4
dqdiv491 divide 1e5 1e3 -> 1E+2
dqdiv492 divide 1e5 2e3 -> 5E+1
dqdiv493 divide 1e5 10e2 -> 1E+2
dqdiv494 divide 1e5 20e2 -> 5E+1
dqdiv495 divide 1e5 100e1 -> 1E+2
dqdiv496 divide 1e5 200e1 -> 5E+1
-- tryzeros cases
rounding: half_up
dqdiv497 divide 0E+6108 1000E-33 -> 0E+6111 Clamped
dqdiv498 divide 0E-6170 1000E+33 -> 0E-6176 Clamped
rounding: half_up
-- focus on trailing zeros issues
dqdiv500 divide 1 9.9 -> 0.1010101010101010101010101010101010 Inexact Rounded
dqdiv501 divide 1 9.09 -> 0.1100110011001100110011001100110011 Inexact Rounded
dqdiv502 divide 1 9.009 -> 0.1110001110001110001110001110001110 Inexact Rounded
dqdiv511 divide 1 2 -> 0.5
dqdiv512 divide 1.0 2 -> 0.5
dqdiv513 divide 1.00 2 -> 0.50
dqdiv514 divide 1.000 2 -> 0.500
dqdiv515 divide 1.0000 2 -> 0.5000
dqdiv516 divide 1.00000 2 -> 0.50000
dqdiv517 divide 1.000000 2 -> 0.500000
dqdiv518 divide 1.0000000 2 -> 0.5000000
dqdiv519 divide 1.00 2.00 -> 0.5
dqdiv521 divide 2 1 -> 2
dqdiv522 divide 2 1.0 -> 2
dqdiv523 divide 2 1.00 -> 2
dqdiv524 divide 2 1.000 -> 2
dqdiv525 divide 2 1.0000 -> 2
dqdiv526 divide 2 1.00000 -> 2
dqdiv527 divide 2 1.000000 -> 2
dqdiv528 divide 2 1.0000000 -> 2
dqdiv529 divide 2.00 1.00 -> 2
dqdiv530 divide 2.40 2 -> 1.20
dqdiv531 divide 2.40 4 -> 0.60
dqdiv532 divide 2.40 10 -> 0.24
dqdiv533 divide 2.40 2.0 -> 1.2
dqdiv534 divide 2.40 4.0 -> 0.6
dqdiv535 divide 2.40 10.0 -> 0.24
dqdiv536 divide 2.40 2.00 -> 1.2
dqdiv537 divide 2.40 4.00 -> 0.6
dqdiv538 divide 2.40 10.00 -> 0.24
dqdiv539 divide 0.9 0.1 -> 9
dqdiv540 divide 0.9 0.01 -> 9E+1
dqdiv541 divide 0.9 0.001 -> 9E+2
dqdiv542 divide 5 2 -> 2.5
dqdiv543 divide 5 2.0 -> 2.5
dqdiv544 divide 5 2.00 -> 2.5
dqdiv545 divide 5 20 -> 0.25
dqdiv546 divide 5 20.0 -> 0.25
dqdiv547 divide 2.400 2 -> 1.200
dqdiv548 divide 2.400 2.0 -> 1.20
dqdiv549 divide 2.400 2.400 -> 1
dqdiv550 divide 240 1 -> 240
dqdiv551 divide 240 10 -> 24
dqdiv552 divide 240 100 -> 2.4
dqdiv553 divide 240 1000 -> 0.24
dqdiv554 divide 2400 1 -> 2400
dqdiv555 divide 2400 10 -> 240
dqdiv556 divide 2400 100 -> 24
dqdiv557 divide 2400 1000 -> 2.4
-- +ve exponent
dqdiv600 divide 2.4E+9 2 -> 1.2E+9
dqdiv601 divide 2.40E+9 2 -> 1.20E+9
dqdiv602 divide 2.400E+9 2 -> 1.200E+9
dqdiv603 divide 2.4000E+9 2 -> 1.2000E+9
dqdiv604 divide 24E+8 2 -> 1.2E+9
dqdiv605 divide 240E+7 2 -> 1.20E+9
dqdiv606 divide 2400E+6 2 -> 1.200E+9
dqdiv607 divide 24000E+5 2 -> 1.2000E+9
-- more zeros, etc.
dqdiv731 divide 5.00 1E-3 -> 5.00E+3
dqdiv732 divide 00.00 0.000 -> NaN Division_undefined
dqdiv733 divide 00.00 0E-3 -> NaN Division_undefined
dqdiv734 divide 0 -0 -> NaN Division_undefined
dqdiv735 divide -0 0 -> NaN Division_undefined
dqdiv736 divide -0 -0 -> NaN Division_undefined
dqdiv741 divide 0 -1 -> -0
dqdiv742 divide -0 -1 -> 0
dqdiv743 divide 0 1 -> 0
dqdiv744 divide -0 1 -> -0
dqdiv745 divide -1 0 -> -Infinity Division_by_zero
dqdiv746 divide -1 -0 -> Infinity Division_by_zero
dqdiv747 divide 1 0 -> Infinity Division_by_zero
dqdiv748 divide 1 -0 -> -Infinity Division_by_zero
dqdiv751 divide 0.0 -1 -> -0.0
dqdiv752 divide -0.0 -1 -> 0.0
dqdiv753 divide 0.0 1 -> 0.0
dqdiv754 divide -0.0 1 -> -0.0
dqdiv755 divide -1.0 0 -> -Infinity Division_by_zero
dqdiv756 divide -1.0 -0 -> Infinity Division_by_zero
dqdiv757 divide 1.0 0 -> Infinity Division_by_zero
dqdiv758 divide 1.0 -0 -> -Infinity Division_by_zero
dqdiv761 divide 0 -1.0 -> -0E+1
dqdiv762 divide -0 -1.0 -> 0E+1
dqdiv763 divide 0 1.0 -> 0E+1
dqdiv764 divide -0 1.0 -> -0E+1
dqdiv765 divide -1 0.0 -> -Infinity Division_by_zero
dqdiv766 divide -1 -0.0 -> Infinity Division_by_zero
dqdiv767 divide 1 0.0 -> Infinity Division_by_zero
dqdiv768 divide 1 -0.0 -> -Infinity Division_by_zero
dqdiv771 divide 0.0 -1.0 -> -0
dqdiv772 divide -0.0 -1.0 -> 0
dqdiv773 divide 0.0 1.0 -> 0
dqdiv774 divide -0.0 1.0 -> -0
dqdiv775 divide -1.0 0.0 -> -Infinity Division_by_zero
dqdiv776 divide -1.0 -0.0 -> Infinity Division_by_zero
dqdiv777 divide 1.0 0.0 -> Infinity Division_by_zero
dqdiv778 divide 1.0 -0.0 -> -Infinity Division_by_zero
-- Specials
dqdiv780 divide Inf -Inf -> NaN Invalid_operation
dqdiv781 divide Inf -1000 -> -Infinity
dqdiv782 divide Inf -1 -> -Infinity
dqdiv783 divide Inf -0 -> -Infinity
dqdiv784 divide Inf 0 -> Infinity
dqdiv785 divide Inf 1 -> Infinity
dqdiv786 divide Inf 1000 -> Infinity
dqdiv787 divide Inf Inf -> NaN Invalid_operation
dqdiv788 divide -1000 Inf -> -0E-6176 Clamped
dqdiv789 divide -Inf Inf -> NaN Invalid_operation
dqdiv790 divide -1 Inf -> -0E-6176 Clamped
dqdiv791 divide -0 Inf -> -0E-6176 Clamped
dqdiv792 divide 0 Inf -> 0E-6176 Clamped
dqdiv793 divide 1 Inf -> 0E-6176 Clamped
dqdiv794 divide 1000 Inf -> 0E-6176 Clamped
dqdiv795 divide Inf Inf -> NaN Invalid_operation
dqdiv800 divide -Inf -Inf -> NaN Invalid_operation
dqdiv801 divide -Inf -1000 -> Infinity
dqdiv802 divide -Inf -1 -> Infinity
dqdiv803 divide -Inf -0 -> Infinity
dqdiv804 divide -Inf 0 -> -Infinity
dqdiv805 divide -Inf 1 -> -Infinity
dqdiv806 divide -Inf 1000 -> -Infinity
dqdiv807 divide -Inf Inf -> NaN Invalid_operation
dqdiv808 divide -1000 Inf -> -0E-6176 Clamped
dqdiv809 divide -Inf -Inf -> NaN Invalid_operation
dqdiv810 divide -1 -Inf -> 0E-6176 Clamped
dqdiv811 divide -0 -Inf -> 0E-6176 Clamped
dqdiv812 divide 0 -Inf -> -0E-6176 Clamped
dqdiv813 divide 1 -Inf -> -0E-6176 Clamped
dqdiv814 divide 1000 -Inf -> -0E-6176 Clamped
dqdiv815 divide Inf -Inf -> NaN Invalid_operation
dqdiv821 divide NaN -Inf -> NaN
dqdiv822 divide NaN -1000 -> NaN
dqdiv823 divide NaN -1 -> NaN
dqdiv824 divide NaN -0 -> NaN
dqdiv825 divide NaN 0 -> NaN
dqdiv826 divide NaN 1 -> NaN
dqdiv827 divide NaN 1000 -> NaN
dqdiv828 divide NaN Inf -> NaN
dqdiv829 divide NaN NaN -> NaN
dqdiv830 divide -Inf NaN -> NaN
dqdiv831 divide -1000 NaN -> NaN
dqdiv832 divide -1 NaN -> NaN
dqdiv833 divide -0 NaN -> NaN
dqdiv834 divide 0 NaN -> NaN
dqdiv835 divide 1 NaN -> NaN
dqdiv836 divide 1000 NaN -> NaN
dqdiv837 divide Inf NaN -> NaN
dqdiv841 divide sNaN -Inf -> NaN Invalid_operation
dqdiv842 divide sNaN -1000 -> NaN Invalid_operation
dqdiv843 divide sNaN -1 -> NaN Invalid_operation
dqdiv844 divide sNaN -0 -> NaN Invalid_operation
dqdiv845 divide sNaN 0 -> NaN Invalid_operation
dqdiv846 divide sNaN 1 -> NaN Invalid_operation
dqdiv847 divide sNaN 1000 -> NaN Invalid_operation
dqdiv848 divide sNaN NaN -> NaN Invalid_operation
dqdiv849 divide sNaN sNaN -> NaN Invalid_operation
dqdiv850 divide NaN sNaN -> NaN Invalid_operation
dqdiv851 divide -Inf sNaN -> NaN Invalid_operation
dqdiv852 divide -1000 sNaN -> NaN Invalid_operation
dqdiv853 divide -1 sNaN -> NaN Invalid_operation
dqdiv854 divide -0 sNaN -> NaN Invalid_operation
dqdiv855 divide 0 sNaN -> NaN Invalid_operation
dqdiv856 divide 1 sNaN -> NaN Invalid_operation
dqdiv857 divide 1000 sNaN -> NaN Invalid_operation
dqdiv858 divide Inf sNaN -> NaN Invalid_operation
dqdiv859 divide NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqdiv861 divide NaN9 -Inf -> NaN9
dqdiv862 divide NaN8 1000 -> NaN8
dqdiv863 divide NaN7 Inf -> NaN7
dqdiv864 divide NaN6 NaN5 -> NaN6
dqdiv865 divide -Inf NaN4 -> NaN4
dqdiv866 divide -1000 NaN3 -> NaN3
dqdiv867 divide Inf NaN2 -> NaN2
dqdiv871 divide sNaN99 -Inf -> NaN99 Invalid_operation
dqdiv872 divide sNaN98 -1 -> NaN98 Invalid_operation
dqdiv873 divide sNaN97 NaN -> NaN97 Invalid_operation
dqdiv874 divide sNaN96 sNaN94 -> NaN96 Invalid_operation
dqdiv875 divide NaN95 sNaN93 -> NaN93 Invalid_operation
dqdiv876 divide -Inf sNaN92 -> NaN92 Invalid_operation
dqdiv877 divide 0 sNaN91 -> NaN91 Invalid_operation
dqdiv878 divide Inf sNaN90 -> NaN90 Invalid_operation
dqdiv879 divide NaN sNaN89 -> NaN89 Invalid_operation
dqdiv881 divide -NaN9 -Inf -> -NaN9
dqdiv882 divide -NaN8 1000 -> -NaN8
dqdiv883 divide -NaN7 Inf -> -NaN7
dqdiv884 divide -NaN6 -NaN5 -> -NaN6
dqdiv885 divide -Inf -NaN4 -> -NaN4
dqdiv886 divide -1000 -NaN3 -> -NaN3
dqdiv887 divide Inf -NaN2 -> -NaN2
dqdiv891 divide -sNaN99 -Inf -> -NaN99 Invalid_operation
dqdiv892 divide -sNaN98 -1 -> -NaN98 Invalid_operation
dqdiv893 divide -sNaN97 NaN -> -NaN97 Invalid_operation
dqdiv894 divide -sNaN96 -sNaN94 -> -NaN96 Invalid_operation
dqdiv895 divide -NaN95 -sNaN93 -> -NaN93 Invalid_operation
dqdiv896 divide -Inf -sNaN92 -> -NaN92 Invalid_operation
dqdiv897 divide 0 -sNaN91 -> -NaN91 Invalid_operation
dqdiv898 divide Inf -sNaN90 -> -NaN90 Invalid_operation
dqdiv899 divide -NaN -sNaN89 -> -NaN89 Invalid_operation
-- Various flavours of divide by 0
dqdiv901 divide 0 0 -> NaN Division_undefined
dqdiv902 divide 0.0E5 0 -> NaN Division_undefined
dqdiv903 divide 0.000 0 -> NaN Division_undefined
dqdiv904 divide 0.0001 0 -> Infinity Division_by_zero
dqdiv905 divide 0.01 0 -> Infinity Division_by_zero
dqdiv906 divide 0.1 0 -> Infinity Division_by_zero
dqdiv907 divide 1 0 -> Infinity Division_by_zero
dqdiv908 divide 1 0.0 -> Infinity Division_by_zero
dqdiv909 divide 10 0.0 -> Infinity Division_by_zero
dqdiv910 divide 1E+100 0.0 -> Infinity Division_by_zero
dqdiv911 divide 1E+100 0 -> Infinity Division_by_zero
dqdiv921 divide -0.0001 0 -> -Infinity Division_by_zero
dqdiv922 divide -0.01 0 -> -Infinity Division_by_zero
dqdiv923 divide -0.1 0 -> -Infinity Division_by_zero
dqdiv924 divide -1 0 -> -Infinity Division_by_zero
dqdiv925 divide -1 0.0 -> -Infinity Division_by_zero
dqdiv926 divide -10 0.0 -> -Infinity Division_by_zero
dqdiv927 divide -1E+100 0.0 -> -Infinity Division_by_zero
dqdiv928 divide -1E+100 0 -> -Infinity Division_by_zero
dqdiv931 divide 0.0001 -0 -> -Infinity Division_by_zero
dqdiv932 divide 0.01 -0 -> -Infinity Division_by_zero
dqdiv933 divide 0.1 -0 -> -Infinity Division_by_zero
dqdiv934 divide 1 -0 -> -Infinity Division_by_zero
dqdiv935 divide 1 -0.0 -> -Infinity Division_by_zero
dqdiv936 divide 10 -0.0 -> -Infinity Division_by_zero
dqdiv937 divide 1E+100 -0.0 -> -Infinity Division_by_zero
dqdiv938 divide 1E+100 -0 -> -Infinity Division_by_zero
dqdiv941 divide -0.0001 -0 -> Infinity Division_by_zero
dqdiv942 divide -0.01 -0 -> Infinity Division_by_zero
dqdiv943 divide -0.1 -0 -> Infinity Division_by_zero
dqdiv944 divide -1 -0 -> Infinity Division_by_zero
dqdiv945 divide -1 -0.0 -> Infinity Division_by_zero
dqdiv946 divide -10 -0.0 -> Infinity Division_by_zero
dqdiv947 divide -1E+100 -0.0 -> Infinity Division_by_zero
dqdiv948 divide -1E+100 -0 -> Infinity Division_by_zero
-- Examples from SQL proposal (Krishna Kulkarni)
dqdiv1021 divide 1E0 1E0 -> 1
dqdiv1022 divide 1E0 2E0 -> 0.5
dqdiv1023 divide 1E0 3E0 -> 0.3333333333333333333333333333333333 Inexact Rounded
dqdiv1024 divide 100E-2 1000E-3 -> 1
dqdiv1025 divide 24E-1 2E0 -> 1.2
dqdiv1026 divide 2400E-3 2E0 -> 1.200
dqdiv1027 divide 5E0 2E0 -> 2.5
dqdiv1028 divide 5E0 20E-1 -> 2.5
dqdiv1029 divide 5E0 2000E-3 -> 2.5
dqdiv1030 divide 5E0 2E-1 -> 25
dqdiv1031 divide 5E0 20E-2 -> 25
dqdiv1032 divide 480E-2 3E0 -> 1.60
dqdiv1033 divide 47E-1 2E0 -> 2.35
-- ECMAScript bad examples
rounding: half_down
dqdiv1040 divide 5 9 -> 0.5555555555555555555555555555555556 Inexact Rounded
rounding: half_even
dqdiv1041 divide 6 11 -> 0.5454545454545454545454545454545455 Inexact Rounded
-- Gyuris example
dqdiv1050 divide 8.336804418094040989630006819881709E-6143 8.336804418094040989630006819889000E-6143 -> 0.9999999999999999999999999999991254 Inexact Rounded
-- overflow and underflow tests .. note subnormal results
-- signs
dqdiv1751 divide 1e+4277 1e-3311 -> Infinity Overflow Inexact Rounded
dqdiv1752 divide 1e+4277 -1e-3311 -> -Infinity Overflow Inexact Rounded
dqdiv1753 divide -1e+4277 1e-3311 -> -Infinity Overflow Inexact Rounded
dqdiv1754 divide -1e+4277 -1e-3311 -> Infinity Overflow Inexact Rounded
dqdiv1755 divide 1e-4277 1e+3311 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqdiv1756 divide 1e-4277 -1e+3311 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqdiv1757 divide -1e-4277 1e+3311 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqdiv1758 divide -1e-4277 -1e+3311 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
dqdiv1760 divide 1e-6069 1e+101 -> 1E-6170 Subnormal
dqdiv1761 divide 1e-6069 1e+102 -> 1E-6171 Subnormal
dqdiv1762 divide 1e-6069 1e+103 -> 1E-6172 Subnormal
dqdiv1763 divide 1e-6069 1e+104 -> 1E-6173 Subnormal
dqdiv1764 divide 1e-6069 1e+105 -> 1E-6174 Subnormal
dqdiv1765 divide 1e-6069 1e+106 -> 1E-6175 Subnormal
dqdiv1766 divide 1e-6069 1e+107 -> 1E-6176 Subnormal
dqdiv1767 divide 1e-6069 1e+108 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqdiv1768 divide 1e-6069 1e+109 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqdiv1769 divide 1e-6069 1e+110 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
-- [no equivalent of 'subnormal' for overflow]
dqdiv1770 divide 1e+40 1e-6101 -> 1.000000000000000000000000000000E+6141 Clamped
dqdiv1771 divide 1e+40 1e-6102 -> 1.0000000000000000000000000000000E+6142 Clamped
dqdiv1772 divide 1e+40 1e-6103 -> 1.00000000000000000000000000000000E+6143 Clamped
dqdiv1773 divide 1e+40 1e-6104 -> 1.000000000000000000000000000000000E+6144 Clamped
dqdiv1774 divide 1e+40 1e-6105 -> Infinity Overflow Inexact Rounded
dqdiv1775 divide 1e+40 1e-6106 -> Infinity Overflow Inexact Rounded
dqdiv1776 divide 1e+40 1e-6107 -> Infinity Overflow Inexact Rounded
dqdiv1777 divide 1e+40 1e-6108 -> Infinity Overflow Inexact Rounded
dqdiv1778 divide 1e+40 1e-6109 -> Infinity Overflow Inexact Rounded
dqdiv1779 divide 1e+40 1e-6110 -> Infinity Overflow Inexact Rounded
dqdiv1801 divide 1.0000E-6172 1 -> 1.0000E-6172 Subnormal
dqdiv1802 divide 1.000E-6172 1e+1 -> 1.000E-6173 Subnormal
dqdiv1803 divide 1.00E-6172 1e+2 -> 1.00E-6174 Subnormal
dqdiv1804 divide 1.0E-6172 1e+3 -> 1.0E-6175 Subnormal
dqdiv1805 divide 1.0E-6172 1e+4 -> 1E-6176 Subnormal Rounded
dqdiv1806 divide 1.3E-6172 1e+4 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqdiv1807 divide 1.5E-6172 1e+4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqdiv1808 divide 1.7E-6172 1e+4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqdiv1809 divide 2.3E-6172 1e+4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqdiv1810 divide 2.5E-6172 1e+4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqdiv1811 divide 2.7E-6172 1e+4 -> 3E-6176 Underflow Subnormal Inexact Rounded
dqdiv1812 divide 1.49E-6172 1e+4 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqdiv1813 divide 1.50E-6172 1e+4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqdiv1814 divide 1.51E-6172 1e+4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqdiv1815 divide 2.49E-6172 1e+4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqdiv1816 divide 2.50E-6172 1e+4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqdiv1817 divide 2.51E-6172 1e+4 -> 3E-6176 Underflow Subnormal Inexact Rounded
dqdiv1818 divide 1E-6172 1e+4 -> 1E-6176 Subnormal
dqdiv1819 divide 3E-6172 1e+5 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqdiv1820 divide 5E-6172 1e+5 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqdiv1821 divide 7E-6172 1e+5 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqdiv1822 divide 9E-6172 1e+5 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqdiv1823 divide 9.9E-6172 1e+5 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqdiv1824 divide 1E-6172 -1e+4 -> -1E-6176 Subnormal
dqdiv1825 divide 3E-6172 -1e+5 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqdiv1826 divide -5E-6172 1e+5 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqdiv1827 divide 7E-6172 -1e+5 -> -1E-6176 Underflow Subnormal Inexact Rounded
dqdiv1828 divide -9E-6172 1e+5 -> -1E-6176 Underflow Subnormal Inexact Rounded
dqdiv1829 divide 9.9E-6172 -1e+5 -> -1E-6176 Underflow Subnormal Inexact Rounded
dqdiv1830 divide 3.0E-6172 -1e+5 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqdiv1831 divide 1.0E-5977 1e+200 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqdiv1832 divide 1.0E-5977 1e+199 -> 1E-6176 Subnormal Rounded
dqdiv1833 divide 1.0E-5977 1e+198 -> 1.0E-6175 Subnormal
dqdiv1834 divide 2.0E-5977 2e+198 -> 1.0E-6175 Subnormal
dqdiv1835 divide 4.0E-5977 4e+198 -> 1.0E-6175 Subnormal
dqdiv1836 divide 10.0E-5977 10e+198 -> 1.0E-6175 Subnormal
dqdiv1837 divide 30.0E-5977 30e+198 -> 1.0E-6175 Subnormal
dqdiv1838 divide 40.0E-5982 40e+166 -> 1.0E-6148 Subnormal
dqdiv1839 divide 40.0E-5982 40e+165 -> 1.0E-6147 Subnormal
dqdiv1840 divide 40.0E-5982 40e+164 -> 1.0E-6146 Subnormal
-- randoms
rounding: half_even
dqdiv2010 divide -5231195652931651968034356117118850 -7243718664422548573203260970.34995 -> 722169.9095831284624736051460550680 Inexact Rounded
dqdiv2011 divide -89584669773927.82711237350022515352 -42077943728529635884.21142627532985 -> 0.000002129017291146471565928125887527266 Inexact Rounded
dqdiv2012 divide -2.828201693360723203806974891946180E-232 812596541221823960386384403089240.9 -> -3.480450075640521320040055759125120E-265 Inexact Rounded
dqdiv2013 divide -6442775372761069267502937539408720 24904085056.69185465145182606089196 -> -258703556388226463687701.4884719589 Inexact Rounded
dqdiv2014 divide 5.535520011272625629610079879714705 -44343664650.57203052003068113531208 -> -1.248322630728089308975940533493562E-10 Inexact Rounded
dqdiv2015 divide 65919273712517865964325.99419625010 -314733354141381737378622515.7789054 -> -0.0002094448295521490616379784758911632 Inexact Rounded
dqdiv2016 divide -7.779172568193197107115275140431129E+759 -140453015639.3988987652895178782143 -> 5.538629792161641534962774244238115E+748 Inexact Rounded
dqdiv2017 divide 644314832597569.0181226067518178797 -115024585257425.1635759521565201075 -> -5.601540150356479257367687450922795 Inexact Rounded
dqdiv2018 divide 6.898640941579611450676592553286870E-47 -11272429881407851485163914999.25943 -> -6.119923578285338689371137648319280E-75 Inexact Rounded
dqdiv2019 divide -3591344544888727133.30819750163254 5329395.423792795661446561090331037 -> -673874662941.1968525589460533725290 Inexact Rounded
dqdiv2020 divide -7.682356781384631313156462724425838E+747 -6.60375855512219057281922141809940E+703 -> 1.163330960279556016678379128875149E+44 Inexact Rounded
dqdiv2021 divide -4511495596596941820863224.274679699 3365395017.263329795449661616090724 -> -1340554548115304.904166888018346299 Inexact Rounded
dqdiv2022 divide 5.211164127840931517263639608151299 164.5566381356276567012533847006453 -> 0.03166790587655228864478260157156510 Inexact Rounded
dqdiv2023 divide -49891.2243893458830384077684620383 -47179.9312961860747554053371171530 -> 1.057467084386767291602189656430268 Inexact Rounded
dqdiv2024 divide 15065477.47214268488077415462413353 4366211.120892953261309529740552596 -> 3.450469309661227984244545513441359 Inexact Rounded
dqdiv2025 divide 1.575670269440761846109602429612644E+370 653199649324740300.006185482643439 -> 2.412233795700359170904588548041481E+352 Inexact Rounded
dqdiv2026 divide -2112422311733448924573432192.620145 -80067206.03590693153848215848613406 -> 26383115089417660175.20102646756574 Inexact Rounded
dqdiv2027 divide -67096536051279809.32218611548721839 -869685412881941081664251990181.1049 -> 7.715035236584805921278566365231168E-14 Inexact Rounded
dqdiv2028 divide -58612908548962047.21866913425488972 -978449597531.3873665583475633831644 -> 59903.86085991703091236507859837023 Inexact Rounded
dqdiv2029 divide -133032412010942.1476864138213319796 -7.882059293498670705446528648201359E-428 -> 1.687787506504433064549515681693715E+441 Inexact Rounded
dqdiv2030 divide 1.83746698338966029492299716360513E+977 -9.897926608979649951672839879128603E+154 -> -1.856416051542212552042390218062458E+822 Inexact Rounded
dqdiv2031 divide -113742475841399236307128962.1507063 8298602.203049834732657567965262989 -> -13706221006665137826.16557393919929 Inexact Rounded
dqdiv2032 divide 196.4787574650754152995941808331862 929.6553388472318094427422117172394 -> 0.2113458066176526651006917922814018 Inexact Rounded
dqdiv2033 divide 71931221465.43867996282803628130350 3838685934206426257090718.402248853 -> 1.873850132527423413607199513324021E-14 Inexact Rounded
dqdiv2034 divide 488.4282502289651653783596246312885 -80.68940956806634280078706577953188 -> -6.053189047280693318844801899473272 Inexact Rounded
dqdiv2035 divide 9.001764344963921754981762913247394E-162 -8.585540973667205753734967645386919E-729 -> -1.048479574271827326396012573232934E+567 Inexact Rounded
dqdiv2036 divide -7.404133959409894743706402857145471E-828 -51.38159929460289711134684843086265 -> 1.441008855516029461032061785219773E-829 Inexact Rounded
dqdiv2037 divide 2.967520235574419794048994436040717E-613 -6252513855.91394894949879262731889 -> -4.746123405656409127572998751885338E-623 Inexact Rounded
dqdiv2038 divide -18826852654824040505.83920366765051 -6336924877942437992590557460147340 -> 2.970976146546494669807886278519194E-15 Inexact Rounded
dqdiv2039 divide -8.101406784809197604949584001735949E+561 4.823300306948942821076681658771635E+361 -> -1.679639721610839204738445747238987E+200 Inexact Rounded
dqdiv2040 divide -6.11981977773094052331062585191723E+295 1.507610253755339328302779005586534E+238 -> -4.059285058911577244044418416044763E+57 Inexact Rounded
dqdiv2041 divide 6.472638850046815880599220534274055E-596 -4.475233712083047516933911786159972 -> -1.446324207062261745520496475778879E-596 Inexact Rounded
dqdiv2042 divide -84438593330.71277839631144509397112 -586684596204401664208947.4054879633 -> 1.439250218550041228759983937772504E-13 Inexact Rounded
dqdiv2043 divide 9.354533233294022616695815656704369E-24 405.500390626135304252144163591746 -> 2.306911028827774549740571229736198E-26 Inexact Rounded
dqdiv2044 divide 985606423350210.7374876650149957881 -36811563697.41925681866694859828794 -> -26774.36990864119445335813354717711 Inexact Rounded
dqdiv2045 divide -8.187280774177715706278002247766311E-123 -38784124393.91212870828430001300068 -> 2.110987653356139147357240727794365E-133 Inexact Rounded
dqdiv2046 divide -4.612203126350070903459245798371657E+912 7.971562182727956290901984736800519E+64 -> -5.785820922708683237098826662769748E+847 Inexact Rounded
dqdiv2047 divide 4.661015909421485298247928967977089E+888 -6.360911253323922338737311563845581E+388 -> -7.327591478321365980156654539638836E+499 Inexact Rounded
dqdiv2048 divide 9156078172903.257500003260710833030 7.189796653262147139071634237964074E-90 -> 1.273482215766000994365201545096026E+102 Inexact Rounded
dqdiv2049 divide -1.710722303327476586373477781276586E-311 -3167561628260156837329323.729380695 -> 5.400754599578613984875752958645655E-336 Inexact Rounded
dqdiv2050 divide -4.647935210881806238321616345413021E-878 209388.5431867744648177308460639582 -> -2.219765771394593733140494297388140E-883 Inexact Rounded
dqdiv2051 divide 5958.694728395760992719084781582700 4.541510156564315632536353171846096E-746 -> 1.312051393253638664947852693005480E+749 Inexact Rounded
dqdiv2052 divide -7.935732544649702175256699886872093E-489 -7.433329073664793138998765647467971E+360 -> 1.067587949626076917672271619664656E-849 Inexact Rounded
dqdiv2053 divide -2746650864601157.863589959939901350 7.016684945507647528907184694359598E+548 -> -3.914456593009309529351254950429932E-534 Inexact Rounded
dqdiv2054 divide 3605149408631197365447953.994569178 -75614025825649082.78264864428237833 -> -47678315.88472693507060063188020532 Inexact Rounded
dqdiv2055 divide 788194320921798404906375214.196349 -6.222718148433247384932573401976337E-418 -> -1.266639918634671803982222244977287E+444 Inexact Rounded
dqdiv2056 divide 5620722730534752.758208943447603211 6.843552841168538319123000917657759E-139 -> 8.213164800485434666629970443739554E+153 Inexact Rounded
dqdiv2057 divide 7304534676713703938102.403949019402 -576169.3685010935108153023803590835 -> -12677756014201995.31969237144394772 Inexact Rounded
dqdiv2058 divide 8067918762.134621639254916786945547 -8.774771480055536009105596163864758E+954 -> -9.194448858836332156766764605125245E-946 Inexact Rounded
dqdiv2059 divide 8.702093454123046507578256899537563E-324 -5.875399733016018404580201176576293E-401 -> -1.481106622452052581470443526957335E+77 Inexact Rounded
dqdiv2060 divide -41426.01662518451861386352415092356 90.00146621684478300510769802013464 -> -460.2815750287318692732067709176200 Inexact Rounded
-- random divide tests with result near 1
dqdiv4001 divide 2003100352770753969878925664524900 2003100352770753969878925664497824 -> 1.000000000000000000000000000013517 Inexact Rounded
dqdiv4002 divide 4817785793916490652579552318371645 4817785793916490652579552318362097 -> 1.000000000000000000000000000001982 Inexact Rounded
dqdiv4003 divide 8299187410920067325648068439560282 8299187410920067325648068439591159 -> 0.9999999999999999999999999999962795 Inexact Rounded
dqdiv4004 divide 5641088455897407044544461785365899 5641088455897407044544461785389965 -> 0.9999999999999999999999999999957338 Inexact Rounded
dqdiv4005 divide 5752274694706545359326361313490424 5752274694706545359326361313502723 -> 0.9999999999999999999999999999978619 Inexact Rounded
dqdiv4006 divide 6762079477373670594829319346099665 6762079477373670594829319346132579 -> 0.9999999999999999999999999999951326 Inexact Rounded
dqdiv4007 divide 7286425153691890341633023222602916 7286425153691890341633023222606556 -> 0.9999999999999999999999999999995004 Inexact Rounded
dqdiv4008 divide 9481233991901305727648306421946655 9481233991901305727648306421919124 -> 1.000000000000000000000000000002904 Inexact Rounded
dqdiv4009 divide 4282053941893951742029444065614311 4282053941893951742029444065583077 -> 1.000000000000000000000000000007294 Inexact Rounded
dqdiv4010 divide 626888225441250639741781850338695 626888225441250639741781850327299 -> 1.000000000000000000000000000018179 Inexact Rounded
dqdiv4011 divide 3860973649222028009456598604468547 3860973649222028009456598604476849 -> 0.9999999999999999999999999999978498 Inexact Rounded
dqdiv4012 divide 4753157080127468127908060607821839 4753157080127468127908060607788379 -> 1.000000000000000000000000000007040 Inexact Rounded
dqdiv4013 divide 552448546203754062805706277880419 552448546203754062805706277881903 -> 0.9999999999999999999999999999973138 Inexact Rounded
dqdiv4014 divide 8405954527952158455323713728917395 8405954527952158455323713728933866 -> 0.9999999999999999999999999999980406 Inexact Rounded
dqdiv4015 divide 7554096502235321142555802238016116 7554096502235321142555802238026546 -> 0.9999999999999999999999999999986193 Inexact Rounded
dqdiv4016 divide 4053257674127518606871054934746782 4053257674127518606871054934767355 -> 0.9999999999999999999999999999949243 Inexact Rounded
dqdiv4017 divide 7112419420755090454716888844011582 7112419420755090454716888844038105 -> 0.9999999999999999999999999999962709 Inexact Rounded
dqdiv4018 divide 3132302137520072728164549730911846 3132302137520072728164549730908416 -> 1.000000000000000000000000000001095 Inexact Rounded
dqdiv4019 divide 4788374045841416355706715048161013 4788374045841416355706715048190077 -> 0.9999999999999999999999999999939303 Inexact Rounded
dqdiv4020 divide 9466021636047630218238075099510597 9466021636047630218238075099484053 -> 1.000000000000000000000000000002804 Inexact Rounded
dqdiv4021 divide 912742745646765625597399692138650 912742745646765625597399692139042 -> 0.9999999999999999999999999999995705 Inexact Rounded
dqdiv4022 divide 9508402742933643208806264897188504 9508402742933643208806264897195973 -> 0.9999999999999999999999999999992145 Inexact Rounded
dqdiv4023 divide 1186956795727233704962361914360895 1186956795727233704962361914329577 -> 1.000000000000000000000000000026385 Inexact Rounded
dqdiv4024 divide 5972210268839014812696916170967938 5972210268839014812696916170954974 -> 1.000000000000000000000000000002171 Inexact Rounded
dqdiv4025 divide 2303801625521619930894460139793140 2303801625521619930894460139799643 -> 0.9999999999999999999999999999971773 Inexact Rounded
dqdiv4026 divide 6022231560002898264777393473966595 6022231560002898264777393473947198 -> 1.000000000000000000000000000003221 Inexact Rounded
dqdiv4027 divide 8426148335801396199969346032210893 8426148335801396199969346032203179 -> 1.000000000000000000000000000000915 Inexact Rounded
dqdiv4028 divide 8812278947028784637382847098411749 8812278947028784637382847098385317 -> 1.000000000000000000000000000002999 Inexact Rounded
dqdiv4029 divide 8145282002348367383264197170116146 8145282002348367383264197170083988 -> 1.000000000000000000000000000003948 Inexact Rounded
dqdiv4030 divide 6821577571876840153123510107387026 6821577571876840153123510107418008 -> 0.9999999999999999999999999999954582 Inexact Rounded
dqdiv4031 divide 9018555319518966970480565482023720 9018555319518966970480565482013346 -> 1.000000000000000000000000000001150 Inexact Rounded
dqdiv4032 divide 4602155712998228449640717252788864 4602155712998228449640717252818502 -> 0.9999999999999999999999999999935600 Inexact Rounded
dqdiv4033 divide 6675607481522785614506828292264472 6675607481522785614506828292277100 -> 0.9999999999999999999999999999981083 Inexact Rounded
dqdiv4034 divide 4015881516871833897766945836264472 4015881516871833897766945836262645 -> 1.000000000000000000000000000000455 Inexact Rounded
dqdiv4035 divide 1415580205933411837595459716910365 1415580205933411837595459716880139 -> 1.000000000000000000000000000021352 Inexact Rounded
dqdiv4036 divide 9432968297069542816752035276361552 9432968297069542816752035276353054 -> 1.000000000000000000000000000000901 Inexact Rounded
dqdiv4037 divide 4799319591303848500532766682140658 4799319591303848500532766682172655 -> 0.9999999999999999999999999999933330 Inexact Rounded
dqdiv4038 divide 316854270732839529790584284987472 316854270732839529790584285004832 -> 0.9999999999999999999999999999452114 Inexact Rounded
dqdiv4039 divide 3598981300592490427826027975697415 3598981300592490427826027975686712 -> 1.000000000000000000000000000002974 Inexact Rounded
dqdiv4040 divide 1664315435694461371155800682196520 1664315435694461371155800682195617 -> 1.000000000000000000000000000000543 Inexact Rounded
dqdiv4041 divide 1680872316531128890102855316510581 1680872316531128890102855316495545 -> 1.000000000000000000000000000008945 Inexact Rounded
dqdiv4042 divide 9881274879566405475755499281644730 9881274879566405475755499281615743 -> 1.000000000000000000000000000002934 Inexact Rounded
dqdiv4043 divide 4737225957717466960447204232279216 4737225957717466960447204232277452 -> 1.000000000000000000000000000000372 Inexact Rounded
dqdiv4044 divide 2482097379414867061213319346418288 2482097379414867061213319346387936 -> 1.000000000000000000000000000012228 Inexact Rounded
dqdiv4045 divide 7406977595233762723576434122161868 7406977595233762723576434122189042 -> 0.9999999999999999999999999999963313 Inexact Rounded
dqdiv4046 divide 228782057757566047086593281773577 228782057757566047086593281769727 -> 1.000000000000000000000000000016828 Inexact Rounded
dqdiv4047 divide 2956594270240579648823270540367653 2956594270240579648823270540368556 -> 0.9999999999999999999999999999996946 Inexact Rounded
dqdiv4048 divide 6326964098897620620534136767634340 6326964098897620620534136767619339 -> 1.000000000000000000000000000002371 Inexact Rounded
dqdiv4049 divide 414586440456590215247002678327800 414586440456590215247002678316922 -> 1.000000000000000000000000000026238 Inexact Rounded
dqdiv4050 divide 7364552208570039386220505636779125 7364552208570039386220505636803548 -> 0.9999999999999999999999999999966837 Inexact Rounded
dqdiv4051 divide 5626266749902369710022824950590056 5626266749902369710022824950591008 -> 0.9999999999999999999999999999998308 Inexact Rounded
dqdiv4052 divide 4863278293916197454987481343460484 4863278293916197454987481343442522 -> 1.000000000000000000000000000003693 Inexact Rounded
dqdiv4053 divide 1170713582030637359713249796835483 1170713582030637359713249796823345 -> 1.000000000000000000000000000010368 Inexact Rounded
dqdiv4054 divide 9838062494725965667776326556052931 9838062494725965667776326556061002 -> 0.9999999999999999999999999999991796 Inexact Rounded
dqdiv4055 divide 4071388731298861093005687091498922 4071388731298861093005687091498278 -> 1.000000000000000000000000000000158 Inexact Rounded
dqdiv4056 divide 8753155722324706795855038590272526 8753155722324706795855038590276656 -> 0.9999999999999999999999999999995282 Inexact Rounded
dqdiv4057 divide 4399941911533273418844742658240485 4399941911533273418844742658219891 -> 1.000000000000000000000000000004681 Inexact Rounded
dqdiv4058 divide 4127884159949503677776430620050269 4127884159949503677776430620026091 -> 1.000000000000000000000000000005857 Inexact Rounded
dqdiv4059 divide 5536160822360800067042528317438808 5536160822360800067042528317450687 -> 0.9999999999999999999999999999978543 Inexact Rounded
dqdiv4060 divide 3973234998468664936671088237710246 3973234998468664936671088237741886 -> 0.9999999999999999999999999999920367 Inexact Rounded
dqdiv4061 divide 9824855935638263593410444142327358 9824855935638263593410444142328576 -> 0.9999999999999999999999999999998760 Inexact Rounded
dqdiv4062 divide 5917078517340218131867327300814867 5917078517340218131867327300788701 -> 1.000000000000000000000000000004422 Inexact Rounded
dqdiv4063 divide 4354236601830544882286139612521362 4354236601830544882286139612543223 -> 0.9999999999999999999999999999949794 Inexact Rounded
dqdiv4064 divide 8058474772375259017342110013891294 8058474772375259017342110013906792 -> 0.9999999999999999999999999999980768 Inexact Rounded
dqdiv4065 divide 5519604020981748170517093746166328 5519604020981748170517093746181763 -> 0.9999999999999999999999999999972036 Inexact Rounded
dqdiv4066 divide 1502130966879805458831323782443139 1502130966879805458831323782412213 -> 1.000000000000000000000000000020588 Inexact Rounded
dqdiv4067 divide 562795633719481212915159787980270 562795633719481212915159788007066 -> 0.9999999999999999999999999999523877 Inexact Rounded
dqdiv4068 divide 6584743324494664273941281557268878 6584743324494664273941281557258945 -> 1.000000000000000000000000000001508 Inexact Rounded
dqdiv4069 divide 3632000327285743997976431109416500 3632000327285743997976431109408107 -> 1.000000000000000000000000000002311 Inexact Rounded
dqdiv4070 divide 1145827237315430089388953838561450 1145827237315430089388953838527332 -> 1.000000000000000000000000000029776 Inexact Rounded
dqdiv4071 divide 8874431010357691869725372317350380 8874431010357691869725372317316472 -> 1.000000000000000000000000000003821 Inexact Rounded
dqdiv4072 divide 992948718902804648119753141202196 992948718902804648119753141235222 -> 0.9999999999999999999999999999667395 Inexact Rounded
dqdiv4073 divide 2522735183374218505142417265439989 2522735183374218505142417265453779 -> 0.9999999999999999999999999999945337 Inexact Rounded
dqdiv4074 divide 2668419161912936508006872303501052 2668419161912936508006872303471036 -> 1.000000000000000000000000000011249 Inexact Rounded
dqdiv4075 divide 3036169085665186712590941111775092 3036169085665186712590941111808846 -> 0.9999999999999999999999999999888827 Inexact Rounded
dqdiv4076 divide 9441634604917231638508898934006147 9441634604917231638508898934000288 -> 1.000000000000000000000000000000621 Inexact Rounded
dqdiv4077 divide 2677301353164377091111458811839190 2677301353164377091111458811867722 -> 0.9999999999999999999999999999893430 Inexact Rounded
dqdiv4078 divide 6844979203112066166583765857171426 6844979203112066166583765857189682 -> 0.9999999999999999999999999999973329 Inexact Rounded
dqdiv4079 divide 2220337435141796724323783960231661 2220337435141796724323783960208778 -> 1.000000000000000000000000000010306 Inexact Rounded
dqdiv4080 divide 6447424700019783931569996989561380 6447424700019783931569996989572454 -> 0.9999999999999999999999999999982824 Inexact Rounded
dqdiv4081 divide 7512856762696607119847092195587180 7512856762696607119847092195557346 -> 1.000000000000000000000000000003971 Inexact Rounded
dqdiv4082 divide 7395261981193960399087819077237482 7395261981193960399087819077242487 -> 0.9999999999999999999999999999993232 Inexact Rounded
dqdiv4083 divide 2253442467682584035792724884376735 2253442467682584035792724884407178 -> 0.9999999999999999999999999999864904 Inexact Rounded
dqdiv4084 divide 8153138680300213135577336466190997 8153138680300213135577336466220607 -> 0.9999999999999999999999999999963683 Inexact Rounded
dqdiv4085 divide 4668731252254148074041022681801390 4668731252254148074041022681778101 -> 1.000000000000000000000000000004988 Inexact Rounded
dqdiv4086 divide 6078404557993669696040425501815056 6078404557993669696040425501797612 -> 1.000000000000000000000000000002870 Inexact Rounded
dqdiv4087 divide 2306352359874261623223356878316278 2306352359874261623223356878335612 -> 0.9999999999999999999999999999916171 Inexact Rounded
dqdiv4088 divide 3264842186668480362900909564091908 3264842186668480362900909564058658 -> 1.000000000000000000000000000010184 Inexact Rounded
dqdiv4089 divide 6971985047279636878957959608612204 6971985047279636878957959608615088 -> 0.9999999999999999999999999999995863 Inexact Rounded
dqdiv4090 divide 5262810889952721235466445973816257 5262810889952721235466445973783077 -> 1.000000000000000000000000000006305 Inexact Rounded
dqdiv4091 divide 7947944731035267178548357070080288 7947944731035267178548357070061339 -> 1.000000000000000000000000000002384 Inexact Rounded
dqdiv4092 divide 5071808908395375108383035800443229 5071808908395375108383035800412429 -> 1.000000000000000000000000000006073 Inexact Rounded
dqdiv4093 divide 2043146542084503655511507209262969 2043146542084503655511507209249263 -> 1.000000000000000000000000000006708 Inexact Rounded
dqdiv4094 divide 4097632735384534181661959731264802 4097632735384534181661959731234499 -> 1.000000000000000000000000000007395 Inexact Rounded
dqdiv4095 divide 3061477642831387489729464587044430 3061477642831387489729464587059452 -> 0.9999999999999999999999999999950932 Inexact Rounded
dqdiv4096 divide 3429854941039776159498802936252638 3429854941039776159498802936246415 -> 1.000000000000000000000000000001814 Inexact Rounded
dqdiv4097 divide 4874324979578599700024133278284545 4874324979578599700024133278262131 -> 1.000000000000000000000000000004598 Inexact Rounded
dqdiv4098 divide 5701652369691833541455978515820882 5701652369691833541455978515834854 -> 0.9999999999999999999999999999975495 Inexact Rounded
dqdiv4099 divide 2928205728402945266953255632343113 2928205728402945266953255632373794 -> 0.9999999999999999999999999999895223 Inexact Rounded
-- Null tests
dqdiv9998 divide 10 # -> NaN Invalid_operation
dqdiv9999 divide # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,453 @@
------------------------------------------------------------------------
-- dqDivideInt.decTest -- decQuad integer division --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqdvi001 divideint 1 1 -> 1
dqdvi002 divideint 2 1 -> 2
dqdvi003 divideint 1 2 -> 0
dqdvi004 divideint 2 2 -> 1
dqdvi005 divideint 0 1 -> 0
dqdvi006 divideint 0 2 -> 0
dqdvi007 divideint 1 3 -> 0
dqdvi008 divideint 2 3 -> 0
dqdvi009 divideint 3 3 -> 1
dqdvi010 divideint 2.4 1 -> 2
dqdvi011 divideint 2.4 -1 -> -2
dqdvi012 divideint -2.4 1 -> -2
dqdvi013 divideint -2.4 -1 -> 2
dqdvi014 divideint 2.40 1 -> 2
dqdvi015 divideint 2.400 1 -> 2
dqdvi016 divideint 2.4 2 -> 1
dqdvi017 divideint 2.400 2 -> 1
dqdvi018 divideint 2. 2 -> 1
dqdvi019 divideint 20 20 -> 1
dqdvi020 divideint 187 187 -> 1
dqdvi021 divideint 5 2 -> 2
dqdvi022 divideint 5 2.0 -> 2
dqdvi023 divideint 5 2.000 -> 2
dqdvi024 divideint 5 0.200 -> 25
dqdvi025 divideint 5 0.200 -> 25
dqdvi030 divideint 1 2 -> 0
dqdvi031 divideint 1 4 -> 0
dqdvi032 divideint 1 8 -> 0
dqdvi033 divideint 1 16 -> 0
dqdvi034 divideint 1 32 -> 0
dqdvi035 divideint 1 64 -> 0
dqdvi040 divideint 1 -2 -> -0
dqdvi041 divideint 1 -4 -> -0
dqdvi042 divideint 1 -8 -> -0
dqdvi043 divideint 1 -16 -> -0
dqdvi044 divideint 1 -32 -> -0
dqdvi045 divideint 1 -64 -> -0
dqdvi050 divideint -1 2 -> -0
dqdvi051 divideint -1 4 -> -0
dqdvi052 divideint -1 8 -> -0
dqdvi053 divideint -1 16 -> -0
dqdvi054 divideint -1 32 -> -0
dqdvi055 divideint -1 64 -> -0
dqdvi060 divideint -1 -2 -> 0
dqdvi061 divideint -1 -4 -> 0
dqdvi062 divideint -1 -8 -> 0
dqdvi063 divideint -1 -16 -> 0
dqdvi064 divideint -1 -32 -> 0
dqdvi065 divideint -1 -64 -> 0
-- similar with powers of ten
dqdvi160 divideint 1 1 -> 1
dqdvi161 divideint 1 10 -> 0
dqdvi162 divideint 1 100 -> 0
dqdvi163 divideint 1 1000 -> 0
dqdvi164 divideint 1 10000 -> 0
dqdvi165 divideint 1 100000 -> 0
dqdvi166 divideint 1 1000000 -> 0
dqdvi167 divideint 1 10000000 -> 0
dqdvi168 divideint 1 100000000 -> 0
dqdvi170 divideint 1 -1 -> -1
dqdvi171 divideint 1 -10 -> -0
dqdvi172 divideint 1 -100 -> -0
dqdvi173 divideint 1 -1000 -> -0
dqdvi174 divideint 1 -10000 -> -0
dqdvi175 divideint 1 -100000 -> -0
dqdvi176 divideint 1 -1000000 -> -0
dqdvi177 divideint 1 -10000000 -> -0
dqdvi178 divideint 1 -100000000 -> -0
dqdvi180 divideint -1 1 -> -1
dqdvi181 divideint -1 10 -> -0
dqdvi182 divideint -1 100 -> -0
dqdvi183 divideint -1 1000 -> -0
dqdvi184 divideint -1 10000 -> -0
dqdvi185 divideint -1 100000 -> -0
dqdvi186 divideint -1 1000000 -> -0
dqdvi187 divideint -1 10000000 -> -0
dqdvi188 divideint -1 100000000 -> -0
dqdvi190 divideint -1 -1 -> 1
dqdvi191 divideint -1 -10 -> 0
dqdvi192 divideint -1 -100 -> 0
dqdvi193 divideint -1 -1000 -> 0
dqdvi194 divideint -1 -10000 -> 0
dqdvi195 divideint -1 -100000 -> 0
dqdvi196 divideint -1 -1000000 -> 0
dqdvi197 divideint -1 -10000000 -> 0
dqdvi198 divideint -1 -100000000 -> 0
-- some long operand (at p=9) cases
dqdvi070 divideint 999999999 1 -> 999999999
dqdvi071 divideint 999999999.4 1 -> 999999999
dqdvi072 divideint 999999999.5 1 -> 999999999
dqdvi073 divideint 999999999.9 1 -> 999999999
dqdvi074 divideint 999999999.999 1 -> 999999999
dqdvi090 divideint 0. 1 -> 0
dqdvi091 divideint .0 1 -> 0
dqdvi092 divideint 0.00 1 -> 0
dqdvi093 divideint 0.00E+9 1 -> 0
dqdvi094 divideint 0.0000E-50 1 -> 0
dqdvi100 divideint 1 1 -> 1
dqdvi101 divideint 1 2 -> 0
dqdvi102 divideint 1 3 -> 0
dqdvi103 divideint 1 4 -> 0
dqdvi104 divideint 1 5 -> 0
dqdvi105 divideint 1 6 -> 0
dqdvi106 divideint 1 7 -> 0
dqdvi107 divideint 1 8 -> 0
dqdvi108 divideint 1 9 -> 0
dqdvi109 divideint 1 10 -> 0
dqdvi110 divideint 1 1 -> 1
dqdvi111 divideint 2 1 -> 2
dqdvi112 divideint 3 1 -> 3
dqdvi113 divideint 4 1 -> 4
dqdvi114 divideint 5 1 -> 5
dqdvi115 divideint 6 1 -> 6
dqdvi116 divideint 7 1 -> 7
dqdvi117 divideint 8 1 -> 8
dqdvi118 divideint 9 1 -> 9
dqdvi119 divideint 10 1 -> 10
-- from DiagBigDecimal
dqdvi131 divideint 101.3 1 -> 101
dqdvi132 divideint 101.0 1 -> 101
dqdvi133 divideint 101.3 3 -> 33
dqdvi134 divideint 101.0 3 -> 33
dqdvi135 divideint 2.4 1 -> 2
dqdvi136 divideint 2.400 1 -> 2
dqdvi137 divideint 18 18 -> 1
dqdvi138 divideint 1120 1000 -> 1
dqdvi139 divideint 2.4 2 -> 1
dqdvi140 divideint 2.400 2 -> 1
dqdvi141 divideint 0.5 2.000 -> 0
dqdvi142 divideint 8.005 7 -> 1
dqdvi143 divideint 5 2 -> 2
dqdvi144 divideint 0 2 -> 0
dqdvi145 divideint 0.00 2 -> 0
-- Others
dqdvi150 divideint 12345 4.999 -> 2469
dqdvi151 divideint 12345 4.99 -> 2473
dqdvi152 divideint 12345 4.9 -> 2519
dqdvi153 divideint 12345 5 -> 2469
dqdvi154 divideint 12345 5.1 -> 2420
dqdvi155 divideint 12345 5.01 -> 2464
dqdvi156 divideint 12345 5.001 -> 2468
dqdvi157 divideint 101 7.6 -> 13
-- Various flavours of divideint by 0
dqdvi201 divideint 0 0 -> NaN Division_undefined
dqdvi202 divideint 0.0E5 0 -> NaN Division_undefined
dqdvi203 divideint 0.000 0 -> NaN Division_undefined
dqdvi204 divideint 0.0001 0 -> Infinity Division_by_zero
dqdvi205 divideint 0.01 0 -> Infinity Division_by_zero
dqdvi206 divideint 0.1 0 -> Infinity Division_by_zero
dqdvi207 divideint 1 0 -> Infinity Division_by_zero
dqdvi208 divideint 1 0.0 -> Infinity Division_by_zero
dqdvi209 divideint 10 0.0 -> Infinity Division_by_zero
dqdvi210 divideint 1E+100 0.0 -> Infinity Division_by_zero
dqdvi211 divideint 1E+380 0 -> Infinity Division_by_zero
dqdvi214 divideint -0.0001 0 -> -Infinity Division_by_zero
dqdvi215 divideint -0.01 0 -> -Infinity Division_by_zero
dqdvi216 divideint -0.1 0 -> -Infinity Division_by_zero
dqdvi217 divideint -1 0 -> -Infinity Division_by_zero
dqdvi218 divideint -1 0.0 -> -Infinity Division_by_zero
dqdvi219 divideint -10 0.0 -> -Infinity Division_by_zero
dqdvi220 divideint -1E+100 0.0 -> -Infinity Division_by_zero
dqdvi221 divideint -1E+380 0 -> -Infinity Division_by_zero
-- test some cases that are close to exponent overflow
dqdvi270 divideint 1 1e384 -> 0
dqdvi271 divideint 1 0.9e384 -> 0
dqdvi272 divideint 1 0.99e384 -> 0
dqdvi273 divideint 1 0.9999999999999999e384 -> 0
dqdvi274 divideint 9e384 1 -> NaN Division_impossible
dqdvi275 divideint 9.9e384 1 -> NaN Division_impossible
dqdvi276 divideint 9.99e384 1 -> NaN Division_impossible
dqdvi277 divideint 9.999999999999999e384 1 -> NaN Division_impossible
dqdvi280 divideint 0.1 9e-383 -> NaN Division_impossible
dqdvi281 divideint 0.1 99e-383 -> NaN Division_impossible
dqdvi282 divideint 0.1 999e-383 -> NaN Division_impossible
dqdvi283 divideint 0.1 9e-382 -> NaN Division_impossible
dqdvi284 divideint 0.1 99e-382 -> NaN Division_impossible
-- GD edge cases: lhs smaller than rhs but more digits
dqdvi301 divideint 0.9 2 -> 0
dqdvi302 divideint 0.9 2.0 -> 0
dqdvi303 divideint 0.9 2.1 -> 0
dqdvi304 divideint 0.9 2.00 -> 0
dqdvi305 divideint 0.9 2.01 -> 0
dqdvi306 divideint 0.12 1 -> 0
dqdvi307 divideint 0.12 1.0 -> 0
dqdvi308 divideint 0.12 1.00 -> 0
dqdvi309 divideint 0.12 1.0 -> 0
dqdvi310 divideint 0.12 1.00 -> 0
dqdvi311 divideint 0.12 2 -> 0
dqdvi312 divideint 0.12 2.0 -> 0
dqdvi313 divideint 0.12 2.1 -> 0
dqdvi314 divideint 0.12 2.00 -> 0
dqdvi315 divideint 0.12 2.01 -> 0
-- edge cases of impossible
dqdvi330 divideint 1234567987654321987654321890123456 10 -> 123456798765432198765432189012345
dqdvi331 divideint 1234567987654321987654321890123456 1 -> 1234567987654321987654321890123456
dqdvi332 divideint 1234567987654321987654321890123456 0.1 -> NaN Division_impossible
dqdvi333 divideint 1234567987654321987654321890123456 0.01 -> NaN Division_impossible
-- overflow and underflow tests [from divide]
dqdvi1051 divideint 1e+277 1e-311 -> NaN Division_impossible
dqdvi1052 divideint 1e+277 -1e-311 -> NaN Division_impossible
dqdvi1053 divideint -1e+277 1e-311 -> NaN Division_impossible
dqdvi1054 divideint -1e+277 -1e-311 -> NaN Division_impossible
dqdvi1055 divideint 1e-277 1e+311 -> 0
dqdvi1056 divideint 1e-277 -1e+311 -> -0
dqdvi1057 divideint -1e-277 1e+311 -> -0
dqdvi1058 divideint -1e-277 -1e+311 -> 0
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
dqdvi1060 divideint 1e-291 1e+101 -> 0
dqdvi1061 divideint 1e-291 1e+102 -> 0
dqdvi1062 divideint 1e-291 1e+103 -> 0
dqdvi1063 divideint 1e-291 1e+104 -> 0
dqdvi1064 divideint 1e-291 1e+105 -> 0
dqdvi1065 divideint 1e-291 1e+106 -> 0
dqdvi1066 divideint 1e-291 1e+107 -> 0
dqdvi1067 divideint 1e-291 1e+108 -> 0
dqdvi1068 divideint 1e-291 1e+109 -> 0
dqdvi1069 divideint 1e-291 1e+110 -> 0
dqdvi1101 divideint 1.0000E-394 1 -> 0
dqdvi1102 divideint 1.000E-394 1e+1 -> 0
dqdvi1103 divideint 1.00E-394 1e+2 -> 0
dqdvi1118 divideint 1E-394 1e+4 -> 0
dqdvi1119 divideint 3E-394 -1e+5 -> -0
dqdvi1120 divideint 5E-394 1e+5 -> 0
dqdvi1124 divideint 1E-394 -1e+4 -> -0
dqdvi1130 divideint 3.0E-394 -1e+5 -> -0
dqdvi1131 divideint 1.0E-199 1e+200 -> 0
dqdvi1132 divideint 1.0E-199 1e+199 -> 0
dqdvi1133 divideint 1.0E-199 1e+198 -> 0
dqdvi1134 divideint 2.0E-199 2e+198 -> 0
dqdvi1135 divideint 4.0E-199 4e+198 -> 0
-- long operand checks
dqdvi401 divideint 12345678000 100 -> 123456780
dqdvi402 divideint 1 12345678000 -> 0
dqdvi403 divideint 1234567800 10 -> 123456780
dqdvi404 divideint 1 1234567800 -> 0
dqdvi405 divideint 1234567890 10 -> 123456789
dqdvi406 divideint 1 1234567890 -> 0
dqdvi407 divideint 1234567891 10 -> 123456789
dqdvi408 divideint 1 1234567891 -> 0
dqdvi409 divideint 12345678901 100 -> 123456789
dqdvi410 divideint 1 12345678901 -> 0
dqdvi411 divideint 1234567896 10 -> 123456789
dqdvi412 divideint 1 1234567896 -> 0
dqdvi413 divideint 12345678948 100 -> 123456789
dqdvi414 divideint 12345678949 100 -> 123456789
dqdvi415 divideint 12345678950 100 -> 123456789
dqdvi416 divideint 12345678951 100 -> 123456789
dqdvi417 divideint 12345678999 100 -> 123456789
dqdvi441 divideint 12345678000 1 -> 12345678000
dqdvi442 divideint 1 12345678000 -> 0
dqdvi443 divideint 1234567800 1 -> 1234567800
dqdvi444 divideint 1 1234567800 -> 0
dqdvi445 divideint 1234567890 1 -> 1234567890
dqdvi446 divideint 1 1234567890 -> 0
dqdvi447 divideint 1234567891 1 -> 1234567891
dqdvi448 divideint 1 1234567891 -> 0
dqdvi449 divideint 12345678901 1 -> 12345678901
dqdvi450 divideint 1 12345678901 -> 0
dqdvi451 divideint 1234567896 1 -> 1234567896
dqdvi452 divideint 1 1234567896 -> 0
-- more zeros, etc.
dqdvi531 divideint 5.00 1E-3 -> 5000
dqdvi532 divideint 00.00 0.000 -> NaN Division_undefined
dqdvi533 divideint 00.00 0E-3 -> NaN Division_undefined
dqdvi534 divideint 0 -0 -> NaN Division_undefined
dqdvi535 divideint -0 0 -> NaN Division_undefined
dqdvi536 divideint -0 -0 -> NaN Division_undefined
dqdvi541 divideint 0 -1 -> -0
dqdvi542 divideint -0 -1 -> 0
dqdvi543 divideint 0 1 -> 0
dqdvi544 divideint -0 1 -> -0
dqdvi545 divideint -1 0 -> -Infinity Division_by_zero
dqdvi546 divideint -1 -0 -> Infinity Division_by_zero
dqdvi547 divideint 1 0 -> Infinity Division_by_zero
dqdvi548 divideint 1 -0 -> -Infinity Division_by_zero
dqdvi551 divideint 0.0 -1 -> -0
dqdvi552 divideint -0.0 -1 -> 0
dqdvi553 divideint 0.0 1 -> 0
dqdvi554 divideint -0.0 1 -> -0
dqdvi555 divideint -1.0 0 -> -Infinity Division_by_zero
dqdvi556 divideint -1.0 -0 -> Infinity Division_by_zero
dqdvi557 divideint 1.0 0 -> Infinity Division_by_zero
dqdvi558 divideint 1.0 -0 -> -Infinity Division_by_zero
dqdvi561 divideint 0 -1.0 -> -0
dqdvi562 divideint -0 -1.0 -> 0
dqdvi563 divideint 0 1.0 -> 0
dqdvi564 divideint -0 1.0 -> -0
dqdvi565 divideint -1 0.0 -> -Infinity Division_by_zero
dqdvi566 divideint -1 -0.0 -> Infinity Division_by_zero
dqdvi567 divideint 1 0.0 -> Infinity Division_by_zero
dqdvi568 divideint 1 -0.0 -> -Infinity Division_by_zero
dqdvi571 divideint 0.0 -1.0 -> -0
dqdvi572 divideint -0.0 -1.0 -> 0
dqdvi573 divideint 0.0 1.0 -> 0
dqdvi574 divideint -0.0 1.0 -> -0
dqdvi575 divideint -1.0 0.0 -> -Infinity Division_by_zero
dqdvi576 divideint -1.0 -0.0 -> Infinity Division_by_zero
dqdvi577 divideint 1.0 0.0 -> Infinity Division_by_zero
dqdvi578 divideint 1.0 -0.0 -> -Infinity Division_by_zero
-- Specials
dqdvi580 divideint Inf -Inf -> NaN Invalid_operation
dqdvi581 divideint Inf -1000 -> -Infinity
dqdvi582 divideint Inf -1 -> -Infinity
dqdvi583 divideint Inf -0 -> -Infinity
dqdvi584 divideint Inf 0 -> Infinity
dqdvi585 divideint Inf 1 -> Infinity
dqdvi586 divideint Inf 1000 -> Infinity
dqdvi587 divideint Inf Inf -> NaN Invalid_operation
dqdvi588 divideint -1000 Inf -> -0
dqdvi589 divideint -Inf Inf -> NaN Invalid_operation
dqdvi590 divideint -1 Inf -> -0
dqdvi591 divideint -0 Inf -> -0
dqdvi592 divideint 0 Inf -> 0
dqdvi593 divideint 1 Inf -> 0
dqdvi594 divideint 1000 Inf -> 0
dqdvi595 divideint Inf Inf -> NaN Invalid_operation
dqdvi600 divideint -Inf -Inf -> NaN Invalid_operation
dqdvi601 divideint -Inf -1000 -> Infinity
dqdvi602 divideint -Inf -1 -> Infinity
dqdvi603 divideint -Inf -0 -> Infinity
dqdvi604 divideint -Inf 0 -> -Infinity
dqdvi605 divideint -Inf 1 -> -Infinity
dqdvi606 divideint -Inf 1000 -> -Infinity
dqdvi607 divideint -Inf Inf -> NaN Invalid_operation
dqdvi608 divideint -1000 Inf -> -0
dqdvi609 divideint -Inf -Inf -> NaN Invalid_operation
dqdvi610 divideint -1 -Inf -> 0
dqdvi611 divideint -0 -Inf -> 0
dqdvi612 divideint 0 -Inf -> -0
dqdvi613 divideint 1 -Inf -> -0
dqdvi614 divideint 1000 -Inf -> -0
dqdvi615 divideint Inf -Inf -> NaN Invalid_operation
dqdvi621 divideint NaN -Inf -> NaN
dqdvi622 divideint NaN -1000 -> NaN
dqdvi623 divideint NaN -1 -> NaN
dqdvi624 divideint NaN -0 -> NaN
dqdvi625 divideint NaN 0 -> NaN
dqdvi626 divideint NaN 1 -> NaN
dqdvi627 divideint NaN 1000 -> NaN
dqdvi628 divideint NaN Inf -> NaN
dqdvi629 divideint NaN NaN -> NaN
dqdvi630 divideint -Inf NaN -> NaN
dqdvi631 divideint -1000 NaN -> NaN
dqdvi632 divideint -1 NaN -> NaN
dqdvi633 divideint -0 NaN -> NaN
dqdvi634 divideint 0 NaN -> NaN
dqdvi635 divideint 1 NaN -> NaN
dqdvi636 divideint 1000 NaN -> NaN
dqdvi637 divideint Inf NaN -> NaN
dqdvi641 divideint sNaN -Inf -> NaN Invalid_operation
dqdvi642 divideint sNaN -1000 -> NaN Invalid_operation
dqdvi643 divideint sNaN -1 -> NaN Invalid_operation
dqdvi644 divideint sNaN -0 -> NaN Invalid_operation
dqdvi645 divideint sNaN 0 -> NaN Invalid_operation
dqdvi646 divideint sNaN 1 -> NaN Invalid_operation
dqdvi647 divideint sNaN 1000 -> NaN Invalid_operation
dqdvi648 divideint sNaN NaN -> NaN Invalid_operation
dqdvi649 divideint sNaN sNaN -> NaN Invalid_operation
dqdvi650 divideint NaN sNaN -> NaN Invalid_operation
dqdvi651 divideint -Inf sNaN -> NaN Invalid_operation
dqdvi652 divideint -1000 sNaN -> NaN Invalid_operation
dqdvi653 divideint -1 sNaN -> NaN Invalid_operation
dqdvi654 divideint -0 sNaN -> NaN Invalid_operation
dqdvi655 divideint 0 sNaN -> NaN Invalid_operation
dqdvi656 divideint 1 sNaN -> NaN Invalid_operation
dqdvi657 divideint 1000 sNaN -> NaN Invalid_operation
dqdvi658 divideint Inf sNaN -> NaN Invalid_operation
dqdvi659 divideint NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqdvi661 divideint NaN9 -Inf -> NaN9
dqdvi662 divideint NaN8 1000 -> NaN8
dqdvi663 divideint NaN7 Inf -> NaN7
dqdvi664 divideint -NaN6 NaN5 -> -NaN6
dqdvi665 divideint -Inf NaN4 -> NaN4
dqdvi666 divideint -1000 NaN3 -> NaN3
dqdvi667 divideint Inf -NaN2 -> -NaN2
dqdvi671 divideint -sNaN99 -Inf -> -NaN99 Invalid_operation
dqdvi672 divideint sNaN98 -1 -> NaN98 Invalid_operation
dqdvi673 divideint sNaN97 NaN -> NaN97 Invalid_operation
dqdvi674 divideint sNaN96 sNaN94 -> NaN96 Invalid_operation
dqdvi675 divideint NaN95 sNaN93 -> NaN93 Invalid_operation
dqdvi676 divideint -Inf sNaN92 -> NaN92 Invalid_operation
dqdvi677 divideint 0 sNaN91 -> NaN91 Invalid_operation
dqdvi678 divideint Inf -sNaN90 -> -NaN90 Invalid_operation
dqdvi679 divideint NaN sNaN89 -> NaN89 Invalid_operation
-- Gyuris example
dqdvi700 divideint 8.336804418094040989630006819881709E-6143 8.336804418094040989630006819889000E-6143 -> 0
-- Null tests
dqdvi900 divideint 10 # -> NaN Invalid_operation
dqdvi901 divideint # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,245 @@
------------------------------------------------------------------------
-- dqInvert.decTest -- digitwise logical INVERT for decQuads --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check (truth table)
dqinv001 invert 0 -> 1111111111111111111111111111111111
dqinv002 invert 1 -> 1111111111111111111111111111111110
dqinv003 invert 10 -> 1111111111111111111111111111111101
dqinv004 invert 111111111 -> 1111111111111111111111111000000000
dqinv005 invert 000000000 -> 1111111111111111111111111111111111
-- and at msd and msd-1
dqinv007 invert 0000000000000000000000000000000000 -> 1111111111111111111111111111111111
dqinv008 invert 1000000000000000000000000000000000 -> 111111111111111111111111111111111
dqinv009 invert 0000000000000000000000000000000000 -> 1111111111111111111111111111111111
dqinv010 invert 0100000000000000000000000000000000 -> 1011111111111111111111111111111111
dqinv011 invert 0111111111111111111111111111111111 -> 1000000000000000000000000000000000
dqinv012 invert 1111111111111111111111111111111111 -> 0
dqinv013 invert 0011111111111111111111111111111111 -> 1100000000000000000000000000000000
dqinv014 invert 0111111111111111111111111111111111 -> 1000000000000000000000000000000000
-- Various lengths
dqinv600 invert 0111111111111111111011111111111111 -> 1000000000000000000100000000000000
dqinv601 invert 0011111111111111110101111111111111 -> 1100000000000000001010000000000000
dqinv602 invert 0101111111111111101110111111111111 -> 1010000000000000010001000000000000
dqinv603 invert 0110111111111111011111011111111111 -> 1001000000000000100000100000000000
dqinv604 invert 0111011111111110111111101111111111 -> 1000100000000001000000010000000000
dqinv605 invert 0111101111111101111111110111111111 -> 1000010000000010000000001000000000
dqinv606 invert 0111110111111011111111111011111111 -> 1000001000000100000000000100000000
dqinv607 invert 0111111011110111111111111101111111 -> 1000000100001000000000000010000000
dqinv608 invert 0111111101101111111111111110111111 -> 1000000010010000000000000001000000
dqinv609 invert 0111111110011111111111111111011111 -> 1000000001100000000000000000100000
dqinv610 invert 0111111110011111111111111111101111 -> 1000000001100000000000000000010000
dqinv611 invert 0111111101101111111111111111110111 -> 1000000010010000000000000000001000
dqinv612 invert 0111111011110111111111111111111011 -> 1000000100001000000000000000000100
dqinv613 invert 0111110111111011111111111111111101 -> 1000001000000100000000000000000010
dqinv614 invert 0111101111111101111111111111111110 -> 1000010000000010000000000000000001
dqinv615 invert 0111011111111110111111111111111111 -> 1000100000000001000000000000000000
dqinv616 invert 0110111111111111011111111111111110 -> 1001000000000000100000000000000001
dqinv617 invert 0101111111111111101111111111111101 -> 1010000000000000010000000000000010
dqinv618 invert 0011111111111111110111111111111011 -> 1100000000000000001000000000000100
dqinv619 invert 0101111111111111111011111111110111 -> 1010000000000000000100000000001000
dqinv620 invert 0110111111111111111101111111101111 -> 1001000000000000000010000000010000
dqinv621 invert 0111011111111111111110111111011111 -> 1000100000000000000001000000100000
dqinv622 invert 0111101111111111111111011110111111 -> 1000010000000000000000100001000000
dqinv623 invert 0111110111111111111111101101111111 -> 1000001000000000000000010010000000
dqinv624 invert 0111111011111111111111110011111111 -> 1000000100000000000000001100000000
dqinv625 invert 0111111101111111111111110011111111 -> 1000000010000000000000001100000000
dqinv626 invert 0111111110111111111111101101111111 -> 1000000001000000000000010010000000
dqinv627 invert 0111111111011111111111011110111111 -> 1000000000100000000000100001000000
dqinv628 invert 0111111111101111111110111111011111 -> 1000000000010000000001000000100000
dqinv629 invert 0111111111110111111101111111101111 -> 1000000000001000000010000000010000
dqinv630 invert 0111111111111011111011111111110111 -> 1000000000000100000100000000001000
dqinv631 invert 0111111111111101110111111111111011 -> 1000000000000010001000000000000100
dqinv632 invert 0111111111111110101111111111111101 -> 1000000000000001010000000000000010
dqinv633 invert 0111111111111111011111111111111110 -> 1000000000000000100000000000000001
dqinv021 invert 111111111 -> 1111111111111111111111111000000000
dqinv022 invert 111111111111 -> 1111111111111111111111000000000000
dqinv023 invert 11111111 -> 1111111111111111111111111100000000
dqinv025 invert 1111111 -> 1111111111111111111111111110000000
dqinv026 invert 111111 -> 1111111111111111111111111111000000
dqinv027 invert 11111 -> 1111111111111111111111111111100000
dqinv028 invert 1111 -> 1111111111111111111111111111110000
dqinv029 invert 111 -> 1111111111111111111111111111111000
dqinv031 invert 11 -> 1111111111111111111111111111111100
dqinv032 invert 1 -> 1111111111111111111111111111111110
dqinv033 invert 111111111111 -> 1111111111111111111111000000000000
dqinv034 invert 11111111111 -> 1111111111111111111111100000000000
dqinv035 invert 1111111111 -> 1111111111111111111111110000000000
dqinv036 invert 111111111 -> 1111111111111111111111111000000000
dqinv040 invert 011111111 -> 1111111111111111111111111100000000
dqinv041 invert 101111111 -> 1111111111111111111111111010000000
dqinv042 invert 110111111 -> 1111111111111111111111111001000000
dqinv043 invert 111011111 -> 1111111111111111111111111000100000
dqinv044 invert 111101111 -> 1111111111111111111111111000010000
dqinv045 invert 111110111 -> 1111111111111111111111111000001000
dqinv046 invert 111111011 -> 1111111111111111111111111000000100
dqinv047 invert 111111101 -> 1111111111111111111111111000000010
dqinv048 invert 111111110 -> 1111111111111111111111111000000001
dqinv049 invert 011111011 -> 1111111111111111111111111100000100
dqinv050 invert 101111101 -> 1111111111111111111111111010000010
dqinv051 invert 110111110 -> 1111111111111111111111111001000001
dqinv052 invert 111011101 -> 1111111111111111111111111000100010
dqinv053 invert 111101011 -> 1111111111111111111111111000010100
dqinv054 invert 111110111 -> 1111111111111111111111111000001000
dqinv055 invert 111101011 -> 1111111111111111111111111000010100
dqinv056 invert 111011101 -> 1111111111111111111111111000100010
dqinv057 invert 110111110 -> 1111111111111111111111111001000001
dqinv058 invert 101111101 -> 1111111111111111111111111010000010
dqinv059 invert 011111011 -> 1111111111111111111111111100000100
dqinv080 invert 1000000011111111 -> 1111111111111111110111111100000000
dqinv081 invert 0100000101111111 -> 1111111111111111111011111010000000
dqinv082 invert 0010000110111111 -> 1111111111111111111101111001000000
dqinv083 invert 0001000111011111 -> 1111111111111111111110111000100000
dqinv084 invert 0000100111101111 -> 1111111111111111111111011000010000
dqinv085 invert 0000010111110111 -> 1111111111111111111111101000001000
dqinv086 invert 0000001111111011 -> 1111111111111111111111110000000100
dqinv087 invert 0000010111111101 -> 1111111111111111111111101000000010
dqinv088 invert 0000100111111110 -> 1111111111111111111111011000000001
dqinv089 invert 0001000011111011 -> 1111111111111111111110111100000100
dqinv090 invert 0010000101111101 -> 1111111111111111111101111010000010
dqinv091 invert 0100000110111110 -> 1111111111111111111011111001000001
dqinv092 invert 1000000111011101 -> 1111111111111111110111111000100010
dqinv093 invert 0100000111101011 -> 1111111111111111111011111000010100
dqinv094 invert 0010000111110111 -> 1111111111111111111101111000001000
dqinv095 invert 0001000111101011 -> 1111111111111111111110111000010100
dqinv096 invert 0000100111011101 -> 1111111111111111111111011000100010
dqinv097 invert 0000010110111110 -> 1111111111111111111111101001000001
dqinv098 invert 0000001101111101 -> 1111111111111111111111110010000010
dqinv099 invert 0000010011111011 -> 1111111111111111111111101100000100
-- and more thorough MSD/LSD tests [8 and 9 mght be encoded differently...]
dqinv151 invert 1111111111111111111111111111111110 -> 1
dqinv152 invert 1111111111111111110000000000000000 -> 1111111111111111
dqinv153 invert 1000000000000000001111111111111111 -> 111111111111111110000000000000000
dqinv154 invert 1111111111111111111000000000000000 -> 111111111111111
dqinv155 invert 0100000000000000000111111111111111 -> 1011111111111111111000000000000000
dqinv156 invert 1011111111111111110100000000000000 -> 100000000000000001011111111111111
dqinv157 invert 1101111111111111110111111111111111 -> 10000000000000001000000000000000
dqinv158 invert 1110111111111111110011111111111111 -> 1000000000000001100000000000000
-- non-0/1 should not be accepted, nor should signs
dqinv220 invert 111111112 -> NaN Invalid_operation
dqinv221 invert 333333333 -> NaN Invalid_operation
dqinv222 invert 555555555 -> NaN Invalid_operation
dqinv223 invert 777777777 -> NaN Invalid_operation
dqinv224 invert 999999999 -> NaN Invalid_operation
dqinv225 invert 222222222 -> NaN Invalid_operation
dqinv226 invert 444444444 -> NaN Invalid_operation
dqinv227 invert 666666666 -> NaN Invalid_operation
dqinv228 invert 888888888 -> NaN Invalid_operation
dqinv229 invert 999999999 -> NaN Invalid_operation
dqinv230 invert 999999999 -> NaN Invalid_operation
dqinv231 invert 999999999 -> NaN Invalid_operation
dqinv232 invert 999999999 -> NaN Invalid_operation
-- a few randoms
dqinv240 invert 567468689 -> NaN Invalid_operation
dqinv241 invert 567367689 -> NaN Invalid_operation
dqinv242 invert -631917772 -> NaN Invalid_operation
dqinv243 invert -756253257 -> NaN Invalid_operation
dqinv244 invert 835590149 -> NaN Invalid_operation
-- test MSD
dqinv250 invert 2000000111000111000111000000000000 -> NaN Invalid_operation
dqinv251 invert 3000000111000111000111000000000000 -> NaN Invalid_operation
dqinv252 invert 4000000111000111000111000000000000 -> NaN Invalid_operation
dqinv253 invert 5000000111000111000111000000000000 -> NaN Invalid_operation
dqinv254 invert 6000000111000111000111000000000000 -> NaN Invalid_operation
dqinv255 invert 7000000111000111000111000000000000 -> NaN Invalid_operation
dqinv256 invert 8000000111000111000111000000000000 -> NaN Invalid_operation
dqinv257 invert 9000000111000111000111000000000000 -> NaN Invalid_operation
-- test MSD-1
dqinv270 invert 0200000111000111000111001000000000 -> NaN Invalid_operation
dqinv271 invert 0300000111000111000111000100000000 -> NaN Invalid_operation
dqinv272 invert 0400000111000111000111000010000000 -> NaN Invalid_operation
dqinv273 invert 0500000111000111000111000001000000 -> NaN Invalid_operation
dqinv274 invert 1600000111000111000111000000100000 -> NaN Invalid_operation
dqinv275 invert 1700000111000111000111000000010000 -> NaN Invalid_operation
dqinv276 invert 1800000111000111000111000000001000 -> NaN Invalid_operation
dqinv277 invert 1900000111000111000111000000000100 -> NaN Invalid_operation
-- test LSD
dqinv280 invert 0010000111000111000111000000000002 -> NaN Invalid_operation
dqinv281 invert 0001000111000111000111000000000003 -> NaN Invalid_operation
dqinv282 invert 0000000111000111000111100000000004 -> NaN Invalid_operation
dqinv283 invert 0000000111000111000111010000000005 -> NaN Invalid_operation
dqinv284 invert 1000000111000111000111001000000006 -> NaN Invalid_operation
dqinv285 invert 1000000111000111000111000100000007 -> NaN Invalid_operation
dqinv286 invert 1000000111000111000111000010000008 -> NaN Invalid_operation
dqinv287 invert 1000000111000111000111000001000009 -> NaN Invalid_operation
-- test Middie
dqinv288 invert 0010000111000111000111000020000000 -> NaN Invalid_operation
dqinv289 invert 0001000111000111000111000030000001 -> NaN Invalid_operation
dqinv290 invert 0000000111000111000111100040000010 -> NaN Invalid_operation
dqinv291 invert 0000000111000111000111010050000100 -> NaN Invalid_operation
dqinv292 invert 1000000111000111000111001060001000 -> NaN Invalid_operation
dqinv293 invert 1000000111000111000111000170010000 -> NaN Invalid_operation
dqinv294 invert 1000000111000111000111000080100000 -> NaN Invalid_operation
dqinv295 invert 1000000111000111000111000091000000 -> NaN Invalid_operation
-- signs
dqinv296 invert -1000000111000111000111000001000000 -> NaN Invalid_operation
dqinv299 invert 1000000111000111000111000001000000 -> 111111000111000111000111110111111
-- Nmax, Nmin, Ntiny-like
dqinv341 invert 9.99999999E+2998 -> NaN Invalid_operation
dqinv342 invert 1E-2998 -> NaN Invalid_operation
dqinv343 invert 1.00000000E-2998 -> NaN Invalid_operation
dqinv344 invert 1E-2078 -> NaN Invalid_operation
dqinv345 invert -1E-2078 -> NaN Invalid_operation
dqinv346 invert -1.00000000E-2998 -> NaN Invalid_operation
dqinv347 invert -1E-2998 -> NaN Invalid_operation
dqinv348 invert -9.99999999E+2998 -> NaN Invalid_operation
-- A few other non-integers
dqinv361 invert 1.0 -> NaN Invalid_operation
dqinv362 invert 1E+1 -> NaN Invalid_operation
dqinv363 invert 0.0 -> NaN Invalid_operation
dqinv364 invert 0E+1 -> NaN Invalid_operation
dqinv365 invert 9.9 -> NaN Invalid_operation
dqinv366 invert 9E+1 -> NaN Invalid_operation
-- All Specials are in error
dqinv788 invert -Inf -> NaN Invalid_operation
dqinv794 invert Inf -> NaN Invalid_operation
dqinv821 invert NaN -> NaN Invalid_operation
dqinv841 invert sNaN -> NaN Invalid_operation
-- propagating NaNs
dqinv861 invert NaN1 -> NaN Invalid_operation
dqinv862 invert +NaN2 -> NaN Invalid_operation
dqinv863 invert NaN3 -> NaN Invalid_operation
dqinv864 invert NaN4 -> NaN Invalid_operation
dqinv865 invert NaN5 -> NaN Invalid_operation
dqinv871 invert sNaN11 -> NaN Invalid_operation
dqinv872 invert sNaN12 -> NaN Invalid_operation
dqinv873 invert sNaN13 -> NaN Invalid_operation
dqinv874 invert sNaN14 -> NaN Invalid_operation
dqinv875 invert sNaN15 -> NaN Invalid_operation
dqinv876 invert NaN16 -> NaN Invalid_operation
dqinv881 invert +NaN25 -> NaN Invalid_operation
dqinv882 invert -NaN26 -> NaN Invalid_operation
dqinv883 invert -sNaN27 -> NaN Invalid_operation

View File

@@ -0,0 +1,160 @@
------------------------------------------------------------------------
-- dqLogB.decTest -- integral 754r adjusted exponent, for decQuads --
-- Copyright (c) IBM Corporation, 2005, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- basics
dqlogb000 logb 0 -> -Infinity Division_by_zero
dqlogb001 logb 1E-6176 -> -6176
dqlogb002 logb 1E-6143 -> -6143
dqlogb003 logb 0.001 -> -3
dqlogb004 logb 0.03 -> -2
dqlogb005 logb 1 -> 0
dqlogb006 logb 2 -> 0
dqlogb007 logb 2.5 -> 0
dqlogb008 logb 2.50 -> 0
dqlogb009 logb 2.500 -> 0
dqlogb010 logb 10 -> 1
dqlogb011 logb 70 -> 1
dqlogb012 logb 100 -> 2
dqlogb013 logb 250 -> 2
dqlogb014 logb 9E+6144 -> 6144
dqlogb015 logb +Infinity -> Infinity
-- negatives appear to be treated as positives
dqlogb021 logb -0 -> -Infinity Division_by_zero
dqlogb022 logb -1E-6176 -> -6176
dqlogb023 logb -9E-6143 -> -6143
dqlogb024 logb -0.001 -> -3
dqlogb025 logb -1 -> 0
dqlogb026 logb -2 -> 0
dqlogb027 logb -10 -> 1
dqlogb028 logb -70 -> 1
dqlogb029 logb -100 -> 2
dqlogb030 logb -9E+6144 -> 6144
dqlogb031 logb -Infinity -> Infinity
-- zeros
dqlogb111 logb 0 -> -Infinity Division_by_zero
dqlogb112 logb -0 -> -Infinity Division_by_zero
dqlogb113 logb 0E+4 -> -Infinity Division_by_zero
dqlogb114 logb -0E+4 -> -Infinity Division_by_zero
dqlogb115 logb 0.0000 -> -Infinity Division_by_zero
dqlogb116 logb -0.0000 -> -Infinity Division_by_zero
dqlogb117 logb 0E-141 -> -Infinity Division_by_zero
dqlogb118 logb -0E-141 -> -Infinity Division_by_zero
-- full coefficients, alternating bits
dqlogb121 logb 268268268 -> 8
dqlogb122 logb -268268268 -> 8
dqlogb123 logb 134134134 -> 8
dqlogb124 logb -134134134 -> 8
-- Nmax, Nmin, Ntiny
dqlogb131 logb 9.999999999999999999999999999999999E+6144 -> 6144
dqlogb132 logb 1E-6143 -> -6143
dqlogb133 logb 1.000000000000000000000000000000000E-6143 -> -6143
dqlogb134 logb 1E-6176 -> -6176
dqlogb135 logb -1E-6176 -> -6176
dqlogb136 logb -1.000000000000000000000000000000000E-6143 -> -6143
dqlogb137 logb -1E-6143 -> -6143
dqlogb1614 logb -9.999999999999999999999999999999999E+6144 -> 6144
-- ones
dqlogb0061 logb 1 -> 0
dqlogb0062 logb 1.0 -> 0
dqlogb0063 logb 1.000000000000000 -> 0
-- notable cases -- exact powers of 10
dqlogb1100 logb 1 -> 0
dqlogb1101 logb 10 -> 1
dqlogb1102 logb 100 -> 2
dqlogb1103 logb 1000 -> 3
dqlogb1104 logb 10000 -> 4
dqlogb1105 logb 100000 -> 5
dqlogb1106 logb 1000000 -> 6
dqlogb1107 logb 10000000 -> 7
dqlogb1108 logb 100000000 -> 8
dqlogb1109 logb 1000000000 -> 9
dqlogb1110 logb 10000000000 -> 10
dqlogb1111 logb 100000000000 -> 11
dqlogb1112 logb 1000000000000 -> 12
dqlogb1113 logb 0.00000000001 -> -11
dqlogb1114 logb 0.0000000001 -> -10
dqlogb1115 logb 0.000000001 -> -9
dqlogb1116 logb 0.00000001 -> -8
dqlogb1117 logb 0.0000001 -> -7
dqlogb1118 logb 0.000001 -> -6
dqlogb1119 logb 0.00001 -> -5
dqlogb1120 logb 0.0001 -> -4
dqlogb1121 logb 0.001 -> -3
dqlogb1122 logb 0.01 -> -2
dqlogb1123 logb 0.1 -> -1
dqlogb1124 logb 1E-99 -> -99
dqlogb1125 logb 1E-100 -> -100
dqlogb1127 logb 1E-299 -> -299
dqlogb1126 logb 1E-6143 -> -6143
-- suggestions from Ilan Nehama
dqlogb1400 logb 10E-3 -> -2
dqlogb1401 logb 10E-2 -> -1
dqlogb1402 logb 100E-2 -> 0
dqlogb1403 logb 1000E-2 -> 1
dqlogb1404 logb 10000E-2 -> 2
dqlogb1405 logb 10E-1 -> 0
dqlogb1406 logb 100E-1 -> 1
dqlogb1407 logb 1000E-1 -> 2
dqlogb1408 logb 10000E-1 -> 3
dqlogb1409 logb 10E0 -> 1
dqlogb1410 logb 100E0 -> 2
dqlogb1411 logb 1000E0 -> 3
dqlogb1412 logb 10000E0 -> 4
dqlogb1413 logb 10E1 -> 2
dqlogb1414 logb 100E1 -> 3
dqlogb1415 logb 1000E1 -> 4
dqlogb1416 logb 10000E1 -> 5
dqlogb1417 logb 10E2 -> 3
dqlogb1418 logb 100E2 -> 4
dqlogb1419 logb 1000E2 -> 5
dqlogb1420 logb 10000E2 -> 6
-- special values
dqlogb820 logb Infinity -> Infinity
dqlogb821 logb 0 -> -Infinity Division_by_zero
dqlogb822 logb NaN -> NaN
dqlogb823 logb sNaN -> NaN Invalid_operation
-- propagating NaNs
dqlogb824 logb sNaN123 -> NaN123 Invalid_operation
dqlogb825 logb -sNaN321 -> -NaN321 Invalid_operation
dqlogb826 logb NaN456 -> NaN456
dqlogb827 logb -NaN654 -> -NaN654
dqlogb828 logb NaN1 -> NaN1
-- Null test
dqlogb900 logb # -> NaN Invalid_operation

View File

@@ -0,0 +1,304 @@
------------------------------------------------------------------------
-- dqMaxMag.decTest -- decQuad maxnummag --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- we assume that base comparison is tested in compare.decTest, so
-- these mainly cover special cases and rounding
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqmxg001 maxmag -2 -2 -> -2
dqmxg002 maxmag -2 -1 -> -2
dqmxg003 maxmag -2 0 -> -2
dqmxg004 maxmag -2 1 -> -2
dqmxg005 maxmag -2 2 -> 2
dqmxg006 maxmag -1 -2 -> -2
dqmxg007 maxmag -1 -1 -> -1
dqmxg008 maxmag -1 0 -> -1
dqmxg009 maxmag -1 1 -> 1
dqmxg010 maxmag -1 2 -> 2
dqmxg011 maxmag 0 -2 -> -2
dqmxg012 maxmag 0 -1 -> -1
dqmxg013 maxmag 0 0 -> 0
dqmxg014 maxmag 0 1 -> 1
dqmxg015 maxmag 0 2 -> 2
dqmxg016 maxmag 1 -2 -> -2
dqmxg017 maxmag 1 -1 -> 1
dqmxg018 maxmag 1 0 -> 1
dqmxg019 maxmag 1 1 -> 1
dqmxg020 maxmag 1 2 -> 2
dqmxg021 maxmag 2 -2 -> 2
dqmxg022 maxmag 2 -1 -> 2
dqmxg023 maxmag 2 0 -> 2
dqmxg025 maxmag 2 1 -> 2
dqmxg026 maxmag 2 2 -> 2
-- extended zeros
dqmxg030 maxmag 0 0 -> 0
dqmxg031 maxmag 0 -0 -> 0
dqmxg032 maxmag 0 -0.0 -> 0
dqmxg033 maxmag 0 0.0 -> 0
dqmxg034 maxmag -0 0 -> 0 -- note: -0 = 0, but 0 chosen
dqmxg035 maxmag -0 -0 -> -0
dqmxg036 maxmag -0 -0.0 -> -0.0
dqmxg037 maxmag -0 0.0 -> 0.0
dqmxg038 maxmag 0.0 0 -> 0
dqmxg039 maxmag 0.0 -0 -> 0.0
dqmxg040 maxmag 0.0 -0.0 -> 0.0
dqmxg041 maxmag 0.0 0.0 -> 0.0
dqmxg042 maxmag -0.0 0 -> 0
dqmxg043 maxmag -0.0 -0 -> -0.0
dqmxg044 maxmag -0.0 -0.0 -> -0.0
dqmxg045 maxmag -0.0 0.0 -> 0.0
dqmxg050 maxmag -0E1 0E1 -> 0E+1
dqmxg051 maxmag -0E2 0E2 -> 0E+2
dqmxg052 maxmag -0E2 0E1 -> 0E+1
dqmxg053 maxmag -0E1 0E2 -> 0E+2
dqmxg054 maxmag 0E1 -0E1 -> 0E+1
dqmxg055 maxmag 0E2 -0E2 -> 0E+2
dqmxg056 maxmag 0E2 -0E1 -> 0E+2
dqmxg057 maxmag 0E1 -0E2 -> 0E+1
dqmxg058 maxmag 0E1 0E1 -> 0E+1
dqmxg059 maxmag 0E2 0E2 -> 0E+2
dqmxg060 maxmag 0E2 0E1 -> 0E+2
dqmxg061 maxmag 0E1 0E2 -> 0E+2
dqmxg062 maxmag -0E1 -0E1 -> -0E+1
dqmxg063 maxmag -0E2 -0E2 -> -0E+2
dqmxg064 maxmag -0E2 -0E1 -> -0E+1
dqmxg065 maxmag -0E1 -0E2 -> -0E+1
-- Specials
dqmxg090 maxmag Inf -Inf -> Infinity
dqmxg091 maxmag Inf -1000 -> Infinity
dqmxg092 maxmag Inf -1 -> Infinity
dqmxg093 maxmag Inf -0 -> Infinity
dqmxg094 maxmag Inf 0 -> Infinity
dqmxg095 maxmag Inf 1 -> Infinity
dqmxg096 maxmag Inf 1000 -> Infinity
dqmxg097 maxmag Inf Inf -> Infinity
dqmxg098 maxmag -1000 Inf -> Infinity
dqmxg099 maxmag -Inf Inf -> Infinity
dqmxg100 maxmag -1 Inf -> Infinity
dqmxg101 maxmag -0 Inf -> Infinity
dqmxg102 maxmag 0 Inf -> Infinity
dqmxg103 maxmag 1 Inf -> Infinity
dqmxg104 maxmag 1000 Inf -> Infinity
dqmxg105 maxmag Inf Inf -> Infinity
dqmxg120 maxmag -Inf -Inf -> -Infinity
dqmxg121 maxmag -Inf -1000 -> -Infinity
dqmxg122 maxmag -Inf -1 -> -Infinity
dqmxg123 maxmag -Inf -0 -> -Infinity
dqmxg124 maxmag -Inf 0 -> -Infinity
dqmxg125 maxmag -Inf 1 -> -Infinity
dqmxg126 maxmag -Inf 1000 -> -Infinity
dqmxg127 maxmag -Inf Inf -> Infinity
dqmxg128 maxmag -Inf -Inf -> -Infinity
dqmxg129 maxmag -1000 -Inf -> -Infinity
dqmxg130 maxmag -1 -Inf -> -Infinity
dqmxg131 maxmag -0 -Inf -> -Infinity
dqmxg132 maxmag 0 -Inf -> -Infinity
dqmxg133 maxmag 1 -Inf -> -Infinity
dqmxg134 maxmag 1000 -Inf -> -Infinity
dqmxg135 maxmag Inf -Inf -> Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
dqmxg141 maxmag NaN -Inf -> -Infinity
dqmxg142 maxmag NaN -1000 -> -1000
dqmxg143 maxmag NaN -1 -> -1
dqmxg144 maxmag NaN -0 -> -0
dqmxg145 maxmag NaN 0 -> 0
dqmxg146 maxmag NaN 1 -> 1
dqmxg147 maxmag NaN 1000 -> 1000
dqmxg148 maxmag NaN Inf -> Infinity
dqmxg149 maxmag NaN NaN -> NaN
dqmxg150 maxmag -Inf NaN -> -Infinity
dqmxg151 maxmag -1000 NaN -> -1000
dqmxg152 maxmag -1 NaN -> -1
dqmxg153 maxmag -0 NaN -> -0
dqmxg154 maxmag 0 NaN -> 0
dqmxg155 maxmag 1 NaN -> 1
dqmxg156 maxmag 1000 NaN -> 1000
dqmxg157 maxmag Inf NaN -> Infinity
dqmxg161 maxmag sNaN -Inf -> NaN Invalid_operation
dqmxg162 maxmag sNaN -1000 -> NaN Invalid_operation
dqmxg163 maxmag sNaN -1 -> NaN Invalid_operation
dqmxg164 maxmag sNaN -0 -> NaN Invalid_operation
dqmxg165 maxmag sNaN 0 -> NaN Invalid_operation
dqmxg166 maxmag sNaN 1 -> NaN Invalid_operation
dqmxg167 maxmag sNaN 1000 -> NaN Invalid_operation
dqmxg168 maxmag sNaN NaN -> NaN Invalid_operation
dqmxg169 maxmag sNaN sNaN -> NaN Invalid_operation
dqmxg170 maxmag NaN sNaN -> NaN Invalid_operation
dqmxg171 maxmag -Inf sNaN -> NaN Invalid_operation
dqmxg172 maxmag -1000 sNaN -> NaN Invalid_operation
dqmxg173 maxmag -1 sNaN -> NaN Invalid_operation
dqmxg174 maxmag -0 sNaN -> NaN Invalid_operation
dqmxg175 maxmag 0 sNaN -> NaN Invalid_operation
dqmxg176 maxmag 1 sNaN -> NaN Invalid_operation
dqmxg177 maxmag 1000 sNaN -> NaN Invalid_operation
dqmxg178 maxmag Inf sNaN -> NaN Invalid_operation
dqmxg179 maxmag NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqmxg181 maxmag NaN9 -Inf -> -Infinity
dqmxg182 maxmag NaN8 9 -> 9
dqmxg183 maxmag -NaN7 Inf -> Infinity
dqmxg184 maxmag -NaN1 NaN11 -> -NaN1
dqmxg185 maxmag NaN2 NaN12 -> NaN2
dqmxg186 maxmag -NaN13 -NaN7 -> -NaN13
dqmxg187 maxmag NaN14 -NaN5 -> NaN14
dqmxg188 maxmag -Inf NaN4 -> -Infinity
dqmxg189 maxmag -9 -NaN3 -> -9
dqmxg190 maxmag Inf NaN2 -> Infinity
dqmxg191 maxmag sNaN99 -Inf -> NaN99 Invalid_operation
dqmxg192 maxmag sNaN98 -1 -> NaN98 Invalid_operation
dqmxg193 maxmag -sNaN97 NaN -> -NaN97 Invalid_operation
dqmxg194 maxmag sNaN96 sNaN94 -> NaN96 Invalid_operation
dqmxg195 maxmag NaN95 sNaN93 -> NaN93 Invalid_operation
dqmxg196 maxmag -Inf sNaN92 -> NaN92 Invalid_operation
dqmxg197 maxmag 0 sNaN91 -> NaN91 Invalid_operation
dqmxg198 maxmag Inf -sNaN90 -> -NaN90 Invalid_operation
dqmxg199 maxmag NaN sNaN89 -> NaN89 Invalid_operation
-- old rounding checks
dqmxg221 maxmag 12345678000 1 -> 12345678000
dqmxg222 maxmag 1 12345678000 -> 12345678000
dqmxg223 maxmag 1234567800 1 -> 1234567800
dqmxg224 maxmag 1 1234567800 -> 1234567800
dqmxg225 maxmag 1234567890 1 -> 1234567890
dqmxg226 maxmag 1 1234567890 -> 1234567890
dqmxg227 maxmag 1234567891 1 -> 1234567891
dqmxg228 maxmag 1 1234567891 -> 1234567891
dqmxg229 maxmag 12345678901 1 -> 12345678901
dqmxg230 maxmag 1 12345678901 -> 12345678901
dqmxg231 maxmag 1234567896 1 -> 1234567896
dqmxg232 maxmag 1 1234567896 -> 1234567896
dqmxg233 maxmag -1234567891 1 -> -1234567891
dqmxg234 maxmag 1 -1234567891 -> -1234567891
dqmxg235 maxmag -12345678901 1 -> -12345678901
dqmxg236 maxmag 1 -12345678901 -> -12345678901
dqmxg237 maxmag -1234567896 1 -> -1234567896
dqmxg238 maxmag 1 -1234567896 -> -1234567896
-- from examples
dqmxg280 maxmag '3' '2' -> '3'
dqmxg281 maxmag '-10' '3' -> '-10'
dqmxg282 maxmag '1.0' '1' -> '1'
dqmxg283 maxmag '1' '1.0' -> '1'
dqmxg284 maxmag '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
dqmxg401 maxmag Inf 1.1 -> Infinity
dqmxg402 maxmag 1.1 1 -> 1.1
dqmxg403 maxmag 1 1.0 -> 1
dqmxg404 maxmag 1.0 0.1 -> 1.0
dqmxg405 maxmag 0.1 0.10 -> 0.1
dqmxg406 maxmag 0.10 0.100 -> 0.10
dqmxg407 maxmag 0.10 0 -> 0.10
dqmxg408 maxmag 0 0.0 -> 0
dqmxg409 maxmag 0.0 -0 -> 0.0
dqmxg410 maxmag 0.0 -0.0 -> 0.0
dqmxg411 maxmag 0.00 -0.0 -> 0.00
dqmxg412 maxmag 0.0 -0.00 -> 0.0
dqmxg413 maxmag 0 -0.0 -> 0
dqmxg414 maxmag 0 -0 -> 0
dqmxg415 maxmag -0.0 -0 -> -0.0
dqmxg416 maxmag -0 -0.100 -> -0.100
dqmxg417 maxmag -0.100 -0.10 -> -0.100
dqmxg418 maxmag -0.10 -0.1 -> -0.10
dqmxg419 maxmag -0.1 -1.0 -> -1.0
dqmxg420 maxmag -1.0 -1 -> -1.0
dqmxg421 maxmag -1 -1.1 -> -1.1
dqmxg423 maxmag -1.1 -Inf -> -Infinity
-- same with operands reversed
dqmxg431 maxmag 1.1 Inf -> Infinity
dqmxg432 maxmag 1 1.1 -> 1.1
dqmxg433 maxmag 1.0 1 -> 1
dqmxg434 maxmag 0.1 1.0 -> 1.0
dqmxg435 maxmag 0.10 0.1 -> 0.1
dqmxg436 maxmag 0.100 0.10 -> 0.10
dqmxg437 maxmag 0 0.10 -> 0.10
dqmxg438 maxmag 0.0 0 -> 0
dqmxg439 maxmag -0 0.0 -> 0.0
dqmxg440 maxmag -0.0 0.0 -> 0.0
dqmxg441 maxmag -0.0 0.00 -> 0.00
dqmxg442 maxmag -0.00 0.0 -> 0.0
dqmxg443 maxmag -0.0 0 -> 0
dqmxg444 maxmag -0 0 -> 0
dqmxg445 maxmag -0 -0.0 -> -0.0
dqmxg446 maxmag -0.100 -0 -> -0.100
dqmxg447 maxmag -0.10 -0.100 -> -0.100
dqmxg448 maxmag -0.1 -0.10 -> -0.10
dqmxg449 maxmag -1.0 -0.1 -> -1.0
dqmxg450 maxmag -1 -1.0 -> -1.0
dqmxg451 maxmag -1.1 -1 -> -1.1
dqmxg453 maxmag -Inf -1.1 -> -Infinity
-- largies
dqmxg460 maxmag 1000 1E+3 -> 1E+3
dqmxg461 maxmag 1E+3 1000 -> 1E+3
dqmxg462 maxmag 1000 -1E+3 -> 1000
dqmxg463 maxmag 1E+3 -1000 -> 1E+3
dqmxg464 maxmag -1000 1E+3 -> 1E+3
dqmxg465 maxmag -1E+3 1000 -> 1000
dqmxg466 maxmag -1000 -1E+3 -> -1000
dqmxg467 maxmag -1E+3 -1000 -> -1000
-- subnormals
dqmxg510 maxmag 1.00E-6143 0 -> 1.00E-6143
dqmxg511 maxmag 0.1E-6143 0 -> 1E-6144 Subnormal
dqmxg512 maxmag 0.10E-6143 0 -> 1.0E-6144 Subnormal
dqmxg513 maxmag 0.100E-6143 0 -> 1.00E-6144 Subnormal
dqmxg514 maxmag 0.01E-6143 0 -> 1E-6145 Subnormal
dqmxg515 maxmag 0.999E-6143 0 -> 9.99E-6144 Subnormal
dqmxg516 maxmag 0.099E-6143 0 -> 9.9E-6145 Subnormal
dqmxg517 maxmag 0.009E-6143 0 -> 9E-6146 Subnormal
dqmxg518 maxmag 0.001E-6143 0 -> 1E-6146 Subnormal
dqmxg519 maxmag 0.0009E-6143 0 -> 9E-6147 Subnormal
dqmxg520 maxmag 0.0001E-6143 0 -> 1E-6147 Subnormal
dqmxg530 maxmag -1.00E-6143 0 -> -1.00E-6143
dqmxg531 maxmag -0.1E-6143 0 -> -1E-6144 Subnormal
dqmxg532 maxmag -0.10E-6143 0 -> -1.0E-6144 Subnormal
dqmxg533 maxmag -0.100E-6143 0 -> -1.00E-6144 Subnormal
dqmxg534 maxmag -0.01E-6143 0 -> -1E-6145 Subnormal
dqmxg535 maxmag -0.999E-6143 0 -> -9.99E-6144 Subnormal
dqmxg536 maxmag -0.099E-6143 0 -> -9.9E-6145 Subnormal
dqmxg537 maxmag -0.009E-6143 0 -> -9E-6146 Subnormal
dqmxg538 maxmag -0.001E-6143 0 -> -1E-6146 Subnormal
dqmxg539 maxmag -0.0009E-6143 0 -> -9E-6147 Subnormal
dqmxg540 maxmag -0.0001E-6143 0 -> -1E-6147 Subnormal
-- Null tests
dqmxg900 maxmag 10 # -> NaN Invalid_operation
dqmxg901 maxmag # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,309 @@
------------------------------------------------------------------------
-- dqMin.decTest -- decQuad minnum --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- we assume that base comparison is tested in compare.decTest, so
-- these mainly cover special cases and rounding
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqmin001 min -2 -2 -> -2
dqmin002 min -2 -1 -> -2
dqmin003 min -2 0 -> -2
dqmin004 min -2 1 -> -2
dqmin005 min -2 2 -> -2
dqmin006 min -1 -2 -> -2
dqmin007 min -1 -1 -> -1
dqmin008 min -1 0 -> -1
dqmin009 min -1 1 -> -1
dqmin010 min -1 2 -> -1
dqmin011 min 0 -2 -> -2
dqmin012 min 0 -1 -> -1
dqmin013 min 0 0 -> 0
dqmin014 min 0 1 -> 0
dqmin015 min 0 2 -> 0
dqmin016 min 1 -2 -> -2
dqmin017 min 1 -1 -> -1
dqmin018 min 1 0 -> 0
dqmin019 min 1 1 -> 1
dqmin020 min 1 2 -> 1
dqmin021 min 2 -2 -> -2
dqmin022 min 2 -1 -> -1
dqmin023 min 2 0 -> 0
dqmin025 min 2 1 -> 1
dqmin026 min 2 2 -> 2
-- extended zeros
dqmin030 min 0 0 -> 0
dqmin031 min 0 -0 -> -0
dqmin032 min 0 -0.0 -> -0.0
dqmin033 min 0 0.0 -> 0.0
dqmin034 min -0 0 -> -0
dqmin035 min -0 -0 -> -0
dqmin036 min -0 -0.0 -> -0
dqmin037 min -0 0.0 -> -0
dqmin038 min 0.0 0 -> 0.0
dqmin039 min 0.0 -0 -> -0
dqmin040 min 0.0 -0.0 -> -0.0
dqmin041 min 0.0 0.0 -> 0.0
dqmin042 min -0.0 0 -> -0.0
dqmin043 min -0.0 -0 -> -0
dqmin044 min -0.0 -0.0 -> -0.0
dqmin045 min -0.0 0.0 -> -0.0
dqmin046 min 0E1 -0E1 -> -0E+1
dqmin047 min -0E1 0E2 -> -0E+1
dqmin048 min 0E2 0E1 -> 0E+1
dqmin049 min 0E1 0E2 -> 0E+1
dqmin050 min -0E3 -0E2 -> -0E+3
dqmin051 min -0E2 -0E3 -> -0E+3
-- Specials
dqmin090 min Inf -Inf -> -Infinity
dqmin091 min Inf -1000 -> -1000
dqmin092 min Inf -1 -> -1
dqmin093 min Inf -0 -> -0
dqmin094 min Inf 0 -> 0
dqmin095 min Inf 1 -> 1
dqmin096 min Inf 1000 -> 1000
dqmin097 min Inf Inf -> Infinity
dqmin098 min -1000 Inf -> -1000
dqmin099 min -Inf Inf -> -Infinity
dqmin100 min -1 Inf -> -1
dqmin101 min -0 Inf -> -0
dqmin102 min 0 Inf -> 0
dqmin103 min 1 Inf -> 1
dqmin104 min 1000 Inf -> 1000
dqmin105 min Inf Inf -> Infinity
dqmin120 min -Inf -Inf -> -Infinity
dqmin121 min -Inf -1000 -> -Infinity
dqmin122 min -Inf -1 -> -Infinity
dqmin123 min -Inf -0 -> -Infinity
dqmin124 min -Inf 0 -> -Infinity
dqmin125 min -Inf 1 -> -Infinity
dqmin126 min -Inf 1000 -> -Infinity
dqmin127 min -Inf Inf -> -Infinity
dqmin128 min -Inf -Inf -> -Infinity
dqmin129 min -1000 -Inf -> -Infinity
dqmin130 min -1 -Inf -> -Infinity
dqmin131 min -0 -Inf -> -Infinity
dqmin132 min 0 -Inf -> -Infinity
dqmin133 min 1 -Inf -> -Infinity
dqmin134 min 1000 -Inf -> -Infinity
dqmin135 min Inf -Inf -> -Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
dqmin141 min NaN -Inf -> -Infinity
dqmin142 min NaN -1000 -> -1000
dqmin143 min NaN -1 -> -1
dqmin144 min NaN -0 -> -0
dqmin145 min NaN 0 -> 0
dqmin146 min NaN 1 -> 1
dqmin147 min NaN 1000 -> 1000
dqmin148 min NaN Inf -> Infinity
dqmin149 min NaN NaN -> NaN
dqmin150 min -Inf NaN -> -Infinity
dqmin151 min -1000 NaN -> -1000
dqmin152 min -1 -NaN -> -1
dqmin153 min -0 NaN -> -0
dqmin154 min 0 -NaN -> 0
dqmin155 min 1 NaN -> 1
dqmin156 min 1000 NaN -> 1000
dqmin157 min Inf NaN -> Infinity
dqmin161 min sNaN -Inf -> NaN Invalid_operation
dqmin162 min sNaN -1000 -> NaN Invalid_operation
dqmin163 min sNaN -1 -> NaN Invalid_operation
dqmin164 min sNaN -0 -> NaN Invalid_operation
dqmin165 min -sNaN 0 -> -NaN Invalid_operation
dqmin166 min -sNaN 1 -> -NaN Invalid_operation
dqmin167 min sNaN 1000 -> NaN Invalid_operation
dqmin168 min sNaN NaN -> NaN Invalid_operation
dqmin169 min sNaN sNaN -> NaN Invalid_operation
dqmin170 min NaN sNaN -> NaN Invalid_operation
dqmin171 min -Inf sNaN -> NaN Invalid_operation
dqmin172 min -1000 sNaN -> NaN Invalid_operation
dqmin173 min -1 sNaN -> NaN Invalid_operation
dqmin174 min -0 sNaN -> NaN Invalid_operation
dqmin175 min 0 sNaN -> NaN Invalid_operation
dqmin176 min 1 sNaN -> NaN Invalid_operation
dqmin177 min 1000 sNaN -> NaN Invalid_operation
dqmin178 min Inf sNaN -> NaN Invalid_operation
dqmin179 min NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqmin181 min NaN9 -Inf -> -Infinity
dqmin182 min -NaN8 9990 -> 9990
dqmin183 min NaN71 Inf -> Infinity
dqmin184 min NaN1 NaN54 -> NaN1
dqmin185 min NaN22 -NaN53 -> NaN22
dqmin186 min -NaN3 NaN6 -> -NaN3
dqmin187 min -NaN44 NaN7 -> -NaN44
dqmin188 min -Inf NaN41 -> -Infinity
dqmin189 min -9999 -NaN33 -> -9999
dqmin190 min Inf NaN2 -> Infinity
dqmin191 min sNaN99 -Inf -> NaN99 Invalid_operation
dqmin192 min sNaN98 -11 -> NaN98 Invalid_operation
dqmin193 min -sNaN97 NaN8 -> -NaN97 Invalid_operation
dqmin194 min sNaN69 sNaN94 -> NaN69 Invalid_operation
dqmin195 min NaN95 sNaN93 -> NaN93 Invalid_operation
dqmin196 min -Inf sNaN92 -> NaN92 Invalid_operation
dqmin197 min 088 sNaN91 -> NaN91 Invalid_operation
dqmin198 min Inf -sNaN90 -> -NaN90 Invalid_operation
dqmin199 min NaN sNaN86 -> NaN86 Invalid_operation
-- old rounding checks
dqmin221 min -12345678000 1 -> -12345678000
dqmin222 min 1 -12345678000 -> -12345678000
dqmin223 min -1234567800 1 -> -1234567800
dqmin224 min 1 -1234567800 -> -1234567800
dqmin225 min -1234567890 1 -> -1234567890
dqmin226 min 1 -1234567890 -> -1234567890
dqmin227 min -1234567891 1 -> -1234567891
dqmin228 min 1 -1234567891 -> -1234567891
dqmin229 min -12345678901 1 -> -12345678901
dqmin230 min 1 -12345678901 -> -12345678901
dqmin231 min -1234567896 1 -> -1234567896
dqmin232 min 1 -1234567896 -> -1234567896
dqmin233 min 1234567891 1 -> 1
dqmin234 min 1 1234567891 -> 1
dqmin235 min 12345678901 1 -> 1
dqmin236 min 1 12345678901 -> 1
dqmin237 min 1234567896 1 -> 1
dqmin238 min 1 1234567896 -> 1
-- from examples
dqmin280 min '3' '2' -> '2'
dqmin281 min '-10' '3' -> '-10'
dqmin282 min '1.0' '1' -> '1.0'
dqmin283 min '1' '1.0' -> '1.0'
dqmin284 min '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
dqmin401 min Inf 1.1 -> 1.1
dqmin402 min 1.1 1 -> 1
dqmin403 min 1 1.0 -> 1.0
dqmin404 min 1.0 0.1 -> 0.1
dqmin405 min 0.1 0.10 -> 0.10
dqmin406 min 0.10 0.100 -> 0.100
dqmin407 min 0.10 0 -> 0
dqmin408 min 0 0.0 -> 0.0
dqmin409 min 0.0 -0 -> -0
dqmin410 min 0.0 -0.0 -> -0.0
dqmin411 min 0.00 -0.0 -> -0.0
dqmin412 min 0.0 -0.00 -> -0.00
dqmin413 min 0 -0.0 -> -0.0
dqmin414 min 0 -0 -> -0
dqmin415 min -0.0 -0 -> -0
dqmin416 min -0 -0.100 -> -0.100
dqmin417 min -0.100 -0.10 -> -0.10
dqmin418 min -0.10 -0.1 -> -0.1
dqmin419 min -0.1 -1.0 -> -1.0
dqmin420 min -1.0 -1 -> -1
dqmin421 min -1 -1.1 -> -1.1
dqmin423 min -1.1 -Inf -> -Infinity
-- same with operands reversed
dqmin431 min 1.1 Inf -> 1.1
dqmin432 min 1 1.1 -> 1
dqmin433 min 1.0 1 -> 1.0
dqmin434 min 0.1 1.0 -> 0.1
dqmin435 min 0.10 0.1 -> 0.10
dqmin436 min 0.100 0.10 -> 0.100
dqmin437 min 0 0.10 -> 0
dqmin438 min 0.0 0 -> 0.0
dqmin439 min -0 0.0 -> -0
dqmin440 min -0.0 0.0 -> -0.0
dqmin441 min -0.0 0.00 -> -0.0
dqmin442 min -0.00 0.0 -> -0.00
dqmin443 min -0.0 0 -> -0.0
dqmin444 min -0 0 -> -0
dqmin445 min -0 -0.0 -> -0
dqmin446 min -0.100 -0 -> -0.100
dqmin447 min -0.10 -0.100 -> -0.10
dqmin448 min -0.1 -0.10 -> -0.1
dqmin449 min -1.0 -0.1 -> -1.0
dqmin450 min -1 -1.0 -> -1
dqmin451 min -1.1 -1 -> -1.1
dqmin453 min -Inf -1.1 -> -Infinity
-- largies
dqmin460 min 1000 1E+3 -> 1000
dqmin461 min 1E+3 1000 -> 1000
dqmin462 min 1000 -1E+3 -> -1E+3
dqmin463 min 1E+3 -384 -> -384
dqmin464 min -384 1E+3 -> -384
dqmin465 min -1E+3 1000 -> -1E+3
dqmin466 min -384 -1E+3 -> -1E+3
dqmin467 min -1E+3 -384 -> -1E+3
-- misalignment traps for little-endian
dqmin471 min 1.0 0.1 -> 0.1
dqmin472 min 0.1 1.0 -> 0.1
dqmin473 min 10.0 0.1 -> 0.1
dqmin474 min 0.1 10.0 -> 0.1
dqmin475 min 100 1.0 -> 1.0
dqmin476 min 1.0 100 -> 1.0
dqmin477 min 1000 10.0 -> 10.0
dqmin478 min 10.0 1000 -> 10.0
dqmin479 min 10000 100.0 -> 100.0
dqmin480 min 100.0 10000 -> 100.0
dqmin481 min 100000 1000.0 -> 1000.0
dqmin482 min 1000.0 100000 -> 1000.0
dqmin483 min 1000000 10000.0 -> 10000.0
dqmin484 min 10000.0 1000000 -> 10000.0
-- subnormals
dqmin510 min 1.00E-6143 0 -> 0
dqmin511 min 0.1E-6143 0 -> 0
dqmin512 min 0.10E-6143 0 -> 0
dqmin513 min 0.100E-6143 0 -> 0
dqmin514 min 0.01E-6143 0 -> 0
dqmin515 min 0.999E-6143 0 -> 0
dqmin516 min 0.099E-6143 0 -> 0
dqmin517 min 0.009E-6143 0 -> 0
dqmin518 min 0.001E-6143 0 -> 0
dqmin519 min 0.0009E-6143 0 -> 0
dqmin520 min 0.0001E-6143 0 -> 0
dqmin530 min -1.00E-6143 0 -> -1.00E-6143
dqmin531 min -0.1E-6143 0 -> -1E-6144 Subnormal
dqmin532 min -0.10E-6143 0 -> -1.0E-6144 Subnormal
dqmin533 min -0.100E-6143 0 -> -1.00E-6144 Subnormal
dqmin534 min -0.01E-6143 0 -> -1E-6145 Subnormal
dqmin535 min -0.999E-6143 0 -> -9.99E-6144 Subnormal
dqmin536 min -0.099E-6143 0 -> -9.9E-6145 Subnormal
dqmin537 min -0.009E-6143 0 -> -9E-6146 Subnormal
dqmin538 min -0.001E-6143 0 -> -1E-6146 Subnormal
dqmin539 min -0.0009E-6143 0 -> -9E-6147 Subnormal
dqmin540 min -0.0001E-6143 0 -> -1E-6147 Subnormal
-- Null tests
dqmin900 min 10 # -> NaN Invalid_operation
dqmin901 min # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,293 @@
------------------------------------------------------------------------
-- dqMinMag.decTest -- decQuad minnummag --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- we assume that base comparison is tested in compare.decTest, so
-- these mainly cover special cases and rounding
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqmng001 minmag -2 -2 -> -2
dqmng002 minmag -2 -1 -> -1
dqmng003 minmag -2 0 -> 0
dqmng004 minmag -2 1 -> 1
dqmng005 minmag -2 2 -> -2
dqmng006 minmag -1 -2 -> -1
dqmng007 minmag -1 -1 -> -1
dqmng008 minmag -1 0 -> 0
dqmng009 minmag -1 1 -> -1
dqmng010 minmag -1 2 -> -1
dqmng011 minmag 0 -2 -> 0
dqmng012 minmag 0 -1 -> 0
dqmng013 minmag 0 0 -> 0
dqmng014 minmag 0 1 -> 0
dqmng015 minmag 0 2 -> 0
dqmng016 minmag 1 -2 -> 1
dqmng017 minmag 1 -1 -> -1
dqmng018 minmag 1 0 -> 0
dqmng019 minmag 1 1 -> 1
dqmng020 minmag 1 2 -> 1
dqmng021 minmag 2 -2 -> -2
dqmng022 minmag 2 -1 -> -1
dqmng023 minmag 2 0 -> 0
dqmng025 minmag 2 1 -> 1
dqmng026 minmag 2 2 -> 2
-- extended zeros
dqmng030 minmag 0 0 -> 0
dqmng031 minmag 0 -0 -> -0
dqmng032 minmag 0 -0.0 -> -0.0
dqmng033 minmag 0 0.0 -> 0.0
dqmng034 minmag -0 0 -> -0
dqmng035 minmag -0 -0 -> -0
dqmng036 minmag -0 -0.0 -> -0
dqmng037 minmag -0 0.0 -> -0
dqmng038 minmag 0.0 0 -> 0.0
dqmng039 minmag 0.0 -0 -> -0
dqmng040 minmag 0.0 -0.0 -> -0.0
dqmng041 minmag 0.0 0.0 -> 0.0
dqmng042 minmag -0.0 0 -> -0.0
dqmng043 minmag -0.0 -0 -> -0
dqmng044 minmag -0.0 -0.0 -> -0.0
dqmng045 minmag -0.0 0.0 -> -0.0
dqmng046 minmag 0E1 -0E1 -> -0E+1
dqmng047 minmag -0E1 0E2 -> -0E+1
dqmng048 minmag 0E2 0E1 -> 0E+1
dqmng049 minmag 0E1 0E2 -> 0E+1
dqmng050 minmag -0E3 -0E2 -> -0E+3
dqmng051 minmag -0E2 -0E3 -> -0E+3
-- Specials
dqmng090 minmag Inf -Inf -> -Infinity
dqmng091 minmag Inf -1000 -> -1000
dqmng092 minmag Inf -1 -> -1
dqmng093 minmag Inf -0 -> -0
dqmng094 minmag Inf 0 -> 0
dqmng095 minmag Inf 1 -> 1
dqmng096 minmag Inf 1000 -> 1000
dqmng097 minmag Inf Inf -> Infinity
dqmng098 minmag -1000 Inf -> -1000
dqmng099 minmag -Inf Inf -> -Infinity
dqmng100 minmag -1 Inf -> -1
dqmng101 minmag -0 Inf -> -0
dqmng102 minmag 0 Inf -> 0
dqmng103 minmag 1 Inf -> 1
dqmng104 minmag 1000 Inf -> 1000
dqmng105 minmag Inf Inf -> Infinity
dqmng120 minmag -Inf -Inf -> -Infinity
dqmng121 minmag -Inf -1000 -> -1000
dqmng122 minmag -Inf -1 -> -1
dqmng123 minmag -Inf -0 -> -0
dqmng124 minmag -Inf 0 -> 0
dqmng125 minmag -Inf 1 -> 1
dqmng126 minmag -Inf 1000 -> 1000
dqmng127 minmag -Inf Inf -> -Infinity
dqmng128 minmag -Inf -Inf -> -Infinity
dqmng129 minmag -1000 -Inf -> -1000
dqmng130 minmag -1 -Inf -> -1
dqmng131 minmag -0 -Inf -> -0
dqmng132 minmag 0 -Inf -> 0
dqmng133 minmag 1 -Inf -> 1
dqmng134 minmag 1000 -Inf -> 1000
dqmng135 minmag Inf -Inf -> -Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
dqmng141 minmag NaN -Inf -> -Infinity
dqmng142 minmag NaN -1000 -> -1000
dqmng143 minmag NaN -1 -> -1
dqmng144 minmag NaN -0 -> -0
dqmng145 minmag NaN 0 -> 0
dqmng146 minmag NaN 1 -> 1
dqmng147 minmag NaN 1000 -> 1000
dqmng148 minmag NaN Inf -> Infinity
dqmng149 minmag NaN NaN -> NaN
dqmng150 minmag -Inf NaN -> -Infinity
dqmng151 minmag -1000 NaN -> -1000
dqmng152 minmag -1 -NaN -> -1
dqmng153 minmag -0 NaN -> -0
dqmng154 minmag 0 -NaN -> 0
dqmng155 minmag 1 NaN -> 1
dqmng156 minmag 1000 NaN -> 1000
dqmng157 minmag Inf NaN -> Infinity
dqmng161 minmag sNaN -Inf -> NaN Invalid_operation
dqmng162 minmag sNaN -1000 -> NaN Invalid_operation
dqmng163 minmag sNaN -1 -> NaN Invalid_operation
dqmng164 minmag sNaN -0 -> NaN Invalid_operation
dqmng165 minmag -sNaN 0 -> -NaN Invalid_operation
dqmng166 minmag -sNaN 1 -> -NaN Invalid_operation
dqmng167 minmag sNaN 1000 -> NaN Invalid_operation
dqmng168 minmag sNaN NaN -> NaN Invalid_operation
dqmng169 minmag sNaN sNaN -> NaN Invalid_operation
dqmng170 minmag NaN sNaN -> NaN Invalid_operation
dqmng171 minmag -Inf sNaN -> NaN Invalid_operation
dqmng172 minmag -1000 sNaN -> NaN Invalid_operation
dqmng173 minmag -1 sNaN -> NaN Invalid_operation
dqmng174 minmag -0 sNaN -> NaN Invalid_operation
dqmng175 minmag 0 sNaN -> NaN Invalid_operation
dqmng176 minmag 1 sNaN -> NaN Invalid_operation
dqmng177 minmag 1000 sNaN -> NaN Invalid_operation
dqmng178 minmag Inf sNaN -> NaN Invalid_operation
dqmng179 minmag NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqmng181 minmag NaN9 -Inf -> -Infinity
dqmng182 minmag -NaN8 9990 -> 9990
dqmng183 minmag NaN71 Inf -> Infinity
dqmng184 minmag NaN1 NaN54 -> NaN1
dqmng185 minmag NaN22 -NaN53 -> NaN22
dqmng186 minmag -NaN3 NaN6 -> -NaN3
dqmng187 minmag -NaN44 NaN7 -> -NaN44
dqmng188 minmag -Inf NaN41 -> -Infinity
dqmng189 minmag -9999 -NaN33 -> -9999
dqmng190 minmag Inf NaN2 -> Infinity
dqmng191 minmag sNaN99 -Inf -> NaN99 Invalid_operation
dqmng192 minmag sNaN98 -11 -> NaN98 Invalid_operation
dqmng193 minmag -sNaN97 NaN8 -> -NaN97 Invalid_operation
dqmng194 minmag sNaN69 sNaN94 -> NaN69 Invalid_operation
dqmng195 minmag NaN95 sNaN93 -> NaN93 Invalid_operation
dqmng196 minmag -Inf sNaN92 -> NaN92 Invalid_operation
dqmng197 minmag 088 sNaN91 -> NaN91 Invalid_operation
dqmng198 minmag Inf -sNaN90 -> -NaN90 Invalid_operation
dqmng199 minmag NaN sNaN86 -> NaN86 Invalid_operation
-- old rounding checks
dqmng221 minmag -12345678000 1 -> 1
dqmng222 minmag 1 -12345678000 -> 1
dqmng223 minmag -1234567800 1 -> 1
dqmng224 minmag 1 -1234567800 -> 1
dqmng225 minmag -1234567890 1 -> 1
dqmng226 minmag 1 -1234567890 -> 1
dqmng227 minmag -1234567891 1 -> 1
dqmng228 minmag 1 -1234567891 -> 1
dqmng229 minmag -12345678901 1 -> 1
dqmng230 minmag 1 -12345678901 -> 1
dqmng231 minmag -1234567896 1 -> 1
dqmng232 minmag 1 -1234567896 -> 1
dqmng233 minmag 1234567891 1 -> 1
dqmng234 minmag 1 1234567891 -> 1
dqmng235 minmag 12345678901 1 -> 1
dqmng236 minmag 1 12345678901 -> 1
dqmng237 minmag 1234567896 1 -> 1
dqmng238 minmag 1 1234567896 -> 1
-- from examples
dqmng280 minmag '3' '2' -> '2'
dqmng281 minmag '-10' '3' -> '3'
dqmng282 minmag '1.0' '1' -> '1.0'
dqmng283 minmag '1' '1.0' -> '1.0'
dqmng284 minmag '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
dqmng401 minmag Inf 1.1 -> 1.1
dqmng402 minmag 1.1 1 -> 1
dqmng403 minmag 1 1.0 -> 1.0
dqmng404 minmag 1.0 0.1 -> 0.1
dqmng405 minmag 0.1 0.10 -> 0.10
dqmng406 minmag 0.10 0.100 -> 0.100
dqmng407 minmag 0.10 0 -> 0
dqmng408 minmag 0 0.0 -> 0.0
dqmng409 minmag 0.0 -0 -> -0
dqmng410 minmag 0.0 -0.0 -> -0.0
dqmng411 minmag 0.00 -0.0 -> -0.0
dqmng412 minmag 0.0 -0.00 -> -0.00
dqmng413 minmag 0 -0.0 -> -0.0
dqmng414 minmag 0 -0 -> -0
dqmng415 minmag -0.0 -0 -> -0
dqmng416 minmag -0 -0.100 -> -0
dqmng417 minmag -0.100 -0.10 -> -0.10
dqmng418 minmag -0.10 -0.1 -> -0.1
dqmng419 minmag -0.1 -1.0 -> -0.1
dqmng420 minmag -1.0 -1 -> -1
dqmng421 minmag -1 -1.1 -> -1
dqmng423 minmag -1.1 -Inf -> -1.1
-- same with operands reversed
dqmng431 minmag 1.1 Inf -> 1.1
dqmng432 minmag 1 1.1 -> 1
dqmng433 minmag 1.0 1 -> 1.0
dqmng434 minmag 0.1 1.0 -> 0.1
dqmng435 minmag 0.10 0.1 -> 0.10
dqmng436 minmag 0.100 0.10 -> 0.100
dqmng437 minmag 0 0.10 -> 0
dqmng438 minmag 0.0 0 -> 0.0
dqmng439 minmag -0 0.0 -> -0
dqmng440 minmag -0.0 0.0 -> -0.0
dqmng441 minmag -0.0 0.00 -> -0.0
dqmng442 minmag -0.00 0.0 -> -0.00
dqmng443 minmag -0.0 0 -> -0.0
dqmng444 minmag -0 0 -> -0
dqmng445 minmag -0 -0.0 -> -0
dqmng446 minmag -0.100 -0 -> -0
dqmng447 minmag -0.10 -0.100 -> -0.10
dqmng448 minmag -0.1 -0.10 -> -0.1
dqmng449 minmag -1.0 -0.1 -> -0.1
dqmng450 minmag -1 -1.0 -> -1
dqmng451 minmag -1.1 -1 -> -1
dqmng453 minmag -Inf -1.1 -> -1.1
-- largies
dqmng460 minmag 1000 1E+3 -> 1000
dqmng461 minmag 1E+3 1000 -> 1000
dqmng462 minmag 1000 -1E+3 -> -1E+3
dqmng463 minmag 1E+3 -384 -> -384
dqmng464 minmag -384 1E+3 -> -384
dqmng465 minmag -1E+3 1000 -> -1E+3
dqmng466 minmag -384 -1E+3 -> -384
dqmng467 minmag -1E+3 -384 -> -384
-- subnormals
dqmng510 minmag 1.00E-6143 0 -> 0
dqmng511 minmag 0.1E-6143 0 -> 0
dqmng512 minmag 0.10E-6143 0 -> 0
dqmng513 minmag 0.100E-6143 0 -> 0
dqmng514 minmag 0.01E-6143 0 -> 0
dqmng515 minmag 0.999E-6143 0 -> 0
dqmng516 minmag 0.099E-6143 0 -> 0
dqmng517 minmag 0.009E-6143 0 -> 0
dqmng518 minmag 0.001E-6143 0 -> 0
dqmng519 minmag 0.0009E-6143 0 -> 0
dqmng520 minmag 0.0001E-6143 0 -> 0
dqmng530 minmag -1.00E-6143 0 -> 0
dqmng531 minmag -0.1E-6143 0 -> 0
dqmng532 minmag -0.10E-6143 0 -> 0
dqmng533 minmag -0.100E-6143 0 -> 0
dqmng534 minmag -0.01E-6143 0 -> 0
dqmng535 minmag -0.999E-6143 0 -> 0
dqmng536 minmag -0.099E-6143 0 -> 0
dqmng537 minmag -0.009E-6143 0 -> 0
dqmng538 minmag -0.001E-6143 0 -> 0
dqmng539 minmag -0.0009E-6143 0 -> 0
dqmng540 minmag -0.0001E-6143 0 -> 0
-- Null tests
dqmng900 minmag 10 # -> NaN Invalid_operation
dqmng901 minmag # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,88 @@
------------------------------------------------------------------------
-- dqMinus.decTest -- decQuad 0-x --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqmns001 minus +7.50 -> -7.50
-- Infinities
dqmns011 minus Infinity -> -Infinity
dqmns012 minus -Infinity -> Infinity
-- NaNs, 0 payload
dqmns021 minus NaN -> NaN
dqmns022 minus -NaN -> -NaN
dqmns023 minus sNaN -> NaN Invalid_operation
dqmns024 minus -sNaN -> -NaN Invalid_operation
-- NaNs, non-0 payload
dqmns031 minus NaN13 -> NaN13
dqmns032 minus -NaN13 -> -NaN13
dqmns033 minus sNaN13 -> NaN13 Invalid_operation
dqmns034 minus -sNaN13 -> -NaN13 Invalid_operation
dqmns035 minus NaN70 -> NaN70
dqmns036 minus -NaN70 -> -NaN70
dqmns037 minus sNaN101 -> NaN101 Invalid_operation
dqmns038 minus -sNaN101 -> -NaN101 Invalid_operation
-- finites
dqmns101 minus 7 -> -7
dqmns102 minus -7 -> 7
dqmns103 minus 75 -> -75
dqmns104 minus -75 -> 75
dqmns105 minus 7.50 -> -7.50
dqmns106 minus -7.50 -> 7.50
dqmns107 minus 7.500 -> -7.500
dqmns108 minus -7.500 -> 7.500
-- zeros
dqmns111 minus 0 -> 0
dqmns112 minus -0 -> 0
dqmns113 minus 0E+4 -> 0E+4
dqmns114 minus -0E+4 -> 0E+4
dqmns115 minus 0.0000 -> 0.0000
dqmns116 minus -0.0000 -> 0.0000
dqmns117 minus 0E-141 -> 0E-141
dqmns118 minus -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqmns121 minus 2682682682682682682682682682682682 -> -2682682682682682682682682682682682
dqmns122 minus -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqmns123 minus 1341341341341341341341341341341341 -> -1341341341341341341341341341341341
dqmns124 minus -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqmns131 minus 9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
dqmns132 minus 1E-6143 -> -1E-6143
dqmns133 minus 1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqmns134 minus 1E-6176 -> -1E-6176 Subnormal
dqmns135 minus -1E-6176 -> 1E-6176 Subnormal
dqmns136 minus -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqmns137 minus -1E-6143 -> 1E-6143
dqmns138 minus -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144

View File

@@ -0,0 +1,589 @@
------------------------------------------------------------------------
-- dqMultiply.decTest -- decQuad multiplication --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- This set of tests are for decQuads only; all arguments are
-- representable in a decQuad
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqmul000 multiply 2 2 -> 4
dqmul001 multiply 2 3 -> 6
dqmul002 multiply 5 1 -> 5
dqmul003 multiply 5 2 -> 10
dqmul004 multiply 1.20 2 -> 2.40
dqmul005 multiply 1.20 0 -> 0.00
dqmul006 multiply 1.20 -2 -> -2.40
dqmul007 multiply -1.20 2 -> -2.40
dqmul008 multiply -1.20 0 -> -0.00
dqmul009 multiply -1.20 -2 -> 2.40
dqmul010 multiply 5.09 7.1 -> 36.139
dqmul011 multiply 2.5 4 -> 10.0
dqmul012 multiply 2.50 4 -> 10.00
dqmul013 multiply 1.23456789 1.0000000000000000000000000000 -> 1.234567890000000000000000000000000 Rounded
dqmul015 multiply 2.50 4 -> 10.00
dqmul016 multiply 9.99999999999999999 9.99999999999999999 -> 99.99999999999999980000000000000000 Inexact Rounded
dqmul017 multiply 9.99999999999999999 -9.99999999999999999 -> -99.99999999999999980000000000000000 Inexact Rounded
dqmul018 multiply -9.99999999999999999 9.99999999999999999 -> -99.99999999999999980000000000000000 Inexact Rounded
dqmul019 multiply -9.99999999999999999 -9.99999999999999999 -> 99.99999999999999980000000000000000 Inexact Rounded
-- zeros, etc.
dqmul021 multiply 0 0 -> 0
dqmul022 multiply 0 -0 -> -0
dqmul023 multiply -0 0 -> -0
dqmul024 multiply -0 -0 -> 0
dqmul025 multiply -0.0 -0.0 -> 0.00
dqmul026 multiply -0.0 -0.0 -> 0.00
dqmul027 multiply -0.0 -0.0 -> 0.00
dqmul028 multiply -0.0 -0.0 -> 0.00
dqmul030 multiply 5.00 1E-3 -> 0.00500
dqmul031 multiply 00.00 0.000 -> 0.00000
dqmul032 multiply 00.00 0E-3 -> 0.00000 -- rhs is 0
dqmul033 multiply 0E-3 00.00 -> 0.00000 -- lhs is 0
dqmul034 multiply -5.00 1E-3 -> -0.00500
dqmul035 multiply -00.00 0.000 -> -0.00000
dqmul036 multiply -00.00 0E-3 -> -0.00000 -- rhs is 0
dqmul037 multiply -0E-3 00.00 -> -0.00000 -- lhs is 0
dqmul038 multiply 5.00 -1E-3 -> -0.00500
dqmul039 multiply 00.00 -0.000 -> -0.00000
dqmul040 multiply 00.00 -0E-3 -> -0.00000 -- rhs is 0
dqmul041 multiply 0E-3 -00.00 -> -0.00000 -- lhs is 0
dqmul042 multiply -5.00 -1E-3 -> 0.00500
dqmul043 multiply -00.00 -0.000 -> 0.00000
dqmul044 multiply -00.00 -0E-3 -> 0.00000 -- rhs is 0
dqmul045 multiply -0E-3 -00.00 -> 0.00000 -- lhs is 0
-- examples from decarith
dqmul050 multiply 1.20 3 -> 3.60
dqmul051 multiply 7 3 -> 21
dqmul052 multiply 0.9 0.8 -> 0.72
dqmul053 multiply 0.9 -0 -> -0.0
dqmul054 multiply 654321 654321 -> 428135971041
dqmul060 multiply 123.45 1e7 -> 1.2345E+9
dqmul061 multiply 123.45 1e8 -> 1.2345E+10
dqmul062 multiply 123.45 1e+9 -> 1.2345E+11
dqmul063 multiply 123.45 1e10 -> 1.2345E+12
dqmul064 multiply 123.45 1e11 -> 1.2345E+13
dqmul065 multiply 123.45 1e12 -> 1.2345E+14
dqmul066 multiply 123.45 1e13 -> 1.2345E+15
-- test some intermediate lengths
-- 1234567890123456
dqmul080 multiply 0.1 1230123456456789 -> 123012345645678.9
dqmul084 multiply 0.1 1230123456456789 -> 123012345645678.9
dqmul090 multiply 1230123456456789 0.1 -> 123012345645678.9
dqmul094 multiply 1230123456456789 0.1 -> 123012345645678.9
-- test some more edge cases and carries
dqmul101 multiply 9 9 -> 81
dqmul102 multiply 9 90 -> 810
dqmul103 multiply 9 900 -> 8100
dqmul104 multiply 9 9000 -> 81000
dqmul105 multiply 9 90000 -> 810000
dqmul106 multiply 9 900000 -> 8100000
dqmul107 multiply 9 9000000 -> 81000000
dqmul108 multiply 9 90000000 -> 810000000
dqmul109 multiply 9 900000000 -> 8100000000
dqmul110 multiply 9 9000000000 -> 81000000000
dqmul111 multiply 9 90000000000 -> 810000000000
dqmul112 multiply 9 900000000000 -> 8100000000000
dqmul113 multiply 9 9000000000000 -> 81000000000000
dqmul114 multiply 9 90000000000000 -> 810000000000000
dqmul115 multiply 9 900000000000000 -> 8100000000000000
--dqmul116 multiply 9 9000000000000000 -> 81000000000000000
--dqmul117 multiply 9 90000000000000000 -> 810000000000000000
--dqmul118 multiply 9 900000000000000000 -> 8100000000000000000
--dqmul119 multiply 9 9000000000000000000 -> 81000000000000000000
--dqmul120 multiply 9 90000000000000000000 -> 810000000000000000000
--dqmul121 multiply 9 900000000000000000000 -> 8100000000000000000000
--dqmul122 multiply 9 9000000000000000000000 -> 81000000000000000000000
--dqmul123 multiply 9 90000000000000000000000 -> 810000000000000000000000
-- test some more edge cases without carries
dqmul131 multiply 3 3 -> 9
dqmul132 multiply 3 30 -> 90
dqmul133 multiply 3 300 -> 900
dqmul134 multiply 3 3000 -> 9000
dqmul135 multiply 3 30000 -> 90000
dqmul136 multiply 3 300000 -> 900000
dqmul137 multiply 3 3000000 -> 9000000
dqmul138 multiply 3 30000000 -> 90000000
dqmul139 multiply 3 300000000 -> 900000000
dqmul140 multiply 3 3000000000 -> 9000000000
dqmul141 multiply 3 30000000000 -> 90000000000
dqmul142 multiply 3 300000000000 -> 900000000000
dqmul143 multiply 3 3000000000000 -> 9000000000000
dqmul144 multiply 3 30000000000000 -> 90000000000000
dqmul145 multiply 3 300000000000000 -> 900000000000000
dqmul146 multiply 3 3000000000000000 -> 9000000000000000
dqmul147 multiply 3 30000000000000000 -> 90000000000000000
dqmul148 multiply 3 300000000000000000 -> 900000000000000000
dqmul149 multiply 3 3000000000000000000 -> 9000000000000000000
dqmul150 multiply 3 30000000000000000000 -> 90000000000000000000
dqmul151 multiply 3 300000000000000000000 -> 900000000000000000000
dqmul152 multiply 3 3000000000000000000000 -> 9000000000000000000000
dqmul153 multiply 3 30000000000000000000000 -> 90000000000000000000000
dqmul263 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.2908011933696719165119928296 Inexact Rounded
-- test some edge cases with exact rounding
dqmul301 multiply 900000000000000000 9 -> 8100000000000000000
dqmul302 multiply 900000000000000000 90 -> 81000000000000000000
dqmul303 multiply 900000000000000000 900 -> 810000000000000000000
dqmul304 multiply 900000000000000000 9000 -> 8100000000000000000000
dqmul305 multiply 900000000000000000 90000 -> 81000000000000000000000
dqmul306 multiply 900000000000000000 900000 -> 810000000000000000000000
dqmul307 multiply 900000000000000000 9000000 -> 8100000000000000000000000
dqmul308 multiply 900000000000000000 90000000 -> 81000000000000000000000000
dqmul309 multiply 900000000000000000 900000000 -> 810000000000000000000000000
dqmul310 multiply 900000000000000000 9000000000 -> 8100000000000000000000000000
dqmul311 multiply 900000000000000000 90000000000 -> 81000000000000000000000000000
dqmul312 multiply 900000000000000000 900000000000 -> 810000000000000000000000000000
dqmul313 multiply 900000000000000000 9000000000000 -> 8100000000000000000000000000000
dqmul314 multiply 900000000000000000 90000000000000 -> 81000000000000000000000000000000
dqmul315 multiply 900000000000000000 900000000000000 -> 810000000000000000000000000000000
dqmul316 multiply 900000000000000000 9000000000000000 -> 8100000000000000000000000000000000
dqmul317 multiply 9000000000000000000 9000000000000000 -> 8.100000000000000000000000000000000E+34 Rounded
dqmul318 multiply 90000000000000000000 9000000000000000 -> 8.100000000000000000000000000000000E+35 Rounded
dqmul319 multiply 900000000000000000000 9000000000000000 -> 8.100000000000000000000000000000000E+36 Rounded
dqmul320 multiply 9000000000000000000000 9000000000000000 -> 8.100000000000000000000000000000000E+37 Rounded
dqmul321 multiply 90000000000000000000000 9000000000000000 -> 8.100000000000000000000000000000000E+38 Rounded
dqmul322 multiply 900000000000000000000000 9000000000000000 -> 8.100000000000000000000000000000000E+39 Rounded
dqmul323 multiply 9000000000000000000000000 9000000000000000 -> 8.100000000000000000000000000000000E+40 Rounded
-- tryzeros cases
dqmul504 multiply 0E-4260 1000E-4260 -> 0E-6176 Clamped
dqmul505 multiply 100E+4260 0E+4260 -> 0E+6111 Clamped
-- mixed with zeros
dqmul541 multiply 0 -1 -> -0
dqmul542 multiply -0 -1 -> 0
dqmul543 multiply 0 1 -> 0
dqmul544 multiply -0 1 -> -0
dqmul545 multiply -1 0 -> -0
dqmul546 multiply -1 -0 -> 0
dqmul547 multiply 1 0 -> 0
dqmul548 multiply 1 -0 -> -0
dqmul551 multiply 0.0 -1 -> -0.0
dqmul552 multiply -0.0 -1 -> 0.0
dqmul553 multiply 0.0 1 -> 0.0
dqmul554 multiply -0.0 1 -> -0.0
dqmul555 multiply -1.0 0 -> -0.0
dqmul556 multiply -1.0 -0 -> 0.0
dqmul557 multiply 1.0 0 -> 0.0
dqmul558 multiply 1.0 -0 -> -0.0
dqmul561 multiply 0 -1.0 -> -0.0
dqmul562 multiply -0 -1.0 -> 0.0
dqmul563 multiply 0 1.0 -> 0.0
dqmul564 multiply -0 1.0 -> -0.0
dqmul565 multiply -1 0.0 -> -0.0
dqmul566 multiply -1 -0.0 -> 0.0
dqmul567 multiply 1 0.0 -> 0.0
dqmul568 multiply 1 -0.0 -> -0.0
dqmul571 multiply 0.0 -1.0 -> -0.00
dqmul572 multiply -0.0 -1.0 -> 0.00
dqmul573 multiply 0.0 1.0 -> 0.00
dqmul574 multiply -0.0 1.0 -> -0.00
dqmul575 multiply -1.0 0.0 -> -0.00
dqmul576 multiply -1.0 -0.0 -> 0.00
dqmul577 multiply 1.0 0.0 -> 0.00
dqmul578 multiply 1.0 -0.0 -> -0.00
-- Specials
dqmul580 multiply Inf -Inf -> -Infinity
dqmul581 multiply Inf -1000 -> -Infinity
dqmul582 multiply Inf -1 -> -Infinity
dqmul583 multiply Inf -0 -> NaN Invalid_operation
dqmul584 multiply Inf 0 -> NaN Invalid_operation
dqmul585 multiply Inf 1 -> Infinity
dqmul586 multiply Inf 1000 -> Infinity
dqmul587 multiply Inf Inf -> Infinity
dqmul588 multiply -1000 Inf -> -Infinity
dqmul589 multiply -Inf Inf -> -Infinity
dqmul590 multiply -1 Inf -> -Infinity
dqmul591 multiply -0 Inf -> NaN Invalid_operation
dqmul592 multiply 0 Inf -> NaN Invalid_operation
dqmul593 multiply 1 Inf -> Infinity
dqmul594 multiply 1000 Inf -> Infinity
dqmul595 multiply Inf Inf -> Infinity
dqmul600 multiply -Inf -Inf -> Infinity
dqmul601 multiply -Inf -1000 -> Infinity
dqmul602 multiply -Inf -1 -> Infinity
dqmul603 multiply -Inf -0 -> NaN Invalid_operation
dqmul604 multiply -Inf 0 -> NaN Invalid_operation
dqmul605 multiply -Inf 1 -> -Infinity
dqmul606 multiply -Inf 1000 -> -Infinity
dqmul607 multiply -Inf Inf -> -Infinity
dqmul608 multiply -1000 Inf -> -Infinity
dqmul609 multiply -Inf -Inf -> Infinity
dqmul610 multiply -1 -Inf -> Infinity
dqmul611 multiply -0 -Inf -> NaN Invalid_operation
dqmul612 multiply 0 -Inf -> NaN Invalid_operation
dqmul613 multiply 1 -Inf -> -Infinity
dqmul614 multiply 1000 -Inf -> -Infinity
dqmul615 multiply Inf -Inf -> -Infinity
dqmul621 multiply NaN -Inf -> NaN
dqmul622 multiply NaN -1000 -> NaN
dqmul623 multiply NaN -1 -> NaN
dqmul624 multiply NaN -0 -> NaN
dqmul625 multiply NaN 0 -> NaN
dqmul626 multiply NaN 1 -> NaN
dqmul627 multiply NaN 1000 -> NaN
dqmul628 multiply NaN Inf -> NaN
dqmul629 multiply NaN NaN -> NaN
dqmul630 multiply -Inf NaN -> NaN
dqmul631 multiply -1000 NaN -> NaN
dqmul632 multiply -1 NaN -> NaN
dqmul633 multiply -0 NaN -> NaN
dqmul634 multiply 0 NaN -> NaN
dqmul635 multiply 1 NaN -> NaN
dqmul636 multiply 1000 NaN -> NaN
dqmul637 multiply Inf NaN -> NaN
dqmul641 multiply sNaN -Inf -> NaN Invalid_operation
dqmul642 multiply sNaN -1000 -> NaN Invalid_operation
dqmul643 multiply sNaN -1 -> NaN Invalid_operation
dqmul644 multiply sNaN -0 -> NaN Invalid_operation
dqmul645 multiply sNaN 0 -> NaN Invalid_operation
dqmul646 multiply sNaN 1 -> NaN Invalid_operation
dqmul647 multiply sNaN 1000 -> NaN Invalid_operation
dqmul648 multiply sNaN NaN -> NaN Invalid_operation
dqmul649 multiply sNaN sNaN -> NaN Invalid_operation
dqmul650 multiply NaN sNaN -> NaN Invalid_operation
dqmul651 multiply -Inf sNaN -> NaN Invalid_operation
dqmul652 multiply -1000 sNaN -> NaN Invalid_operation
dqmul653 multiply -1 sNaN -> NaN Invalid_operation
dqmul654 multiply -0 sNaN -> NaN Invalid_operation
dqmul655 multiply 0 sNaN -> NaN Invalid_operation
dqmul656 multiply 1 sNaN -> NaN Invalid_operation
dqmul657 multiply 1000 sNaN -> NaN Invalid_operation
dqmul658 multiply Inf sNaN -> NaN Invalid_operation
dqmul659 multiply NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqmul661 multiply NaN9 -Inf -> NaN9
dqmul662 multiply NaN8 999 -> NaN8
dqmul663 multiply NaN71 Inf -> NaN71
dqmul664 multiply NaN6 NaN5 -> NaN6
dqmul665 multiply -Inf NaN4 -> NaN4
dqmul666 multiply -999 NaN33 -> NaN33
dqmul667 multiply Inf NaN2 -> NaN2
dqmul671 multiply sNaN99 -Inf -> NaN99 Invalid_operation
dqmul672 multiply sNaN98 -11 -> NaN98 Invalid_operation
dqmul673 multiply sNaN97 NaN -> NaN97 Invalid_operation
dqmul674 multiply sNaN16 sNaN94 -> NaN16 Invalid_operation
dqmul675 multiply NaN95 sNaN93 -> NaN93 Invalid_operation
dqmul676 multiply -Inf sNaN92 -> NaN92 Invalid_operation
dqmul677 multiply 088 sNaN91 -> NaN91 Invalid_operation
dqmul678 multiply Inf sNaN90 -> NaN90 Invalid_operation
dqmul679 multiply NaN sNaN89 -> NaN89 Invalid_operation
dqmul681 multiply -NaN9 -Inf -> -NaN9
dqmul682 multiply -NaN8 999 -> -NaN8
dqmul683 multiply -NaN71 Inf -> -NaN71
dqmul684 multiply -NaN6 -NaN5 -> -NaN6
dqmul685 multiply -Inf -NaN4 -> -NaN4
dqmul686 multiply -999 -NaN33 -> -NaN33
dqmul687 multiply Inf -NaN2 -> -NaN2
dqmul691 multiply -sNaN99 -Inf -> -NaN99 Invalid_operation
dqmul692 multiply -sNaN98 -11 -> -NaN98 Invalid_operation
dqmul693 multiply -sNaN97 NaN -> -NaN97 Invalid_operation
dqmul694 multiply -sNaN16 -sNaN94 -> -NaN16 Invalid_operation
dqmul695 multiply -NaN95 -sNaN93 -> -NaN93 Invalid_operation
dqmul696 multiply -Inf -sNaN92 -> -NaN92 Invalid_operation
dqmul697 multiply 088 -sNaN91 -> -NaN91 Invalid_operation
dqmul698 multiply Inf -sNaN90 -> -NaN90 Invalid_operation
dqmul699 multiply -NaN -sNaN89 -> -NaN89 Invalid_operation
dqmul701 multiply -NaN -Inf -> -NaN
dqmul702 multiply -NaN 999 -> -NaN
dqmul703 multiply -NaN Inf -> -NaN
dqmul704 multiply -NaN -NaN -> -NaN
dqmul705 multiply -Inf -NaN0 -> -NaN
dqmul706 multiply -999 -NaN -> -NaN
dqmul707 multiply Inf -NaN -> -NaN
dqmul711 multiply -sNaN -Inf -> -NaN Invalid_operation
dqmul712 multiply -sNaN -11 -> -NaN Invalid_operation
dqmul713 multiply -sNaN00 NaN -> -NaN Invalid_operation
dqmul714 multiply -sNaN -sNaN -> -NaN Invalid_operation
dqmul715 multiply -NaN -sNaN -> -NaN Invalid_operation
dqmul716 multiply -Inf -sNaN -> -NaN Invalid_operation
dqmul717 multiply 088 -sNaN -> -NaN Invalid_operation
dqmul718 multiply Inf -sNaN -> -NaN Invalid_operation
dqmul719 multiply -NaN -sNaN -> -NaN Invalid_operation
-- overflow and underflow tests .. note subnormal results
-- signs
dqmul751 multiply 1e+4277 1e+3311 -> Infinity Overflow Inexact Rounded
dqmul752 multiply 1e+4277 -1e+3311 -> -Infinity Overflow Inexact Rounded
dqmul753 multiply -1e+4277 1e+3311 -> -Infinity Overflow Inexact Rounded
dqmul754 multiply -1e+4277 -1e+3311 -> Infinity Overflow Inexact Rounded
dqmul755 multiply 1e-4277 1e-3311 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqmul756 multiply 1e-4277 -1e-3311 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqmul757 multiply -1e-4277 1e-3311 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqmul758 multiply -1e-4277 -1e-3311 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
dqmul760 multiply 1e-6069 1e-101 -> 1E-6170 Subnormal
dqmul761 multiply 1e-6069 1e-102 -> 1E-6171 Subnormal
dqmul762 multiply 1e-6069 1e-103 -> 1E-6172 Subnormal
dqmul763 multiply 1e-6069 1e-104 -> 1E-6173 Subnormal
dqmul764 multiply 1e-6069 1e-105 -> 1E-6174 Subnormal
dqmul765 multiply 1e-6069 1e-106 -> 1E-6175 Subnormal
dqmul766 multiply 1e-6069 1e-107 -> 1E-6176 Subnormal
dqmul767 multiply 1e-6069 1e-108 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqmul768 multiply 1e-6069 1e-109 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqmul769 multiply 1e-6069 1e-110 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
-- [no equivalent of 'subnormal' for overflow]
dqmul770 multiply 1e+40 1e+6101 -> 1.000000000000000000000000000000E+6141 Clamped
dqmul771 multiply 1e+40 1e+6102 -> 1.0000000000000000000000000000000E+6142 Clamped
dqmul772 multiply 1e+40 1e+6103 -> 1.00000000000000000000000000000000E+6143 Clamped
dqmul773 multiply 1e+40 1e+6104 -> 1.000000000000000000000000000000000E+6144 Clamped
dqmul774 multiply 1e+40 1e+6105 -> Infinity Overflow Inexact Rounded
dqmul775 multiply 1e+40 1e+6106 -> Infinity Overflow Inexact Rounded
dqmul776 multiply 1e+40 1e+6107 -> Infinity Overflow Inexact Rounded
dqmul777 multiply 1e+40 1e+6108 -> Infinity Overflow Inexact Rounded
dqmul778 multiply 1e+40 1e+6109 -> Infinity Overflow Inexact Rounded
dqmul779 multiply 1e+40 1e+6110 -> Infinity Overflow Inexact Rounded
dqmul801 multiply 1.0000E-6172 1 -> 1.0000E-6172 Subnormal
dqmul802 multiply 1.000E-6172 1e-1 -> 1.000E-6173 Subnormal
dqmul803 multiply 1.00E-6172 1e-2 -> 1.00E-6174 Subnormal
dqmul804 multiply 1.0E-6172 1e-3 -> 1.0E-6175 Subnormal
dqmul805 multiply 1.0E-6172 1e-4 -> 1E-6176 Subnormal Rounded
dqmul806 multiply 1.3E-6172 1e-4 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqmul807 multiply 1.5E-6172 1e-4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqmul808 multiply 1.7E-6172 1e-4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqmul809 multiply 2.3E-6172 1e-4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqmul810 multiply 2.5E-6172 1e-4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqmul811 multiply 2.7E-6172 1e-4 -> 3E-6176 Underflow Subnormal Inexact Rounded
dqmul812 multiply 1.49E-6172 1e-4 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqmul813 multiply 1.50E-6172 1e-4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqmul814 multiply 1.51E-6172 1e-4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqmul815 multiply 2.49E-6172 1e-4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqmul816 multiply 2.50E-6172 1e-4 -> 2E-6176 Underflow Subnormal Inexact Rounded
dqmul817 multiply 2.51E-6172 1e-4 -> 3E-6176 Underflow Subnormal Inexact Rounded
dqmul818 multiply 1E-6172 1e-4 -> 1E-6176 Subnormal
dqmul819 multiply 3E-6172 1e-5 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqmul820 multiply 5E-6172 1e-5 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqmul821 multiply 7E-6172 1e-5 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqmul822 multiply 9E-6172 1e-5 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqmul823 multiply 9.9E-6172 1e-5 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqmul824 multiply 1E-6172 -1e-4 -> -1E-6176 Subnormal
dqmul825 multiply 3E-6172 -1e-5 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqmul826 multiply -5E-6172 1e-5 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqmul827 multiply 7E-6172 -1e-5 -> -1E-6176 Underflow Subnormal Inexact Rounded
dqmul828 multiply -9E-6172 1e-5 -> -1E-6176 Underflow Subnormal Inexact Rounded
dqmul829 multiply 9.9E-6172 -1e-5 -> -1E-6176 Underflow Subnormal Inexact Rounded
dqmul830 multiply 3.0E-6172 -1e-5 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqmul831 multiply 1.0E-5977 1e-200 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqmul832 multiply 1.0E-5977 1e-199 -> 1E-6176 Subnormal Rounded
dqmul833 multiply 1.0E-5977 1e-198 -> 1.0E-6175 Subnormal
dqmul834 multiply 2.0E-5977 2e-198 -> 4.0E-6175 Subnormal
dqmul835 multiply 4.0E-5977 4e-198 -> 1.60E-6174 Subnormal
dqmul836 multiply 10.0E-5977 10e-198 -> 1.000E-6173 Subnormal
dqmul837 multiply 30.0E-5977 30e-198 -> 9.000E-6173 Subnormal
dqmul838 multiply 40.0E-5982 40e-166 -> 1.6000E-6145 Subnormal
dqmul839 multiply 40.0E-5982 40e-165 -> 1.6000E-6144 Subnormal
dqmul840 multiply 40.0E-5982 40e-164 -> 1.6000E-6143
-- Long operand overflow may be a different path
dqmul870 multiply 100 9.999E+6143 -> Infinity Inexact Overflow Rounded
dqmul871 multiply 100 -9.999E+6143 -> -Infinity Inexact Overflow Rounded
dqmul872 multiply 9.999E+6143 100 -> Infinity Inexact Overflow Rounded
dqmul873 multiply -9.999E+6143 100 -> -Infinity Inexact Overflow Rounded
-- check for double-rounded subnormals
dqmul881 multiply 1.2347E-6133 1.2347E-40 -> 1.524E-6173 Inexact Rounded Subnormal Underflow
dqmul882 multiply 1.234E-6133 1.234E-40 -> 1.523E-6173 Inexact Rounded Subnormal Underflow
dqmul883 multiply 1.23E-6133 1.23E-40 -> 1.513E-6173 Inexact Rounded Subnormal Underflow
dqmul884 multiply 1.2E-6133 1.2E-40 -> 1.44E-6173 Subnormal
dqmul885 multiply 1.2E-6133 1.2E-41 -> 1.44E-6174 Subnormal
dqmul886 multiply 1.2E-6133 1.2E-42 -> 1.4E-6175 Subnormal Inexact Rounded Underflow
dqmul887 multiply 1.2E-6133 1.3E-42 -> 1.6E-6175 Subnormal Inexact Rounded Underflow
dqmul888 multiply 1.3E-6133 1.3E-42 -> 1.7E-6175 Subnormal Inexact Rounded Underflow
dqmul889 multiply 1.3E-6133 1.3E-43 -> 2E-6176 Subnormal Inexact Rounded Underflow
dqmul890 multiply 1.3E-6134 1.3E-43 -> 0E-6176 Clamped Subnormal Inexact Rounded Underflow
dqmul891 multiply 1.2345E-39 1.234E-6133 -> 1.5234E-6172 Inexact Rounded Subnormal Underflow
dqmul892 multiply 1.23456E-39 1.234E-6133 -> 1.5234E-6172 Inexact Rounded Subnormal Underflow
dqmul893 multiply 1.2345E-40 1.234E-6133 -> 1.523E-6173 Inexact Rounded Subnormal Underflow
dqmul894 multiply 1.23456E-40 1.234E-6133 -> 1.523E-6173 Inexact Rounded Subnormal Underflow
dqmul895 multiply 1.2345E-41 1.234E-6133 -> 1.52E-6174 Inexact Rounded Subnormal Underflow
dqmul896 multiply 1.23456E-41 1.234E-6133 -> 1.52E-6174 Inexact Rounded Subnormal Underflow
-- Now explore the case where we get a normal result with Underflow
-- prove operands are exact
dqmul906 multiply 9.999999999999999999999999999999999E-6143 1 -> 9.999999999999999999999999999999999E-6143
dqmul907 multiply 1 0.09999999999999999999999999999999999 -> 0.09999999999999999999999999999999999
-- the next rounds to Nmin
dqmul908 multiply 9.999999999999999999999999999999999E-6143 0.09999999999999999999999999999999999 -> 1.000000000000000000000000000000000E-6143 Underflow Inexact Subnormal Rounded
-- hugest
dqmul909 multiply 9999999999999999999999999999999999 9999999999999999999999999999999999 -> 9.999999999999999999999999999999998E+67 Inexact Rounded
-- VG case
dqmul910 multiply 8.81125000000001349436E-1548 8.000000000000000000E-1550 -> 7.049000000000010795488000000000000E-3097 Rounded
-- Examples from SQL proposal (Krishna Kulkarni)
precision: 34
rounding: half_up
maxExponent: 6144
minExponent: -6143
dqmul911 multiply 130E-2 120E-2 -> 1.5600
dqmul912 multiply 130E-2 12E-1 -> 1.560
dqmul913 multiply 130E-2 1E0 -> 1.30
dqmul914 multiply 1E2 1E4 -> 1E+6
-- power-of-ten edge cases
dqmul1001 multiply 1 10 -> 10
dqmul1002 multiply 1 100 -> 100
dqmul1003 multiply 1 1000 -> 1000
dqmul1004 multiply 1 10000 -> 10000
dqmul1005 multiply 1 100000 -> 100000
dqmul1006 multiply 1 1000000 -> 1000000
dqmul1007 multiply 1 10000000 -> 10000000
dqmul1008 multiply 1 100000000 -> 100000000
dqmul1009 multiply 1 1000000000 -> 1000000000
dqmul1010 multiply 1 10000000000 -> 10000000000
dqmul1011 multiply 1 100000000000 -> 100000000000
dqmul1012 multiply 1 1000000000000 -> 1000000000000
dqmul1013 multiply 1 10000000000000 -> 10000000000000
dqmul1014 multiply 1 100000000000000 -> 100000000000000
dqmul1015 multiply 1 1000000000000000 -> 1000000000000000
dqmul1016 multiply 1 1000000000000000000 -> 1000000000000000000
dqmul1017 multiply 1 100000000000000000000000000 -> 100000000000000000000000000
dqmul1018 multiply 1 1000000000000000000000000000 -> 1000000000000000000000000000
dqmul1019 multiply 1 10000000000000000000000000000 -> 10000000000000000000000000000
dqmul1020 multiply 1 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqmul1021 multiply 10 1 -> 10
dqmul1022 multiply 10 10 -> 100
dqmul1023 multiply 10 100 -> 1000
dqmul1024 multiply 10 1000 -> 10000
dqmul1025 multiply 10 10000 -> 100000
dqmul1026 multiply 10 100000 -> 1000000
dqmul1027 multiply 10 1000000 -> 10000000
dqmul1028 multiply 10 10000000 -> 100000000
dqmul1029 multiply 10 100000000 -> 1000000000
dqmul1030 multiply 10 1000000000 -> 10000000000
dqmul1031 multiply 10 10000000000 -> 100000000000
dqmul1032 multiply 10 100000000000 -> 1000000000000
dqmul1033 multiply 10 1000000000000 -> 10000000000000
dqmul1034 multiply 10 10000000000000 -> 100000000000000
dqmul1035 multiply 10 100000000000000 -> 1000000000000000
dqmul1036 multiply 10 100000000000000000 -> 1000000000000000000
dqmul1037 multiply 10 10000000000000000000000000 -> 100000000000000000000000000
dqmul1038 multiply 10 100000000000000000000000000 -> 1000000000000000000000000000
dqmul1039 multiply 10 1000000000000000000000000000 -> 10000000000000000000000000000
dqmul1040 multiply 10 100000000000000000000000000000000 -> 1000000000000000000000000000000000
dqmul1041 multiply 100 0.1 -> 10.0
dqmul1042 multiply 100 1 -> 100
dqmul1043 multiply 100 10 -> 1000
dqmul1044 multiply 100 100 -> 10000
dqmul1045 multiply 100 1000 -> 100000
dqmul1046 multiply 100 10000 -> 1000000
dqmul1047 multiply 100 100000 -> 10000000
dqmul1048 multiply 100 1000000 -> 100000000
dqmul1049 multiply 100 10000000 -> 1000000000
dqmul1050 multiply 100 100000000 -> 10000000000
dqmul1051 multiply 100 1000000000 -> 100000000000
dqmul1052 multiply 100 10000000000 -> 1000000000000
dqmul1053 multiply 100 100000000000 -> 10000000000000
dqmul1054 multiply 100 1000000000000 -> 100000000000000
dqmul1055 multiply 100 10000000000000 -> 1000000000000000
dqmul1056 multiply 100 10000000000000000 -> 1000000000000000000
dqmul1057 multiply 100 1000000000000000000000000 -> 100000000000000000000000000
dqmul1058 multiply 100 10000000000000000000000000 -> 1000000000000000000000000000
dqmul1059 multiply 100 100000000000000000000000000 -> 10000000000000000000000000000
dqmul1060 multiply 100 10000000000000000000000000000000 -> 1000000000000000000000000000000000
dqmul1061 multiply 1000 0.01 -> 10.00
dqmul1062 multiply 1000 0.1 -> 100.0
dqmul1063 multiply 1000 1 -> 1000
dqmul1064 multiply 1000 10 -> 10000
dqmul1065 multiply 1000 100 -> 100000
dqmul1066 multiply 1000 1000 -> 1000000
dqmul1067 multiply 1000 10000 -> 10000000
dqmul1068 multiply 1000 100000 -> 100000000
dqmul1069 multiply 1000 1000000 -> 1000000000
dqmul1070 multiply 1000 10000000 -> 10000000000
dqmul1071 multiply 1000 100000000 -> 100000000000
dqmul1072 multiply 1000 1000000000 -> 1000000000000
dqmul1073 multiply 1000 10000000000 -> 10000000000000
dqmul1074 multiply 1000 100000000000 -> 100000000000000
dqmul1075 multiply 1000 1000000000000 -> 1000000000000000
dqmul1076 multiply 1000 1000000000000000 -> 1000000000000000000
dqmul1077 multiply 1000 100000000000000000000000 -> 100000000000000000000000000
dqmul1078 multiply 1000 1000000000000000000000000 -> 1000000000000000000000000000
dqmul1079 multiply 1000 10000000000000000000000000 -> 10000000000000000000000000000
dqmul1080 multiply 1000 1000000000000000000000000000000 -> 1000000000000000000000000000000000
dqmul1081 multiply 10000 0.001 -> 10.000
dqmul1082 multiply 10000 0.01 -> 100.00
dqmul1083 multiply 10000 0.1 -> 1000.0
dqmul1084 multiply 10000 1 -> 10000
dqmul1085 multiply 10000 10 -> 100000
dqmul1086 multiply 10000 100 -> 1000000
dqmul1087 multiply 10000 1000 -> 10000000
dqmul1088 multiply 10000 10000 -> 100000000
dqmul1089 multiply 10000 100000 -> 1000000000
dqmul1090 multiply 10000 1000000 -> 10000000000
dqmul1091 multiply 10000 10000000 -> 100000000000
dqmul1092 multiply 10000 100000000 -> 1000000000000
dqmul1093 multiply 10000 1000000000 -> 10000000000000
dqmul1094 multiply 10000 10000000000 -> 100000000000000
dqmul1095 multiply 10000 100000000000 -> 1000000000000000
dqmul1096 multiply 10000 100000000000000 -> 1000000000000000000
dqmul1097 multiply 10000 10000000000000000000000 -> 100000000000000000000000000
dqmul1098 multiply 10000 100000000000000000000000 -> 1000000000000000000000000000
dqmul1099 multiply 10000 1000000000000000000000000 -> 10000000000000000000000000000
dqmul1100 multiply 10000 100000000000000000000000000000 -> 1000000000000000000000000000000000
dqmul1107 multiply 10000 99999999999 -> 999999999990000
dqmul1108 multiply 10000 99999999999 -> 999999999990000
-- Null tests
dqmul9990 multiply 10 # -> NaN Invalid_operation
dqmul9991 multiply # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,126 @@
------------------------------------------------------------------------
-- dqNextMinus.decTest -- decQuad next that is less [754r nextdown] --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqnextm001 nextminus 0.9999999999999999999999999999999995 -> 0.9999999999999999999999999999999994
dqnextm002 nextminus 0.9999999999999999999999999999999996 -> 0.9999999999999999999999999999999995
dqnextm003 nextminus 0.9999999999999999999999999999999997 -> 0.9999999999999999999999999999999996
dqnextm004 nextminus 0.9999999999999999999999999999999998 -> 0.9999999999999999999999999999999997
dqnextm005 nextminus 0.9999999999999999999999999999999999 -> 0.9999999999999999999999999999999998
dqnextm006 nextminus 1.000000000000000000000000000000000 -> 0.9999999999999999999999999999999999
dqnextm007 nextminus 1.0 -> 0.9999999999999999999999999999999999
dqnextm008 nextminus 1 -> 0.9999999999999999999999999999999999
dqnextm009 nextminus 1.000000000000000000000000000000001 -> 1.000000000000000000000000000000000
dqnextm010 nextminus 1.000000000000000000000000000000002 -> 1.000000000000000000000000000000001
dqnextm011 nextminus 1.000000000000000000000000000000003 -> 1.000000000000000000000000000000002
dqnextm012 nextminus 1.000000000000000000000000000000004 -> 1.000000000000000000000000000000003
dqnextm013 nextminus 1.000000000000000000000000000000005 -> 1.000000000000000000000000000000004
dqnextm014 nextminus 1.000000000000000000000000000000006 -> 1.000000000000000000000000000000005
dqnextm015 nextminus 1.000000000000000000000000000000007 -> 1.000000000000000000000000000000006
dqnextm016 nextminus 1.000000000000000000000000000000008 -> 1.000000000000000000000000000000007
dqnextm017 nextminus 1.000000000000000000000000000000009 -> 1.000000000000000000000000000000008
dqnextm018 nextminus 1.000000000000000000000000000000010 -> 1.000000000000000000000000000000009
dqnextm019 nextminus 1.000000000000000000000000000000011 -> 1.000000000000000000000000000000010
dqnextm020 nextminus 1.000000000000000000000000000000012 -> 1.000000000000000000000000000000011
dqnextm021 nextminus -0.9999999999999999999999999999999995 -> -0.9999999999999999999999999999999996
dqnextm022 nextminus -0.9999999999999999999999999999999996 -> -0.9999999999999999999999999999999997
dqnextm023 nextminus -0.9999999999999999999999999999999997 -> -0.9999999999999999999999999999999998
dqnextm024 nextminus -0.9999999999999999999999999999999998 -> -0.9999999999999999999999999999999999
dqnextm025 nextminus -0.9999999999999999999999999999999999 -> -1.000000000000000000000000000000000
dqnextm026 nextminus -1.000000000000000000000000000000000 -> -1.000000000000000000000000000000001
dqnextm027 nextminus -1.0 -> -1.000000000000000000000000000000001
dqnextm028 nextminus -1 -> -1.000000000000000000000000000000001
dqnextm029 nextminus -1.000000000000000000000000000000001 -> -1.000000000000000000000000000000002
dqnextm030 nextminus -1.000000000000000000000000000000002 -> -1.000000000000000000000000000000003
dqnextm031 nextminus -1.000000000000000000000000000000003 -> -1.000000000000000000000000000000004
dqnextm032 nextminus -1.000000000000000000000000000000004 -> -1.000000000000000000000000000000005
dqnextm033 nextminus -1.000000000000000000000000000000005 -> -1.000000000000000000000000000000006
dqnextm034 nextminus -1.000000000000000000000000000000006 -> -1.000000000000000000000000000000007
dqnextm035 nextminus -1.000000000000000000000000000000007 -> -1.000000000000000000000000000000008
dqnextm036 nextminus -1.000000000000000000000000000000008 -> -1.000000000000000000000000000000009
dqnextm037 nextminus -1.000000000000000000000000000000009 -> -1.000000000000000000000000000000010
dqnextm038 nextminus -1.000000000000000000000000000000010 -> -1.000000000000000000000000000000011
dqnextm039 nextminus -1.000000000000000000000000000000011 -> -1.000000000000000000000000000000012
-- ultra-tiny inputs
dqnextm062 nextminus 1E-6176 -> 0E-6176
dqnextm065 nextminus -1E-6176 -> -2E-6176
-- Zeros
dqnextm100 nextminus -0 -> -1E-6176
dqnextm101 nextminus 0 -> -1E-6176
dqnextm102 nextminus 0.00 -> -1E-6176
dqnextm103 nextminus -0.00 -> -1E-6176
dqnextm104 nextminus 0E-300 -> -1E-6176
dqnextm105 nextminus 0E+300 -> -1E-6176
dqnextm106 nextminus 0E+30000 -> -1E-6176
dqnextm107 nextminus -0E+30000 -> -1E-6176
-- specials
dqnextm150 nextminus Inf -> 9.999999999999999999999999999999999E+6144
dqnextm151 nextminus -Inf -> -Infinity
dqnextm152 nextminus NaN -> NaN
dqnextm153 nextminus sNaN -> NaN Invalid_operation
dqnextm154 nextminus NaN77 -> NaN77
dqnextm155 nextminus sNaN88 -> NaN88 Invalid_operation
dqnextm156 nextminus -NaN -> -NaN
dqnextm157 nextminus -sNaN -> -NaN Invalid_operation
dqnextm158 nextminus -NaN77 -> -NaN77
dqnextm159 nextminus -sNaN88 -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
dqnextm170 nextminus 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999998E+6144
dqnextm171 nextminus 9.999999999999999999999999999999998E+6144 -> 9.999999999999999999999999999999997E+6144
dqnextm172 nextminus 1E-6143 -> 9.99999999999999999999999999999999E-6144
dqnextm173 nextminus 1.000000000000000000000000000000000E-6143 -> 9.99999999999999999999999999999999E-6144
dqnextm174 nextminus 9E-6176 -> 8E-6176
dqnextm175 nextminus 9.9E-6175 -> 9.8E-6175
dqnextm176 nextminus 9.99999999999999999999999999999E-6147 -> 9.99999999999999999999999999998E-6147
dqnextm177 nextminus 9.99999999999999999999999999999999E-6144 -> 9.99999999999999999999999999999998E-6144
dqnextm178 nextminus 9.99999999999999999999999999999998E-6144 -> 9.99999999999999999999999999999997E-6144
dqnextm179 nextminus 9.99999999999999999999999999999997E-6144 -> 9.99999999999999999999999999999996E-6144
dqnextm180 nextminus 0E-6176 -> -1E-6176
dqnextm181 nextminus 1E-6176 -> 0E-6176
dqnextm182 nextminus 2E-6176 -> 1E-6176
dqnextm183 nextminus -0E-6176 -> -1E-6176
dqnextm184 nextminus -1E-6176 -> -2E-6176
dqnextm185 nextminus -2E-6176 -> -3E-6176
dqnextm186 nextminus -10E-6176 -> -1.1E-6175
dqnextm187 nextminus -100E-6176 -> -1.01E-6174
dqnextm188 nextminus -100000E-6176 -> -1.00001E-6171
dqnextm189 nextminus -1.00000000000000000000000000000E-6143 -> -1.000000000000000000000000000000001E-6143
dqnextm190 nextminus -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000001E-6143
dqnextm191 nextminus -1E-6143 -> -1.000000000000000000000000000000001E-6143
dqnextm192 nextminus -9.999999999999999999999999999999998E+6144 -> -9.999999999999999999999999999999999E+6144
dqnextm193 nextminus -9.999999999999999999999999999999999E+6144 -> -Infinity
-- Null tests
dqnextm900 nextminus # -> NaN Invalid_operation

View File

@@ -0,0 +1,375 @@
------------------------------------------------------------------------
-- dqNextToward.decTest -- decQuad next toward rhs [754r nextafter] --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check with a scattering of numerics
dqnextt001 nexttoward 10 10 -> 10
dqnextt002 nexttoward -10 -10 -> -10
dqnextt003 nexttoward 1 10 -> 1.000000000000000000000000000000001
dqnextt004 nexttoward 1 -10 -> 0.9999999999999999999999999999999999
dqnextt005 nexttoward -1 10 -> -0.9999999999999999999999999999999999
dqnextt006 nexttoward -1 -10 -> -1.000000000000000000000000000000001
dqnextt007 nexttoward 0 10 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt008 nexttoward 0 -10 -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt009 nexttoward 9.999999999999999999999999999999999E+6144 +Infinity -> Infinity Overflow Inexact Rounded
dqnextt010 nexttoward -9.999999999999999999999999999999999E+6144 -Infinity -> -Infinity Overflow Inexact Rounded
dqnextt011 nexttoward 9.999999999999999999999999999999999 10 -> 10.00000000000000000000000000000000
dqnextt012 nexttoward 10 9.999999999999999999999999999999999 -> 9.999999999999999999999999999999999
dqnextt013 nexttoward -9.999999999999999999999999999999999 -10 -> -10.00000000000000000000000000000000
dqnextt014 nexttoward -10 -9.999999999999999999999999999999999 -> -9.999999999999999999999999999999999
dqnextt015 nexttoward 9.999999999999999999999999999999998 10 -> 9.999999999999999999999999999999999
dqnextt016 nexttoward 10 9.999999999999999999999999999999998 -> 9.999999999999999999999999999999999
dqnextt017 nexttoward -9.999999999999999999999999999999998 -10 -> -9.999999999999999999999999999999999
dqnextt018 nexttoward -10 -9.999999999999999999999999999999998 -> -9.999999999999999999999999999999999
------- lhs=rhs
-- finites
dqnextt101 nexttoward 7 7 -> 7
dqnextt102 nexttoward -7 -7 -> -7
dqnextt103 nexttoward 75 75 -> 75
dqnextt104 nexttoward -75 -75 -> -75
dqnextt105 nexttoward 7.50 7.5 -> 7.50
dqnextt106 nexttoward -7.50 -7.50 -> -7.50
dqnextt107 nexttoward 7.500 7.5000 -> 7.500
dqnextt108 nexttoward -7.500 -7.5 -> -7.500
-- zeros
dqnextt111 nexttoward 0 0 -> 0
dqnextt112 nexttoward -0 -0 -> -0
dqnextt113 nexttoward 0E+4 0 -> 0E+4
dqnextt114 nexttoward -0E+4 -0 -> -0E+4
dqnextt115 nexttoward 0.00000000000 0.000000000000 -> 0E-11
dqnextt116 nexttoward -0.00000000000 -0.00 -> -0E-11
dqnextt117 nexttoward 0E-141 0 -> 0E-141
dqnextt118 nexttoward -0E-141 -000 -> -0E-141
-- full coefficients, alternating bits
dqnextt121 nexttoward 268268268 268268268 -> 268268268
dqnextt122 nexttoward -268268268 -268268268 -> -268268268
dqnextt123 nexttoward 134134134 134134134 -> 134134134
dqnextt124 nexttoward -134134134 -134134134 -> -134134134
-- Nmax, Nmin, Ntiny
dqnextt131 nexttoward 9.999999999999999999999999999999999E+6144 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqnextt132 nexttoward 1E-6143 1E-6143 -> 1E-6143
dqnextt133 nexttoward 1.000000000000000000000000000000000E-6143 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqnextt134 nexttoward 1E-6176 1E-6176 -> 1E-6176
dqnextt135 nexttoward -1E-6176 -1E-6176 -> -1E-6176
dqnextt136 nexttoward -1.000000000000000000000000000000000E-6143 -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqnextt137 nexttoward -1E-6143 -1E-6143 -> -1E-6143
dqnextt138 nexttoward -9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
------- lhs<rhs
dqnextt201 nexttoward 0.9999999999999999999999999999999995 Infinity -> 0.9999999999999999999999999999999996
dqnextt202 nexttoward 0.9999999999999999999999999999999996 Infinity -> 0.9999999999999999999999999999999997
dqnextt203 nexttoward 0.9999999999999999999999999999999997 Infinity -> 0.9999999999999999999999999999999998
dqnextt204 nexttoward 0.9999999999999999999999999999999998 Infinity -> 0.9999999999999999999999999999999999
dqnextt205 nexttoward 0.9999999999999999999999999999999999 Infinity -> 1.000000000000000000000000000000000
dqnextt206 nexttoward 1.000000000000000000000000000000000 Infinity -> 1.000000000000000000000000000000001
dqnextt207 nexttoward 1.0 Infinity -> 1.000000000000000000000000000000001
dqnextt208 nexttoward 1 Infinity -> 1.000000000000000000000000000000001
dqnextt209 nexttoward 1.000000000000000000000000000000001 Infinity -> 1.000000000000000000000000000000002
dqnextt210 nexttoward 1.000000000000000000000000000000002 Infinity -> 1.000000000000000000000000000000003
dqnextt211 nexttoward 1.000000000000000000000000000000003 Infinity -> 1.000000000000000000000000000000004
dqnextt212 nexttoward 1.000000000000000000000000000000004 Infinity -> 1.000000000000000000000000000000005
dqnextt213 nexttoward 1.000000000000000000000000000000005 Infinity -> 1.000000000000000000000000000000006
dqnextt214 nexttoward 1.000000000000000000000000000000006 Infinity -> 1.000000000000000000000000000000007
dqnextt215 nexttoward 1.000000000000000000000000000000007 Infinity -> 1.000000000000000000000000000000008
dqnextt216 nexttoward 1.000000000000000000000000000000008 Infinity -> 1.000000000000000000000000000000009
dqnextt217 nexttoward 1.000000000000000000000000000000009 Infinity -> 1.000000000000000000000000000000010
dqnextt218 nexttoward 1.000000000000000000000000000000010 Infinity -> 1.000000000000000000000000000000011
dqnextt219 nexttoward 1.000000000000000000000000000000011 Infinity -> 1.000000000000000000000000000000012
dqnextt221 nexttoward -0.9999999999999999999999999999999995 Infinity -> -0.9999999999999999999999999999999994
dqnextt222 nexttoward -0.9999999999999999999999999999999996 Infinity -> -0.9999999999999999999999999999999995
dqnextt223 nexttoward -0.9999999999999999999999999999999997 Infinity -> -0.9999999999999999999999999999999996
dqnextt224 nexttoward -0.9999999999999999999999999999999998 Infinity -> -0.9999999999999999999999999999999997
dqnextt225 nexttoward -0.9999999999999999999999999999999999 Infinity -> -0.9999999999999999999999999999999998
dqnextt226 nexttoward -1.000000000000000000000000000000000 Infinity -> -0.9999999999999999999999999999999999
dqnextt227 nexttoward -1.0 Infinity -> -0.9999999999999999999999999999999999
dqnextt228 nexttoward -1 Infinity -> -0.9999999999999999999999999999999999
dqnextt229 nexttoward -1.000000000000000000000000000000001 Infinity -> -1.000000000000000000000000000000000
dqnextt230 nexttoward -1.000000000000000000000000000000002 Infinity -> -1.000000000000000000000000000000001
dqnextt231 nexttoward -1.000000000000000000000000000000003 Infinity -> -1.000000000000000000000000000000002
dqnextt232 nexttoward -1.000000000000000000000000000000004 Infinity -> -1.000000000000000000000000000000003
dqnextt233 nexttoward -1.000000000000000000000000000000005 Infinity -> -1.000000000000000000000000000000004
dqnextt234 nexttoward -1.000000000000000000000000000000006 Infinity -> -1.000000000000000000000000000000005
dqnextt235 nexttoward -1.000000000000000000000000000000007 Infinity -> -1.000000000000000000000000000000006
dqnextt236 nexttoward -1.000000000000000000000000000000008 Infinity -> -1.000000000000000000000000000000007
dqnextt237 nexttoward -1.000000000000000000000000000000009 Infinity -> -1.000000000000000000000000000000008
dqnextt238 nexttoward -1.000000000000000000000000000000010 Infinity -> -1.000000000000000000000000000000009
dqnextt239 nexttoward -1.000000000000000000000000000000011 Infinity -> -1.000000000000000000000000000000010
dqnextt240 nexttoward -1.000000000000000000000000000000012 Infinity -> -1.000000000000000000000000000000011
-- Zeros
dqnextt300 nexttoward 0 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt301 nexttoward 0.00 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt302 nexttoward 0E-300 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt303 nexttoward 0E+300 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt304 nexttoward 0E+30000 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt305 nexttoward -0 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt306 nexttoward -0.00 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt307 nexttoward -0E-300 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt308 nexttoward -0E+300 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt309 nexttoward -0E+30000 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
-- specials
dqnextt350 nexttoward Inf Infinity -> Infinity
dqnextt351 nexttoward -Inf Infinity -> -9.999999999999999999999999999999999E+6144
dqnextt352 nexttoward NaN Infinity -> NaN
dqnextt353 nexttoward sNaN Infinity -> NaN Invalid_operation
dqnextt354 nexttoward NaN77 Infinity -> NaN77
dqnextt355 nexttoward sNaN88 Infinity -> NaN88 Invalid_operation
dqnextt356 nexttoward -NaN Infinity -> -NaN
dqnextt357 nexttoward -sNaN Infinity -> -NaN Invalid_operation
dqnextt358 nexttoward -NaN77 Infinity -> -NaN77
dqnextt359 nexttoward -sNaN88 Infinity -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
dqnextt370 nexttoward -9.999999999999999999999999999999999E+6144 Infinity -> -9.999999999999999999999999999999998E+6144
dqnextt371 nexttoward -9.999999999999999999999999999999998E+6144 Infinity -> -9.999999999999999999999999999999997E+6144
dqnextt372 nexttoward -1E-6143 Infinity -> -9.99999999999999999999999999999999E-6144 Underflow Subnormal Inexact Rounded
dqnextt373 nexttoward -1.000000000000000E-6143 Infinity -> -9.99999999999999999999999999999999E-6144 Underflow Subnormal Inexact Rounded
dqnextt374 nexttoward -9E-6176 Infinity -> -8E-6176 Underflow Subnormal Inexact Rounded
dqnextt375 nexttoward -9.9E-6175 Infinity -> -9.8E-6175 Underflow Subnormal Inexact Rounded
dqnextt376 nexttoward -9.99999999999999999999999999999E-6147 Infinity -> -9.99999999999999999999999999998E-6147 Underflow Subnormal Inexact Rounded
dqnextt377 nexttoward -9.99999999999999999999999999999999E-6144 Infinity -> -9.99999999999999999999999999999998E-6144 Underflow Subnormal Inexact Rounded
dqnextt378 nexttoward -9.99999999999999999999999999999998E-6144 Infinity -> -9.99999999999999999999999999999997E-6144 Underflow Subnormal Inexact Rounded
dqnextt379 nexttoward -9.99999999999999999999999999999997E-6144 Infinity -> -9.99999999999999999999999999999996E-6144 Underflow Subnormal Inexact Rounded
dqnextt380 nexttoward -0E-6176 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt381 nexttoward -1E-6176 Infinity -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqnextt382 nexttoward -2E-6176 Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt383 nexttoward 0E-6176 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt384 nexttoward 1E-6176 Infinity -> 2E-6176 Underflow Subnormal Inexact Rounded
dqnextt385 nexttoward 2E-6176 Infinity -> 3E-6176 Underflow Subnormal Inexact Rounded
dqnextt386 nexttoward 10E-6176 Infinity -> 1.1E-6175 Underflow Subnormal Inexact Rounded
dqnextt387 nexttoward 100E-6176 Infinity -> 1.01E-6174 Underflow Subnormal Inexact Rounded
dqnextt388 nexttoward 100000E-6176 Infinity -> 1.00001E-6171 Underflow Subnormal Inexact Rounded
dqnextt389 nexttoward 1.00000000000000000000000000000E-6143 Infinity -> 1.000000000000000000000000000000001E-6143
dqnextt390 nexttoward 1.000000000000000000000000000000000E-6143 Infinity -> 1.000000000000000000000000000000001E-6143
dqnextt391 nexttoward 1E-6143 Infinity -> 1.000000000000000000000000000000001E-6143
dqnextt392 nexttoward 9.999999999999999999999999999999997E+6144 Infinity -> 9.999999999999999999999999999999998E+6144
dqnextt393 nexttoward 9.999999999999999999999999999999998E+6144 Infinity -> 9.999999999999999999999999999999999E+6144
dqnextt394 nexttoward 9.999999999999999999999999999999999E+6144 Infinity -> Infinity Overflow Inexact Rounded
------- lhs>rhs
dqnextt401 nexttoward 0.9999999999999999999999999999999995 -Infinity -> 0.9999999999999999999999999999999994
dqnextt402 nexttoward 0.9999999999999999999999999999999996 -Infinity -> 0.9999999999999999999999999999999995
dqnextt403 nexttoward 0.9999999999999999999999999999999997 -Infinity -> 0.9999999999999999999999999999999996
dqnextt404 nexttoward 0.9999999999999999999999999999999998 -Infinity -> 0.9999999999999999999999999999999997
dqnextt405 nexttoward 0.9999999999999999999999999999999999 -Infinity -> 0.9999999999999999999999999999999998
dqnextt406 nexttoward 1.000000000000000000000000000000000 -Infinity -> 0.9999999999999999999999999999999999
dqnextt407 nexttoward 1.0 -Infinity -> 0.9999999999999999999999999999999999
dqnextt408 nexttoward 1 -Infinity -> 0.9999999999999999999999999999999999
dqnextt409 nexttoward 1.000000000000000000000000000000001 -Infinity -> 1.000000000000000000000000000000000
dqnextt410 nexttoward 1.000000000000000000000000000000002 -Infinity -> 1.000000000000000000000000000000001
dqnextt411 nexttoward 1.000000000000000000000000000000003 -Infinity -> 1.000000000000000000000000000000002
dqnextt412 nexttoward 1.000000000000000000000000000000004 -Infinity -> 1.000000000000000000000000000000003
dqnextt413 nexttoward 1.000000000000000000000000000000005 -Infinity -> 1.000000000000000000000000000000004
dqnextt414 nexttoward 1.000000000000000000000000000000006 -Infinity -> 1.000000000000000000000000000000005
dqnextt415 nexttoward 1.000000000000000000000000000000007 -Infinity -> 1.000000000000000000000000000000006
dqnextt416 nexttoward 1.000000000000000000000000000000008 -Infinity -> 1.000000000000000000000000000000007
dqnextt417 nexttoward 1.000000000000000000000000000000009 -Infinity -> 1.000000000000000000000000000000008
dqnextt418 nexttoward 1.000000000000000000000000000000010 -Infinity -> 1.000000000000000000000000000000009
dqnextt419 nexttoward 1.000000000000000000000000000000011 -Infinity -> 1.000000000000000000000000000000010
dqnextt420 nexttoward 1.000000000000000000000000000000012 -Infinity -> 1.000000000000000000000000000000011
dqnextt421 nexttoward -0.9999999999999999999999999999999995 -Infinity -> -0.9999999999999999999999999999999996
dqnextt422 nexttoward -0.9999999999999999999999999999999996 -Infinity -> -0.9999999999999999999999999999999997
dqnextt423 nexttoward -0.9999999999999999999999999999999997 -Infinity -> -0.9999999999999999999999999999999998
dqnextt424 nexttoward -0.9999999999999999999999999999999998 -Infinity -> -0.9999999999999999999999999999999999
dqnextt425 nexttoward -0.9999999999999999999999999999999999 -Infinity -> -1.000000000000000000000000000000000
dqnextt426 nexttoward -1.000000000000000000000000000000000 -Infinity -> -1.000000000000000000000000000000001
dqnextt427 nexttoward -1.0 -Infinity -> -1.000000000000000000000000000000001
dqnextt428 nexttoward -1 -Infinity -> -1.000000000000000000000000000000001
dqnextt429 nexttoward -1.000000000000000000000000000000001 -Infinity -> -1.000000000000000000000000000000002
dqnextt430 nexttoward -1.000000000000000000000000000000002 -Infinity -> -1.000000000000000000000000000000003
dqnextt431 nexttoward -1.000000000000000000000000000000003 -Infinity -> -1.000000000000000000000000000000004
dqnextt432 nexttoward -1.000000000000000000000000000000004 -Infinity -> -1.000000000000000000000000000000005
dqnextt433 nexttoward -1.000000000000000000000000000000005 -Infinity -> -1.000000000000000000000000000000006
dqnextt434 nexttoward -1.000000000000000000000000000000006 -Infinity -> -1.000000000000000000000000000000007
dqnextt435 nexttoward -1.000000000000000000000000000000007 -Infinity -> -1.000000000000000000000000000000008
dqnextt436 nexttoward -1.000000000000000000000000000000008 -Infinity -> -1.000000000000000000000000000000009
dqnextt437 nexttoward -1.000000000000000000000000000000009 -Infinity -> -1.000000000000000000000000000000010
dqnextt438 nexttoward -1.000000000000000000000000000000010 -Infinity -> -1.000000000000000000000000000000011
dqnextt439 nexttoward -1.000000000000000000000000000000011 -Infinity -> -1.000000000000000000000000000000012
-- Zeros
dqnextt500 nexttoward -0 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt501 nexttoward 0 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt502 nexttoward 0.00 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt503 nexttoward -0.00 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt504 nexttoward 0E-300 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt505 nexttoward 0E+300 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt506 nexttoward 0E+30000 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt507 nexttoward -0E+30000 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
-- specials
dqnextt550 nexttoward Inf -Infinity -> 9.999999999999999999999999999999999E+6144
dqnextt551 nexttoward -Inf -Infinity -> -Infinity
dqnextt552 nexttoward NaN -Infinity -> NaN
dqnextt553 nexttoward sNaN -Infinity -> NaN Invalid_operation
dqnextt554 nexttoward NaN77 -Infinity -> NaN77
dqnextt555 nexttoward sNaN88 -Infinity -> NaN88 Invalid_operation
dqnextt556 nexttoward -NaN -Infinity -> -NaN
dqnextt557 nexttoward -sNaN -Infinity -> -NaN Invalid_operation
dqnextt558 nexttoward -NaN77 -Infinity -> -NaN77
dqnextt559 nexttoward -sNaN88 -Infinity -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
dqnextt670 nexttoward 9.999999999999999999999999999999999E+6144 -Infinity -> 9.999999999999999999999999999999998E+6144
dqnextt671 nexttoward 9.999999999999999999999999999999998E+6144 -Infinity -> 9.999999999999999999999999999999997E+6144
dqnextt672 nexttoward 1E-6143 -Infinity -> 9.99999999999999999999999999999999E-6144 Underflow Subnormal Inexact Rounded
dqnextt673 nexttoward 1.000000000000000000000000000000000E-6143 -Infinity -> 9.99999999999999999999999999999999E-6144 Underflow Subnormal Inexact Rounded
dqnextt674 nexttoward 9E-6176 -Infinity -> 8E-6176 Underflow Subnormal Inexact Rounded
dqnextt675 nexttoward 9.9E-6175 -Infinity -> 9.8E-6175 Underflow Subnormal Inexact Rounded
dqnextt676 nexttoward 9.99999999999999999999999999999E-6147 -Infinity -> 9.99999999999999999999999999998E-6147 Underflow Subnormal Inexact Rounded
dqnextt677 nexttoward 9.99999999999999999999999999999999E-6144 -Infinity -> 9.99999999999999999999999999999998E-6144 Underflow Subnormal Inexact Rounded
dqnextt678 nexttoward 9.99999999999999999999999999999998E-6144 -Infinity -> 9.99999999999999999999999999999997E-6144 Underflow Subnormal Inexact Rounded
dqnextt679 nexttoward 9.99999999999999999999999999999997E-6144 -Infinity -> 9.99999999999999999999999999999996E-6144 Underflow Subnormal Inexact Rounded
dqnextt680 nexttoward 0E-6176 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt681 nexttoward 1E-6176 -Infinity -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqnextt682 nexttoward 2E-6176 -Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt683 nexttoward -0E-6176 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt684 nexttoward -1E-6176 -Infinity -> -2E-6176 Underflow Subnormal Inexact Rounded
dqnextt685 nexttoward -2E-6176 -Infinity -> -3E-6176 Underflow Subnormal Inexact Rounded
dqnextt686 nexttoward -10E-6176 -Infinity -> -1.1E-6175 Underflow Subnormal Inexact Rounded
dqnextt687 nexttoward -100E-6176 -Infinity -> -1.01E-6174 Underflow Subnormal Inexact Rounded
dqnextt688 nexttoward -100000E-6176 -Infinity -> -1.00001E-6171 Underflow Subnormal Inexact Rounded
dqnextt689 nexttoward -1.00000000000000000000000000000E-6143 -Infinity -> -1.000000000000000000000000000000001E-6143
dqnextt690 nexttoward -1.000000000000000000000000000000000E-6143 -Infinity -> -1.000000000000000000000000000000001E-6143
dqnextt691 nexttoward -1E-6143 -Infinity -> -1.000000000000000000000000000000001E-6143
dqnextt692 nexttoward -9.999999999999999999999999999999998E+6144 -Infinity -> -9.999999999999999999999999999999999E+6144
dqnextt693 nexttoward -9.999999999999999999999999999999999E+6144 -Infinity -> -Infinity Overflow Inexact Rounded
------- Specials
dqnextt780 nexttoward -Inf -Inf -> -Infinity
dqnextt781 nexttoward -Inf -1000 -> -9.999999999999999999999999999999999E+6144
dqnextt782 nexttoward -Inf -1 -> -9.999999999999999999999999999999999E+6144
dqnextt783 nexttoward -Inf -0 -> -9.999999999999999999999999999999999E+6144
dqnextt784 nexttoward -Inf 0 -> -9.999999999999999999999999999999999E+6144
dqnextt785 nexttoward -Inf 1 -> -9.999999999999999999999999999999999E+6144
dqnextt786 nexttoward -Inf 1000 -> -9.999999999999999999999999999999999E+6144
dqnextt787 nexttoward -1000 -Inf -> -1000.000000000000000000000000000001
dqnextt788 nexttoward -Inf -Inf -> -Infinity
dqnextt789 nexttoward -1 -Inf -> -1.000000000000000000000000000000001
dqnextt790 nexttoward -0 -Inf -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt791 nexttoward 0 -Inf -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt792 nexttoward 1 -Inf -> 0.9999999999999999999999999999999999
dqnextt793 nexttoward 1000 -Inf -> 999.9999999999999999999999999999999
dqnextt794 nexttoward Inf -Inf -> 9.999999999999999999999999999999999E+6144
dqnextt800 nexttoward Inf -Inf -> 9.999999999999999999999999999999999E+6144
dqnextt801 nexttoward Inf -1000 -> 9.999999999999999999999999999999999E+6144
dqnextt802 nexttoward Inf -1 -> 9.999999999999999999999999999999999E+6144
dqnextt803 nexttoward Inf -0 -> 9.999999999999999999999999999999999E+6144
dqnextt804 nexttoward Inf 0 -> 9.999999999999999999999999999999999E+6144
dqnextt805 nexttoward Inf 1 -> 9.999999999999999999999999999999999E+6144
dqnextt806 nexttoward Inf 1000 -> 9.999999999999999999999999999999999E+6144
dqnextt807 nexttoward Inf Inf -> Infinity
dqnextt808 nexttoward -1000 Inf -> -999.9999999999999999999999999999999
dqnextt809 nexttoward -Inf Inf -> -9.999999999999999999999999999999999E+6144
dqnextt810 nexttoward -1 Inf -> -0.9999999999999999999999999999999999
dqnextt811 nexttoward -0 Inf -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt812 nexttoward 0 Inf -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt813 nexttoward 1 Inf -> 1.000000000000000000000000000000001
dqnextt814 nexttoward 1000 Inf -> 1000.000000000000000000000000000001
dqnextt815 nexttoward Inf Inf -> Infinity
dqnextt821 nexttoward NaN -Inf -> NaN
dqnextt822 nexttoward NaN -1000 -> NaN
dqnextt823 nexttoward NaN -1 -> NaN
dqnextt824 nexttoward NaN -0 -> NaN
dqnextt825 nexttoward NaN 0 -> NaN
dqnextt826 nexttoward NaN 1 -> NaN
dqnextt827 nexttoward NaN 1000 -> NaN
dqnextt828 nexttoward NaN Inf -> NaN
dqnextt829 nexttoward NaN NaN -> NaN
dqnextt830 nexttoward -Inf NaN -> NaN
dqnextt831 nexttoward -1000 NaN -> NaN
dqnextt832 nexttoward -1 NaN -> NaN
dqnextt833 nexttoward -0 NaN -> NaN
dqnextt834 nexttoward 0 NaN -> NaN
dqnextt835 nexttoward 1 NaN -> NaN
dqnextt836 nexttoward 1000 NaN -> NaN
dqnextt837 nexttoward Inf NaN -> NaN
dqnextt841 nexttoward sNaN -Inf -> NaN Invalid_operation
dqnextt842 nexttoward sNaN -1000 -> NaN Invalid_operation
dqnextt843 nexttoward sNaN -1 -> NaN Invalid_operation
dqnextt844 nexttoward sNaN -0 -> NaN Invalid_operation
dqnextt845 nexttoward sNaN 0 -> NaN Invalid_operation
dqnextt846 nexttoward sNaN 1 -> NaN Invalid_operation
dqnextt847 nexttoward sNaN 1000 -> NaN Invalid_operation
dqnextt848 nexttoward sNaN NaN -> NaN Invalid_operation
dqnextt849 nexttoward sNaN sNaN -> NaN Invalid_operation
dqnextt850 nexttoward NaN sNaN -> NaN Invalid_operation
dqnextt851 nexttoward -Inf sNaN -> NaN Invalid_operation
dqnextt852 nexttoward -1000 sNaN -> NaN Invalid_operation
dqnextt853 nexttoward -1 sNaN -> NaN Invalid_operation
dqnextt854 nexttoward -0 sNaN -> NaN Invalid_operation
dqnextt855 nexttoward 0 sNaN -> NaN Invalid_operation
dqnextt856 nexttoward 1 sNaN -> NaN Invalid_operation
dqnextt857 nexttoward 1000 sNaN -> NaN Invalid_operation
dqnextt858 nexttoward Inf sNaN -> NaN Invalid_operation
dqnextt859 nexttoward NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqnextt861 nexttoward NaN1 -Inf -> NaN1
dqnextt862 nexttoward +NaN2 -1000 -> NaN2
dqnextt863 nexttoward NaN3 1000 -> NaN3
dqnextt864 nexttoward NaN4 Inf -> NaN4
dqnextt865 nexttoward NaN5 +NaN6 -> NaN5
dqnextt866 nexttoward -Inf NaN7 -> NaN7
dqnextt867 nexttoward -1000 NaN8 -> NaN8
dqnextt868 nexttoward 1000 NaN9 -> NaN9
dqnextt869 nexttoward Inf +NaN10 -> NaN10
dqnextt871 nexttoward sNaN11 -Inf -> NaN11 Invalid_operation
dqnextt872 nexttoward sNaN12 -1000 -> NaN12 Invalid_operation
dqnextt873 nexttoward sNaN13 1000 -> NaN13 Invalid_operation
dqnextt874 nexttoward sNaN14 NaN17 -> NaN14 Invalid_operation
dqnextt875 nexttoward sNaN15 sNaN18 -> NaN15 Invalid_operation
dqnextt876 nexttoward NaN16 sNaN19 -> NaN19 Invalid_operation
dqnextt877 nexttoward -Inf +sNaN20 -> NaN20 Invalid_operation
dqnextt878 nexttoward -1000 sNaN21 -> NaN21 Invalid_operation
dqnextt879 nexttoward 1000 sNaN22 -> NaN22 Invalid_operation
dqnextt880 nexttoward Inf sNaN23 -> NaN23 Invalid_operation
dqnextt881 nexttoward +NaN25 +sNaN24 -> NaN24 Invalid_operation
dqnextt882 nexttoward -NaN26 NaN28 -> -NaN26
dqnextt883 nexttoward -sNaN27 sNaN29 -> -NaN27 Invalid_operation
dqnextt884 nexttoward 1000 -NaN30 -> -NaN30
dqnextt885 nexttoward 1000 -sNaN31 -> -NaN31 Invalid_operation
-- Null tests
dqnextt900 nexttoward 1 # -> NaN Invalid_operation
dqnextt901 nexttoward # 1 -> NaN Invalid_operation

View File

@@ -0,0 +1,401 @@
------------------------------------------------------------------------
-- dqOr.decTest -- digitwise logical OR for decQuads --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check (truth table)
dqor001 or 0 0 -> 0
dqor002 or 0 1 -> 1
dqor003 or 1 0 -> 1
dqor004 or 1 1 -> 1
dqor005 or 1100 1010 -> 1110
-- and at msd and msd-1
dqor006 or 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqor007 or 0000000000000000000000000000000000 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqor008 or 1000000000000000000000000000000000 0000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqor009 or 1000000000000000000000000000000000 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqor010 or 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqor011 or 0000000000000000000000000000000000 0100000000000000000000000000000000 -> 100000000000000000000000000000000
dqor012 or 0100000000000000000000000000000000 0000000000000000000000000000000000 -> 100000000000000000000000000000000
dqor013 or 0100000000000000000000000000000000 0100000000000000000000000000000000 -> 100000000000000000000000000000000
-- Various lengths
dqor601 or 0111111111111111111111111111111111 1111111111111111111111111111111110 -> 1111111111111111111111111111111111
dqor602 or 1011111111111111111111111111111111 1111111111111111111111111111111101 -> 1111111111111111111111111111111111
dqor603 or 1101111111111111111111111111111111 1111111111111111111111111111111011 -> 1111111111111111111111111111111111
dqor604 or 1110111111111111111111111111111111 1111111111111111111111111111110111 -> 1111111111111111111111111111111111
dqor605 or 1111011111111111111111111111111111 1111111111111111111111111111101111 -> 1111111111111111111111111111111111
dqor606 or 1111101111111111111111111111111111 1111111111111111111111111111011111 -> 1111111111111111111111111111111111
dqor607 or 1111110111111111111111111111111111 1111111111111111111111111110111111 -> 1111111111111111111111111111111111
dqor608 or 1111111011111111111111111111111111 1111111111111111111111111101111111 -> 1111111111111111111111111111111111
dqor609 or 1111111101111111111111111111111111 1111111111111111111111111011111111 -> 1111111111111111111111111111111111
dqor610 or 1111111110111111111111111111111111 1111111111111111111111110111111111 -> 1111111111111111111111111111111111
dqor611 or 1111111111011111111111111111111111 1111111111111111111111101111111111 -> 1111111111111111111111111111111111
dqor612 or 1111111111101111111111111111111111 1111111111111111111111011111111111 -> 1111111111111111111111111111111111
dqor613 or 1111111111110111111111111111111111 1111111111111111111110111111111111 -> 1111111111111111111111111111111111
dqor614 or 1111111111111011111111111111111111 1111111111111111111101111111111111 -> 1111111111111111111111111111111111
dqor615 or 1111111111111101111111111111111111 1111111111111111111011111111111111 -> 1111111111111111111111111111111111
dqor616 or 1111111111111110111111111111111111 1111111111111111110111111111111111 -> 1111111111111111111111111111111111
dqor617 or 1111111111111111011111111111111111 1111111111111111101111111111111111 -> 1111111111111111111111111111111111
dqor618 or 1111111111111111101111111111111111 1111111111111111011111111111111111 -> 1111111111111111111111111111111111
dqor619 or 1111111111111111110111111111111111 1111111111111110111111111111111111 -> 1111111111111111111111111111111111
dqor620 or 1111111111111111111011111111111111 1111111111111101111111111111111111 -> 1111111111111111111111111111111111
dqor621 or 1111111111111111111101111111111111 1111111111111011111111111111111111 -> 1111111111111111111111111111111111
dqor622 or 1111111111111111111110111111111111 1111111111110111111111111111111111 -> 1111111111111111111111111111111111
dqor623 or 1111111111111111111111011111111111 1111111111101111111111111111111111 -> 1111111111111111111111111111111111
dqor624 or 1111111111111111111111101111111111 1111111111011111111111111111111111 -> 1111111111111111111111111111111111
dqor625 or 1111111111111111111111110111111111 1111111110111111111111111111111111 -> 1111111111111111111111111111111111
dqor626 or 1111111111111111111111111011111111 1111111101111111111111111111111111 -> 1111111111111111111111111111111111
dqor627 or 1111111111111111111111111101111111 1111111011111111111111111111111111 -> 1111111111111111111111111111111111
dqor628 or 1111111111111111111111111110111111 1111110111111111111111111111111111 -> 1111111111111111111111111111111111
dqor629 or 1111111111111111111111111111011111 1111101111111111111111111111111111 -> 1111111111111111111111111111111111
dqor630 or 1111111111111111111111111111101111 1111011111111111111111111111111111 -> 1111111111111111111111111111111111
dqor631 or 1111111111111111111111111111110111 1110111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor632 or 1111111111111111111111111111111011 1101111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor633 or 1111111111111111111111111111111101 1011111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor634 or 1111111111111111111111111111111110 0111111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor641 or 1111111111111111111111111111111110 0111111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor642 or 1111111111111111111111111111111101 1011111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor643 or 1111111111111111111111111111111011 1101111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor644 or 1111111111111111111111111111110111 1110111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor645 or 1111111111111111111111111111101111 1111011111111111111111111111111111 -> 1111111111111111111111111111111111
dqor646 or 1111111111111111111111111111011111 1111101111111111111111111111111111 -> 1111111111111111111111111111111111
dqor647 or 1111111111111111111111111110111111 1111110111111111111111111111111111 -> 1111111111111111111111111111111111
dqor648 or 1111111111111111111111111101111111 1111111011111111111111111111111111 -> 1111111111111111111111111111111111
dqor649 or 1111111111111111111111111011111111 1111111101111111111111111111111111 -> 1111111111111111111111111111111111
dqor650 or 1111111111111111111111110111111111 1111111110111111111111111111111111 -> 1111111111111111111111111111111111
dqor651 or 1111111111111111111111101111111111 1111111111011111111111111111111111 -> 1111111111111111111111111111111111
dqor652 or 1111111111111111111111011111111111 1111111111101111111111111111111111 -> 1111111111111111111111111111111111
dqor653 or 1111111111111111111110111111111111 1111111111110111111111111111111111 -> 1111111111111111111111111111111111
dqor654 or 1111111111111111111101111111111111 1111111111111011111111111111111111 -> 1111111111111111111111111111111111
dqor655 or 1111111111111111111011111111111111 1111111111111101111111111111111111 -> 1111111111111111111111111111111111
dqor656 or 1111111111111111110111111111111111 1111111111111110111111111111111111 -> 1111111111111111111111111111111111
dqor657 or 1010101010101010101010101010101010 1010101010101010001010101010101010 -> 1010101010101010101010101010101010
dqor658 or 1111111111111111011111111111111111 1111111111111111101111111111111111 -> 1111111111111111111111111111111111
dqor659 or 1111111111111110111111111111111111 1111111111111111110111111111111111 -> 1111111111111111111111111111111111
dqor660 or 1111111111111101111111111111111111 1111111111111111111011111111111111 -> 1111111111111111111111111111111111
dqor661 or 1111111111111011111111111111111111 1111111111111111111101111111111111 -> 1111111111111111111111111111111111
dqor662 or 1111111111110111111111111111111111 1111111111111111111110111111111111 -> 1111111111111111111111111111111111
dqor663 or 1111111111101111111111111111111111 1111111111111111111111011111111111 -> 1111111111111111111111111111111111
dqor664 or 1111111111011111111111111111111111 1111111111111111111111101111111111 -> 1111111111111111111111111111111111
dqor665 or 1111111110111111111111111111111111 1111111111111111111111110111111111 -> 1111111111111111111111111111111111
dqor666 or 0101010101010101010101010101010101 0101010101010101010101010001010101 -> 101010101010101010101010101010101
dqor667 or 1111111011111111111111111111111111 1111111111111111111111111101111111 -> 1111111111111111111111111111111111
dqor668 or 1111110111111111111111111111111111 1111111111111111111111111110111111 -> 1111111111111111111111111111111111
dqor669 or 1111101111111111111111111111111111 1111111111111111111111111111011111 -> 1111111111111111111111111111111111
dqor670 or 1111011111111111111111111111111111 1111111111111111111111111111101111 -> 1111111111111111111111111111111111
dqor671 or 1110111111111111111111111111111111 1111111111111111111111111111110111 -> 1111111111111111111111111111111111
dqor672 or 1101111111111111111111111111111111 1111111111111111111111111111111011 -> 1111111111111111111111111111111111
dqor673 or 1011111111111111111111111111111111 1111111111111111111111111111111101 -> 1111111111111111111111111111111111
dqor674 or 0111111111111111111111111111111111 1111111111111111111111111111111110 -> 1111111111111111111111111111111111
dqor675 or 0111111111111111111111111111111110 1111111111111111111111111111111110 -> 1111111111111111111111111111111110
dqor676 or 1111111111111111111111111111111110 1111111111111111111111111111111110 -> 1111111111111111111111111111111110
dqor681 or 0111111111111111111111111111111111 0111111111011111111111111111111110 -> 111111111111111111111111111111111
dqor682 or 1011111111111111111111111111111111 1011111110101111111111111111111101 -> 1011111111111111111111111111111111
dqor683 or 1101111111111111111111111111111111 1101111101110111111111111111111011 -> 1101111111111111111111111111111111
dqor684 or 1110111111111111111111111111111111 1110111011111011111111111111110111 -> 1110111111111111111111111111111111
dqor685 or 1111011111111111111111111111111111 1111010111111101111111111111101111 -> 1111011111111111111111111111111111
dqor686 or 1111101111111111111111111111111111 1111101111111110111111111111011111 -> 1111101111111111111111111111111111
dqor687 or 1111110111111111111111111111111111 1111010111111111011111111110111111 -> 1111110111111111111111111111111111
dqor688 or 1111111011111111111111111111111111 1110111011111111101111111101111111 -> 1111111011111111111111111111111111
dqor689 or 1111111101111111111111111111111111 1101111101111111110111111011111111 -> 1111111101111111111111111111111111
dqor690 or 1111111110111111111111111111111111 1011111110111111111011110111111110 -> 1111111110111111111111111111111111
dqor691 or 1111111111011111111111111111111111 0111111111011111111101101111111101 -> 1111111111011111111111111111111111
dqor692 or 1111111111101111111111111111111111 1111111111101111111110011111111011 -> 1111111111101111111111111111111111
dqor693 or 1111111111110111111111111111111111 1111111111110111111110011111110111 -> 1111111111110111111111111111111111
dqor694 or 1111111111111011111111111111111111 1111111111111011111101101111101111 -> 1111111111111011111111111111111111
dqor695 or 1111111111111101111111111111111111 1111111111111101111011110111011111 -> 1111111111111101111111111111111111
dqor696 or 1111111111111110111111111111111111 1111111111111110110111111010111111 -> 1111111111111110111111111111111111
dqor697 or 1111111111111111011111111111111111 1111111111111111001111111101111111 -> 1111111111111111011111111111111111
dqor698 or 1111111111111111101111111111111111 1111111111111111001111111010111111 -> 1111111111111111101111111111111111
dqor699 or 1111111111111111110111111111111111 1111111111111110110111110111011111 -> 1111111111111111110111111111111111
dqor700 or 1111111111111111111011111111111111 1111111111111101111011101111101111 -> 1111111111111111111011111111111111
dqor701 or 1111111111111111111101111111111111 1111111111111011111101011111110111 -> 1111111111111111111101111111111111
dqor702 or 1111111111111111111110111111111111 1111111111110111111110111111111011 -> 1111111111111111111110111111111111
dqor703 or 1111111111111111111111011111111111 1111111111101111111101011111111101 -> 1111111111111111111111011111111111
dqor704 or 1111111111111111111111101111111111 1111111111011111111011101111111110 -> 1111111111111111111111101111111111
dqor705 or 1111111111111111111111110111111111 0111111110111111110111110111111111 -> 1111111111111111111111110111111111
dqor706 or 1111111111111111111111111011111111 1011111101111111101111111011111111 -> 1111111111111111111111111011111111
dqor707 or 1111111111111111111111111101111111 1101111011111111011111111101111111 -> 1111111111111111111111111101111111
dqor708 or 1111111111111111111111111110111111 1110110111111110111111111110111111 -> 1111111111111111111111111110111111
dqor709 or 1111111111111111111111111111011111 1111001111111101111111111111011111 -> 1111111111111111111111111111011111
dqor710 or 1111111111111111111111111111101111 1111001111111011111111111111101111 -> 1111111111111111111111111111101111
dqor711 or 1111111111111111111111111111110111 1110110111110111111111111111110111 -> 1111111111111111111111111111110111
dqor712 or 1111111111111111111111111111111011 1101111011101111111111111111111011 -> 1111111111111111111111111111111011
dqor713 or 1111111111111111111111111111111101 1011111101011111111111111111111101 -> 1111111111111111111111111111111101
dqor714 or 1111111111111111111111111111111110 0111111110111111111111111111111110 -> 1111111111111111111111111111111110
-- 1234567890123456 1234567890123456 1234567890123456
dqor020 or 1111111111111111 1111111111111111 -> 1111111111111111
dqor021 or 111111111111111 111111111111111 -> 111111111111111
dqor022 or 11111111111111 11111111111111 -> 11111111111111
dqor023 or 1111111111111 1111111111111 -> 1111111111111
dqor024 or 111111111111 111111111111 -> 111111111111
dqor025 or 11111111111 11111111111 -> 11111111111
dqor026 or 1111111111 1111111111 -> 1111111111
dqor027 or 111111111 111111111 -> 111111111
dqor028 or 11111111 11111111 -> 11111111
dqor029 or 1111111 1111111 -> 1111111
dqor030 or 111111 111111 -> 111111
dqor031 or 11111 11111 -> 11111
dqor032 or 1111 1111 -> 1111
dqor033 or 111 111 -> 111
dqor034 or 11 11 -> 11
dqor035 or 1 1 -> 1
dqor036 or 0 0 -> 0
dqor042 or 111111110000000 1111111110000000 -> 1111111110000000
dqor043 or 11111110000000 1000000100000000 -> 1011111110000000
dqor044 or 1111110000000 1000001000000000 -> 1001111110000000
dqor045 or 111110000000 1000010000000000 -> 1000111110000000
dqor046 or 11110000000 1000100000000000 -> 1000111110000000
dqor047 or 1110000000 1001000000000000 -> 1001001110000000
dqor048 or 110000000 1010000000000000 -> 1010000110000000
dqor049 or 10000000 1100000000000000 -> 1100000010000000
dqor090 or 011111111 111101111 -> 111111111
dqor091 or 101111111 111101111 -> 111111111
dqor092 or 110111111 111101111 -> 111111111
dqor093 or 111011111 111101111 -> 111111111
dqor094 or 111101111 111101111 -> 111101111
dqor095 or 111110111 111101111 -> 111111111
dqor096 or 111111011 111101111 -> 111111111
dqor097 or 111111101 111101111 -> 111111111
dqor098 or 111111110 111101111 -> 111111111
dqor100 or 111101111 011111111 -> 111111111
dqor101 or 111101111 101111111 -> 111111111
dqor102 or 111101111 110111111 -> 111111111
dqor103 or 111101111 111011111 -> 111111111
dqor104 or 111101111 111101111 -> 111101111
dqor105 or 111101111 111110111 -> 111111111
dqor106 or 111101111 111111011 -> 111111111
dqor107 or 111101111 111111101 -> 111111111
dqor108 or 111101111 111111110 -> 111111111
-- non-0/1 should not be accepted, nor should signs
dqor220 or 111111112 111111111 -> NaN Invalid_operation
dqor221 or 333333333 333333333 -> NaN Invalid_operation
dqor222 or 555555555 555555555 -> NaN Invalid_operation
dqor223 or 777777777 777777777 -> NaN Invalid_operation
dqor224 or 999999999 999999999 -> NaN Invalid_operation
dqor225 or 222222222 999999999 -> NaN Invalid_operation
dqor226 or 444444444 999999999 -> NaN Invalid_operation
dqor227 or 666666666 999999999 -> NaN Invalid_operation
dqor228 or 888888888 999999999 -> NaN Invalid_operation
dqor229 or 999999999 222222222 -> NaN Invalid_operation
dqor230 or 999999999 444444444 -> NaN Invalid_operation
dqor231 or 999999999 666666666 -> NaN Invalid_operation
dqor232 or 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
dqor240 or 567468689 -934981942 -> NaN Invalid_operation
dqor241 or 567367689 934981942 -> NaN Invalid_operation
dqor242 or -631917772 -706014634 -> NaN Invalid_operation
dqor243 or -756253257 138579234 -> NaN Invalid_operation
dqor244 or 835590149 567435400 -> NaN Invalid_operation
-- test MSD
dqor250 or 2000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqor251 or 7000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqor252 or 8000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqor253 or 9000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqor254 or 2000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqor255 or 7000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqor256 or 8000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqor257 or 9000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqor258 or 1000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqor259 or 1000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqor260 or 1000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqor261 or 1000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
dqor262 or 0000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqor263 or 0000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqor264 or 0000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqor265 or 0000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
-- test MSD-1
dqor270 or 0200000111000111000111001000000000 1000000111000111000111100000000010 -> NaN Invalid_operation
dqor271 or 0700000111000111000111000100000000 1000000111000111000111010000000100 -> NaN Invalid_operation
dqor272 or 0800000111000111000111000010000000 1000000111000111000111001000001000 -> NaN Invalid_operation
dqor273 or 0900000111000111000111000001000000 1000000111000111000111000100010000 -> NaN Invalid_operation
dqor274 or 1000000111000111000111000000100000 0200000111000111000111000010100000 -> NaN Invalid_operation
dqor275 or 1000000111000111000111000000010000 0700000111000111000111000001000000 -> NaN Invalid_operation
dqor276 or 1000000111000111000111000000001000 0800000111000111000111000010100000 -> NaN Invalid_operation
dqor277 or 1000000111000111000111000000000100 0900000111000111000111000000010000 -> NaN Invalid_operation
-- test LSD
dqor280 or 0010000111000111000111000000000002 1000000111000111000111000100000001 -> NaN Invalid_operation
dqor281 or 0001000111000111000111000000000007 1000000111000111000111001000000011 -> NaN Invalid_operation
dqor282 or 0000000111000111000111100000000008 1000000111000111000111010000000001 -> NaN Invalid_operation
dqor283 or 0000000111000111000111010000000009 1000000111000111000111100000000001 -> NaN Invalid_operation
dqor284 or 1000000111000111000111001000000000 0001000111000111000111000000000002 -> NaN Invalid_operation
dqor285 or 1000000111000111000111000100000000 0010000111000111000111000000000007 -> NaN Invalid_operation
dqor286 or 1000000111000111000111000010000000 0100000111000111000111000000000008 -> NaN Invalid_operation
dqor287 or 1000000111000111000111000001000000 1000000111000111000111000000000009 -> NaN Invalid_operation
-- test Middie
dqor288 or 0010000111000111000111000020000000 1000000111000111000111001000000000 -> NaN Invalid_operation
dqor289 or 0001000111000111000111000070000001 1000000111000111000111000100000000 -> NaN Invalid_operation
dqor290 or 0000000111000111000111100080000010 1000000111000111000111000010000000 -> NaN Invalid_operation
dqor291 or 0000000111000111000111010090000100 1000000111000111000111000001000000 -> NaN Invalid_operation
dqor292 or 1000000111000111000111001000001000 0000000111000111000111000020100000 -> NaN Invalid_operation
dqor293 or 1000000111000111000111000100010000 0000000111000111000111000070010000 -> NaN Invalid_operation
dqor294 or 1000000111000111000111000010100000 0000000111000111000111000080001000 -> NaN Invalid_operation
dqor295 or 1000000111000111000111000001000000 0000000111000111000111000090000100 -> NaN Invalid_operation
-- signs
dqor296 or -1000000111000111000111000001000000 -0000001110001110001110010000000100 -> NaN Invalid_operation
dqor297 or -1000000111000111000111000001000000 0000001110001110001110000010000100 -> NaN Invalid_operation
dqor298 or 1000000111000111000111000001000000 -0000001110001110001110001000000100 -> NaN Invalid_operation
dqor299 or 1000000111000111000111000001000000 0000001110001110001110000011000100 -> 1000001111001111001111000011000100
-- Nmax, Nmin, Ntiny-like
dqor331 or 2 9.99999999E+1999 -> NaN Invalid_operation
dqor332 or 3 1E-1999 -> NaN Invalid_operation
dqor333 or 4 1.00000000E-1999 -> NaN Invalid_operation
dqor334 or 5 1E-1009 -> NaN Invalid_operation
dqor335 or 6 -1E-1009 -> NaN Invalid_operation
dqor336 or 7 -1.00000000E-1999 -> NaN Invalid_operation
dqor337 or 8 -1E-1999 -> NaN Invalid_operation
dqor338 or 9 -9.99999999E+1999 -> NaN Invalid_operation
dqor341 or 9.99999999E+2999 -18 -> NaN Invalid_operation
dqor342 or 1E-2999 01 -> NaN Invalid_operation
dqor343 or 1.00000000E-2999 -18 -> NaN Invalid_operation
dqor344 or 1E-1009 18 -> NaN Invalid_operation
dqor345 or -1E-1009 -10 -> NaN Invalid_operation
dqor346 or -1.00000000E-2999 18 -> NaN Invalid_operation
dqor347 or -1E-2999 10 -> NaN Invalid_operation
dqor348 or -9.99999999E+2999 -18 -> NaN Invalid_operation
-- A few other non-integers
dqor361 or 1.0 1 -> NaN Invalid_operation
dqor362 or 1E+1 1 -> NaN Invalid_operation
dqor363 or 0.0 1 -> NaN Invalid_operation
dqor364 or 0E+1 1 -> NaN Invalid_operation
dqor365 or 9.9 1 -> NaN Invalid_operation
dqor366 or 9E+1 1 -> NaN Invalid_operation
dqor371 or 0 1.0 -> NaN Invalid_operation
dqor372 or 0 1E+1 -> NaN Invalid_operation
dqor373 or 0 0.0 -> NaN Invalid_operation
dqor374 or 0 0E+1 -> NaN Invalid_operation
dqor375 or 0 9.9 -> NaN Invalid_operation
dqor376 or 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
dqor780 or -Inf -Inf -> NaN Invalid_operation
dqor781 or -Inf -1000 -> NaN Invalid_operation
dqor782 or -Inf -1 -> NaN Invalid_operation
dqor783 or -Inf -0 -> NaN Invalid_operation
dqor784 or -Inf 0 -> NaN Invalid_operation
dqor785 or -Inf 1 -> NaN Invalid_operation
dqor786 or -Inf 1000 -> NaN Invalid_operation
dqor787 or -1000 -Inf -> NaN Invalid_operation
dqor788 or -Inf -Inf -> NaN Invalid_operation
dqor789 or -1 -Inf -> NaN Invalid_operation
dqor790 or -0 -Inf -> NaN Invalid_operation
dqor791 or 0 -Inf -> NaN Invalid_operation
dqor792 or 1 -Inf -> NaN Invalid_operation
dqor793 or 1000 -Inf -> NaN Invalid_operation
dqor794 or Inf -Inf -> NaN Invalid_operation
dqor800 or Inf -Inf -> NaN Invalid_operation
dqor801 or Inf -1000 -> NaN Invalid_operation
dqor802 or Inf -1 -> NaN Invalid_operation
dqor803 or Inf -0 -> NaN Invalid_operation
dqor804 or Inf 0 -> NaN Invalid_operation
dqor805 or Inf 1 -> NaN Invalid_operation
dqor806 or Inf 1000 -> NaN Invalid_operation
dqor807 or Inf Inf -> NaN Invalid_operation
dqor808 or -1000 Inf -> NaN Invalid_operation
dqor809 or -Inf Inf -> NaN Invalid_operation
dqor810 or -1 Inf -> NaN Invalid_operation
dqor811 or -0 Inf -> NaN Invalid_operation
dqor812 or 0 Inf -> NaN Invalid_operation
dqor813 or 1 Inf -> NaN Invalid_operation
dqor814 or 1000 Inf -> NaN Invalid_operation
dqor815 or Inf Inf -> NaN Invalid_operation
dqor821 or NaN -Inf -> NaN Invalid_operation
dqor822 or NaN -1000 -> NaN Invalid_operation
dqor823 or NaN -1 -> NaN Invalid_operation
dqor824 or NaN -0 -> NaN Invalid_operation
dqor825 or NaN 0 -> NaN Invalid_operation
dqor826 or NaN 1 -> NaN Invalid_operation
dqor827 or NaN 1000 -> NaN Invalid_operation
dqor828 or NaN Inf -> NaN Invalid_operation
dqor829 or NaN NaN -> NaN Invalid_operation
dqor830 or -Inf NaN -> NaN Invalid_operation
dqor831 or -1000 NaN -> NaN Invalid_operation
dqor832 or -1 NaN -> NaN Invalid_operation
dqor833 or -0 NaN -> NaN Invalid_operation
dqor834 or 0 NaN -> NaN Invalid_operation
dqor835 or 1 NaN -> NaN Invalid_operation
dqor836 or 1000 NaN -> NaN Invalid_operation
dqor837 or Inf NaN -> NaN Invalid_operation
dqor841 or sNaN -Inf -> NaN Invalid_operation
dqor842 or sNaN -1000 -> NaN Invalid_operation
dqor843 or sNaN -1 -> NaN Invalid_operation
dqor844 or sNaN -0 -> NaN Invalid_operation
dqor845 or sNaN 0 -> NaN Invalid_operation
dqor846 or sNaN 1 -> NaN Invalid_operation
dqor847 or sNaN 1000 -> NaN Invalid_operation
dqor848 or sNaN NaN -> NaN Invalid_operation
dqor849 or sNaN sNaN -> NaN Invalid_operation
dqor850 or NaN sNaN -> NaN Invalid_operation
dqor851 or -Inf sNaN -> NaN Invalid_operation
dqor852 or -1000 sNaN -> NaN Invalid_operation
dqor853 or -1 sNaN -> NaN Invalid_operation
dqor854 or -0 sNaN -> NaN Invalid_operation
dqor855 or 0 sNaN -> NaN Invalid_operation
dqor856 or 1 sNaN -> NaN Invalid_operation
dqor857 or 1000 sNaN -> NaN Invalid_operation
dqor858 or Inf sNaN -> NaN Invalid_operation
dqor859 or NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqor861 or NaN1 -Inf -> NaN Invalid_operation
dqor862 or +NaN2 -1000 -> NaN Invalid_operation
dqor863 or NaN3 1000 -> NaN Invalid_operation
dqor864 or NaN4 Inf -> NaN Invalid_operation
dqor865 or NaN5 +NaN6 -> NaN Invalid_operation
dqor866 or -Inf NaN7 -> NaN Invalid_operation
dqor867 or -1000 NaN8 -> NaN Invalid_operation
dqor868 or 1000 NaN9 -> NaN Invalid_operation
dqor869 or Inf +NaN10 -> NaN Invalid_operation
dqor871 or sNaN11 -Inf -> NaN Invalid_operation
dqor872 or sNaN12 -1000 -> NaN Invalid_operation
dqor873 or sNaN13 1000 -> NaN Invalid_operation
dqor874 or sNaN14 NaN17 -> NaN Invalid_operation
dqor875 or sNaN15 sNaN18 -> NaN Invalid_operation
dqor876 or NaN16 sNaN19 -> NaN Invalid_operation
dqor877 or -Inf +sNaN20 -> NaN Invalid_operation
dqor878 or -1000 sNaN21 -> NaN Invalid_operation
dqor879 or 1000 sNaN22 -> NaN Invalid_operation
dqor880 or Inf sNaN23 -> NaN Invalid_operation
dqor881 or +NaN25 +sNaN24 -> NaN Invalid_operation
dqor882 or -NaN26 NaN28 -> NaN Invalid_operation
dqor883 or -sNaN27 sNaN29 -> NaN Invalid_operation
dqor884 or 1000 -NaN30 -> NaN Invalid_operation
dqor885 or 1000 -sNaN31 -> NaN Invalid_operation

View File

@@ -0,0 +1,88 @@
------------------------------------------------------------------------
-- dqPlus.decTest -- decQuad 0+x --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqpls001 plus +7.50 -> 7.50
-- Infinities
dqpls011 plus Infinity -> Infinity
dqpls012 plus -Infinity -> -Infinity
-- NaNs, 0 payload
ddqls021 plus NaN -> NaN
ddqls022 plus -NaN -> -NaN
ddqls023 plus sNaN -> NaN Invalid_operation
ddqls024 plus -sNaN -> -NaN Invalid_operation
-- NaNs, non-0 payload
ddqls031 plus NaN13 -> NaN13
ddqls032 plus -NaN13 -> -NaN13
ddqls033 plus sNaN13 -> NaN13 Invalid_operation
ddqls034 plus -sNaN13 -> -NaN13 Invalid_operation
ddqls035 plus NaN70 -> NaN70
ddqls036 plus -NaN70 -> -NaN70
ddqls037 plus sNaN101 -> NaN101 Invalid_operation
ddqls038 plus -sNaN101 -> -NaN101 Invalid_operation
-- finites
dqpls101 plus 7 -> 7
dqpls102 plus -7 -> -7
dqpls103 plus 75 -> 75
dqpls104 plus -75 -> -75
dqpls105 plus 7.50 -> 7.50
dqpls106 plus -7.50 -> -7.50
dqpls107 plus 7.500 -> 7.500
dqpls108 plus -7.500 -> -7.500
-- zeros
dqpls111 plus 0 -> 0
dqpls112 plus -0 -> 0
dqpls113 plus 0E+4 -> 0E+4
dqpls114 plus -0E+4 -> 0E+4
dqpls115 plus 0.0000 -> 0.0000
dqpls116 plus -0.0000 -> 0.0000
dqpls117 plus 0E-141 -> 0E-141
dqpls118 plus -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqpls121 plus 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqpls122 plus -2682682682682682682682682682682682 -> -2682682682682682682682682682682682
dqpls123 plus 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
dqpls124 plus -1341341341341341341341341341341341 -> -1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqpls131 plus 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqpls132 plus 1E-6143 -> 1E-6143
dqpls133 plus 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqpls134 plus 1E-6176 -> 1E-6176 Subnormal
dqpls135 plus -1E-6176 -> -1E-6176 Subnormal
dqpls136 plus -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqpls137 plus -1E-6143 -> -1E-6143
dqpls138 plus -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144

View File

@@ -0,0 +1,836 @@
------------------------------------------------------------------------
-- dqQuantize.decTest -- decQuad quantize operation --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Most of the tests here assume a "regular pattern", where the
-- sign and coefficient are +1.
-- 2004.03.15 Underflow for quantize is suppressed
-- 2005.06.08 More extensive tests for 'does not fit'
-- [Forked from quantize.decTest 2006.11.25]
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqqua001 quantize 0 1e0 -> 0
dqqua002 quantize 1 1e0 -> 1
dqqua003 quantize 0.1 1e+2 -> 0E+2 Inexact Rounded
dqqua005 quantize 0.1 1e+1 -> 0E+1 Inexact Rounded
dqqua006 quantize 0.1 1e0 -> 0 Inexact Rounded
dqqua007 quantize 0.1 1e-1 -> 0.1
dqqua008 quantize 0.1 1e-2 -> 0.10
dqqua009 quantize 0.1 1e-3 -> 0.100
dqqua010 quantize 0.9 1e+2 -> 0E+2 Inexact Rounded
dqqua011 quantize 0.9 1e+1 -> 0E+1 Inexact Rounded
dqqua012 quantize 0.9 1e+0 -> 1 Inexact Rounded
dqqua013 quantize 0.9 1e-1 -> 0.9
dqqua014 quantize 0.9 1e-2 -> 0.90
dqqua015 quantize 0.9 1e-3 -> 0.900
-- negatives
dqqua021 quantize -0 1e0 -> -0
dqqua022 quantize -1 1e0 -> -1
dqqua023 quantize -0.1 1e+2 -> -0E+2 Inexact Rounded
dqqua025 quantize -0.1 1e+1 -> -0E+1 Inexact Rounded
dqqua026 quantize -0.1 1e0 -> -0 Inexact Rounded
dqqua027 quantize -0.1 1e-1 -> -0.1
dqqua028 quantize -0.1 1e-2 -> -0.10
dqqua029 quantize -0.1 1e-3 -> -0.100
dqqua030 quantize -0.9 1e+2 -> -0E+2 Inexact Rounded
dqqua031 quantize -0.9 1e+1 -> -0E+1 Inexact Rounded
dqqua032 quantize -0.9 1e+0 -> -1 Inexact Rounded
dqqua033 quantize -0.9 1e-1 -> -0.9
dqqua034 quantize -0.9 1e-2 -> -0.90
dqqua035 quantize -0.9 1e-3 -> -0.900
dqqua036 quantize -0.5 1e+2 -> -0E+2 Inexact Rounded
dqqua037 quantize -0.5 1e+1 -> -0E+1 Inexact Rounded
dqqua038 quantize -0.5 1e+0 -> -0 Inexact Rounded
dqqua039 quantize -0.5 1e-1 -> -0.5
dqqua040 quantize -0.5 1e-2 -> -0.50
dqqua041 quantize -0.5 1e-3 -> -0.500
dqqua042 quantize -0.9 1e+2 -> -0E+2 Inexact Rounded
dqqua043 quantize -0.9 1e+1 -> -0E+1 Inexact Rounded
dqqua044 quantize -0.9 1e+0 -> -1 Inexact Rounded
dqqua045 quantize -0.9 1e-1 -> -0.9
dqqua046 quantize -0.9 1e-2 -> -0.90
dqqua047 quantize -0.9 1e-3 -> -0.900
-- examples from Specification
dqqua060 quantize 2.17 0.001 -> 2.170
dqqua061 quantize 2.17 0.01 -> 2.17
dqqua062 quantize 2.17 0.1 -> 2.2 Inexact Rounded
dqqua063 quantize 2.17 1e+0 -> 2 Inexact Rounded
dqqua064 quantize 2.17 1e+1 -> 0E+1 Inexact Rounded
dqqua065 quantize -Inf Inf -> -Infinity
dqqua066 quantize 2 Inf -> NaN Invalid_operation
dqqua067 quantize -0.1 1 -> -0 Inexact Rounded
dqqua068 quantize -0 1e+5 -> -0E+5
dqqua069 quantize +123451234567899876543216789012345.6 1e-2 -> NaN Invalid_operation
dqqua070 quantize -987651234567899876543214335236450.6 1e-2 -> NaN Invalid_operation
dqqua071 quantize 217 1e-1 -> 217.0
dqqua072 quantize 217 1e+0 -> 217
dqqua073 quantize 217 1e+1 -> 2.2E+2 Inexact Rounded
dqqua074 quantize 217 1e+2 -> 2E+2 Inexact Rounded
-- general tests ..
dqqua089 quantize 12 1e+4 -> 0E+4 Inexact Rounded
dqqua090 quantize 12 1e+3 -> 0E+3 Inexact Rounded
dqqua091 quantize 12 1e+2 -> 0E+2 Inexact Rounded
dqqua092 quantize 12 1e+1 -> 1E+1 Inexact Rounded
dqqua093 quantize 1.2345 1e-2 -> 1.23 Inexact Rounded
dqqua094 quantize 1.2355 1e-2 -> 1.24 Inexact Rounded
dqqua095 quantize 1.2345 1e-6 -> 1.234500
dqqua096 quantize 9.9999 1e-2 -> 10.00 Inexact Rounded
dqqua097 quantize 0.0001 1e-2 -> 0.00 Inexact Rounded
dqqua098 quantize 0.001 1e-2 -> 0.00 Inexact Rounded
dqqua099 quantize 0.009 1e-2 -> 0.01 Inexact Rounded
dqqua100 quantize 92 1e+2 -> 1E+2 Inexact Rounded
dqqua101 quantize -1 1e0 -> -1
dqqua102 quantize -1 1e-1 -> -1.0
dqqua103 quantize -1 1e-2 -> -1.00
dqqua104 quantize 0 1e0 -> 0
dqqua105 quantize 0 1e-1 -> 0.0
dqqua106 quantize 0 1e-2 -> 0.00
dqqua107 quantize 0.00 1e0 -> 0
dqqua108 quantize 0 1e+1 -> 0E+1
dqqua109 quantize 0 1e+2 -> 0E+2
dqqua110 quantize +1 1e0 -> 1
dqqua111 quantize +1 1e-1 -> 1.0
dqqua112 quantize +1 1e-2 -> 1.00
dqqua120 quantize 1.04 1e-3 -> 1.040
dqqua121 quantize 1.04 1e-2 -> 1.04
dqqua122 quantize 1.04 1e-1 -> 1.0 Inexact Rounded
dqqua123 quantize 1.04 1e0 -> 1 Inexact Rounded
dqqua124 quantize 1.05 1e-3 -> 1.050
dqqua125 quantize 1.05 1e-2 -> 1.05
dqqua126 quantize 1.05 1e-1 -> 1.0 Inexact Rounded
dqqua131 quantize 1.05 1e0 -> 1 Inexact Rounded
dqqua132 quantize 1.06 1e-3 -> 1.060
dqqua133 quantize 1.06 1e-2 -> 1.06
dqqua134 quantize 1.06 1e-1 -> 1.1 Inexact Rounded
dqqua135 quantize 1.06 1e0 -> 1 Inexact Rounded
dqqua140 quantize -10 1e-2 -> -10.00
dqqua141 quantize +1 1e-2 -> 1.00
dqqua142 quantize +10 1e-2 -> 10.00
dqqua143 quantize 1E+37 1e-2 -> NaN Invalid_operation
dqqua144 quantize 1E-37 1e-2 -> 0.00 Inexact Rounded
dqqua145 quantize 1E-3 1e-2 -> 0.00 Inexact Rounded
dqqua146 quantize 1E-2 1e-2 -> 0.01
dqqua147 quantize 1E-1 1e-2 -> 0.10
dqqua148 quantize 0E-37 1e-2 -> 0.00
dqqua150 quantize 1.0600 1e-5 -> 1.06000
dqqua151 quantize 1.0600 1e-4 -> 1.0600
dqqua152 quantize 1.0600 1e-3 -> 1.060 Rounded
dqqua153 quantize 1.0600 1e-2 -> 1.06 Rounded
dqqua154 quantize 1.0600 1e-1 -> 1.1 Inexact Rounded
dqqua155 quantize 1.0600 1e0 -> 1 Inexact Rounded
-- a couple where rounding was different in base tests
rounding: half_up
dqqua157 quantize -0.5 1e+0 -> -1 Inexact Rounded
dqqua158 quantize 1.05 1e-1 -> 1.1 Inexact Rounded
dqqua159 quantize 1.06 1e0 -> 1 Inexact Rounded
rounding: half_even
-- base tests with non-1 coefficients
dqqua161 quantize 0 -9e0 -> 0
dqqua162 quantize 1 -7e0 -> 1
dqqua163 quantize 0.1 -1e+2 -> 0E+2 Inexact Rounded
dqqua165 quantize 0.1 0e+1 -> 0E+1 Inexact Rounded
dqqua166 quantize 0.1 2e0 -> 0 Inexact Rounded
dqqua167 quantize 0.1 3e-1 -> 0.1
dqqua168 quantize 0.1 44e-2 -> 0.10
dqqua169 quantize 0.1 555e-3 -> 0.100
dqqua170 quantize 0.9 6666e+2 -> 0E+2 Inexact Rounded
dqqua171 quantize 0.9 -777e+1 -> 0E+1 Inexact Rounded
dqqua172 quantize 0.9 -88e+0 -> 1 Inexact Rounded
dqqua173 quantize 0.9 -9e-1 -> 0.9
dqqua174 quantize 0.9 0e-2 -> 0.90
dqqua175 quantize 0.9 1.1e-3 -> 0.9000
-- negatives
dqqua181 quantize -0 1.1e0 -> -0.0
dqqua182 quantize -1 -1e0 -> -1
dqqua183 quantize -0.1 11e+2 -> -0E+2 Inexact Rounded
dqqua185 quantize -0.1 111e+1 -> -0E+1 Inexact Rounded
dqqua186 quantize -0.1 71e0 -> -0 Inexact Rounded
dqqua187 quantize -0.1 -91e-1 -> -0.1
dqqua188 quantize -0.1 -.1e-2 -> -0.100
dqqua189 quantize -0.1 -1e-3 -> -0.100
dqqua190 quantize -0.9 0e+2 -> -0E+2 Inexact Rounded
dqqua191 quantize -0.9 -0e+1 -> -0E+1 Inexact Rounded
dqqua192 quantize -0.9 -10e+0 -> -1 Inexact Rounded
dqqua193 quantize -0.9 100e-1 -> -0.9
dqqua194 quantize -0.9 999e-2 -> -0.90
-- +ve exponents ..
dqqua201 quantize -1 1e+0 -> -1
dqqua202 quantize -1 1e+1 -> -0E+1 Inexact Rounded
dqqua203 quantize -1 1e+2 -> -0E+2 Inexact Rounded
dqqua204 quantize 0 1e+0 -> 0
dqqua205 quantize 0 1e+1 -> 0E+1
dqqua206 quantize 0 1e+2 -> 0E+2
dqqua207 quantize +1 1e+0 -> 1
dqqua208 quantize +1 1e+1 -> 0E+1 Inexact Rounded
dqqua209 quantize +1 1e+2 -> 0E+2 Inexact Rounded
dqqua220 quantize 1.04 1e+3 -> 0E+3 Inexact Rounded
dqqua221 quantize 1.04 1e+2 -> 0E+2 Inexact Rounded
dqqua222 quantize 1.04 1e+1 -> 0E+1 Inexact Rounded
dqqua223 quantize 1.04 1e+0 -> 1 Inexact Rounded
dqqua224 quantize 1.05 1e+3 -> 0E+3 Inexact Rounded
dqqua225 quantize 1.05 1e+2 -> 0E+2 Inexact Rounded
dqqua226 quantize 1.05 1e+1 -> 0E+1 Inexact Rounded
dqqua227 quantize 1.05 1e+0 -> 1 Inexact Rounded
dqqua228 quantize 1.05 1e+3 -> 0E+3 Inexact Rounded
dqqua229 quantize 1.05 1e+2 -> 0E+2 Inexact Rounded
dqqua230 quantize 1.05 1e+1 -> 0E+1 Inexact Rounded
dqqua231 quantize 1.05 1e+0 -> 1 Inexact Rounded
dqqua232 quantize 1.06 1e+3 -> 0E+3 Inexact Rounded
dqqua233 quantize 1.06 1e+2 -> 0E+2 Inexact Rounded
dqqua234 quantize 1.06 1e+1 -> 0E+1 Inexact Rounded
dqqua235 quantize 1.06 1e+0 -> 1 Inexact Rounded
dqqua240 quantize -10 1e+1 -> -1E+1 Rounded
dqqua241 quantize +1 1e+1 -> 0E+1 Inexact Rounded
dqqua242 quantize +10 1e+1 -> 1E+1 Rounded
dqqua243 quantize 1E+1 1e+1 -> 1E+1 -- underneath this is E+1
dqqua244 quantize 1E+2 1e+1 -> 1.0E+2 -- underneath this is E+1
dqqua245 quantize 1E+3 1e+1 -> 1.00E+3 -- underneath this is E+1
dqqua246 quantize 1E+4 1e+1 -> 1.000E+4 -- underneath this is E+1
dqqua247 quantize 1E+5 1e+1 -> 1.0000E+5 -- underneath this is E+1
dqqua248 quantize 1E+6 1e+1 -> 1.00000E+6 -- underneath this is E+1
dqqua249 quantize 1E+7 1e+1 -> 1.000000E+7 -- underneath this is E+1
dqqua250 quantize 1E+8 1e+1 -> 1.0000000E+8 -- underneath this is E+1
dqqua251 quantize 1E+9 1e+1 -> 1.00000000E+9 -- underneath this is E+1
-- next one tries to add 9 zeros
dqqua252 quantize 1E+37 1e+1 -> NaN Invalid_operation
dqqua253 quantize 1E-37 1e+1 -> 0E+1 Inexact Rounded
dqqua254 quantize 1E-2 1e+1 -> 0E+1 Inexact Rounded
dqqua255 quantize 0E-37 1e+1 -> 0E+1
dqqua256 quantize -0E-37 1e+1 -> -0E+1
dqqua257 quantize -0E-1 1e+1 -> -0E+1
dqqua258 quantize -0 1e+1 -> -0E+1
dqqua259 quantize -0E+1 1e+1 -> -0E+1
dqqua260 quantize -10 1e+2 -> -0E+2 Inexact Rounded
dqqua261 quantize +1 1e+2 -> 0E+2 Inexact Rounded
dqqua262 quantize +10 1e+2 -> 0E+2 Inexact Rounded
dqqua263 quantize 1E+1 1e+2 -> 0E+2 Inexact Rounded
dqqua264 quantize 1E+2 1e+2 -> 1E+2
dqqua265 quantize 1E+3 1e+2 -> 1.0E+3
dqqua266 quantize 1E+4 1e+2 -> 1.00E+4
dqqua267 quantize 1E+5 1e+2 -> 1.000E+5
dqqua268 quantize 1E+6 1e+2 -> 1.0000E+6
dqqua269 quantize 1E+7 1e+2 -> 1.00000E+7
dqqua270 quantize 1E+8 1e+2 -> 1.000000E+8
dqqua271 quantize 1E+9 1e+2 -> 1.0000000E+9
dqqua272 quantize 1E+10 1e+2 -> 1.00000000E+10
dqqua273 quantize 1E-10 1e+2 -> 0E+2 Inexact Rounded
dqqua274 quantize 1E-2 1e+2 -> 0E+2 Inexact Rounded
dqqua275 quantize 0E-10 1e+2 -> 0E+2
dqqua280 quantize -10 1e+3 -> -0E+3 Inexact Rounded
dqqua281 quantize +1 1e+3 -> 0E+3 Inexact Rounded
dqqua282 quantize +10 1e+3 -> 0E+3 Inexact Rounded
dqqua283 quantize 1E+1 1e+3 -> 0E+3 Inexact Rounded
dqqua284 quantize 1E+2 1e+3 -> 0E+3 Inexact Rounded
dqqua285 quantize 1E+3 1e+3 -> 1E+3
dqqua286 quantize 1E+4 1e+3 -> 1.0E+4
dqqua287 quantize 1E+5 1e+3 -> 1.00E+5
dqqua288 quantize 1E+6 1e+3 -> 1.000E+6
dqqua289 quantize 1E+7 1e+3 -> 1.0000E+7
dqqua290 quantize 1E+8 1e+3 -> 1.00000E+8
dqqua291 quantize 1E+9 1e+3 -> 1.000000E+9
dqqua292 quantize 1E+10 1e+3 -> 1.0000000E+10
dqqua293 quantize 1E-10 1e+3 -> 0E+3 Inexact Rounded
dqqua294 quantize 1E-2 1e+3 -> 0E+3 Inexact Rounded
dqqua295 quantize 0E-10 1e+3 -> 0E+3
-- round up from below [sign wrong in JIT compiler once]
dqqua300 quantize 0.0078 1e-5 -> 0.00780
dqqua301 quantize 0.0078 1e-4 -> 0.0078
dqqua302 quantize 0.0078 1e-3 -> 0.008 Inexact Rounded
dqqua303 quantize 0.0078 1e-2 -> 0.01 Inexact Rounded
dqqua304 quantize 0.0078 1e-1 -> 0.0 Inexact Rounded
dqqua305 quantize 0.0078 1e0 -> 0 Inexact Rounded
dqqua306 quantize 0.0078 1e+1 -> 0E+1 Inexact Rounded
dqqua307 quantize 0.0078 1e+2 -> 0E+2 Inexact Rounded
dqqua310 quantize -0.0078 1e-5 -> -0.00780
dqqua311 quantize -0.0078 1e-4 -> -0.0078
dqqua312 quantize -0.0078 1e-3 -> -0.008 Inexact Rounded
dqqua313 quantize -0.0078 1e-2 -> -0.01 Inexact Rounded
dqqua314 quantize -0.0078 1e-1 -> -0.0 Inexact Rounded
dqqua315 quantize -0.0078 1e0 -> -0 Inexact Rounded
dqqua316 quantize -0.0078 1e+1 -> -0E+1 Inexact Rounded
dqqua317 quantize -0.0078 1e+2 -> -0E+2 Inexact Rounded
dqqua320 quantize 0.078 1e-5 -> 0.07800
dqqua321 quantize 0.078 1e-4 -> 0.0780
dqqua322 quantize 0.078 1e-3 -> 0.078
dqqua323 quantize 0.078 1e-2 -> 0.08 Inexact Rounded
dqqua324 quantize 0.078 1e-1 -> 0.1 Inexact Rounded
dqqua325 quantize 0.078 1e0 -> 0 Inexact Rounded
dqqua326 quantize 0.078 1e+1 -> 0E+1 Inexact Rounded
dqqua327 quantize 0.078 1e+2 -> 0E+2 Inexact Rounded
dqqua330 quantize -0.078 1e-5 -> -0.07800
dqqua331 quantize -0.078 1e-4 -> -0.0780
dqqua332 quantize -0.078 1e-3 -> -0.078
dqqua333 quantize -0.078 1e-2 -> -0.08 Inexact Rounded
dqqua334 quantize -0.078 1e-1 -> -0.1 Inexact Rounded
dqqua335 quantize -0.078 1e0 -> -0 Inexact Rounded
dqqua336 quantize -0.078 1e+1 -> -0E+1 Inexact Rounded
dqqua337 quantize -0.078 1e+2 -> -0E+2 Inexact Rounded
dqqua340 quantize 0.78 1e-5 -> 0.78000
dqqua341 quantize 0.78 1e-4 -> 0.7800
dqqua342 quantize 0.78 1e-3 -> 0.780
dqqua343 quantize 0.78 1e-2 -> 0.78
dqqua344 quantize 0.78 1e-1 -> 0.8 Inexact Rounded
dqqua345 quantize 0.78 1e0 -> 1 Inexact Rounded
dqqua346 quantize 0.78 1e+1 -> 0E+1 Inexact Rounded
dqqua347 quantize 0.78 1e+2 -> 0E+2 Inexact Rounded
dqqua350 quantize -0.78 1e-5 -> -0.78000
dqqua351 quantize -0.78 1e-4 -> -0.7800
dqqua352 quantize -0.78 1e-3 -> -0.780
dqqua353 quantize -0.78 1e-2 -> -0.78
dqqua354 quantize -0.78 1e-1 -> -0.8 Inexact Rounded
dqqua355 quantize -0.78 1e0 -> -1 Inexact Rounded
dqqua356 quantize -0.78 1e+1 -> -0E+1 Inexact Rounded
dqqua357 quantize -0.78 1e+2 -> -0E+2 Inexact Rounded
dqqua360 quantize 7.8 1e-5 -> 7.80000
dqqua361 quantize 7.8 1e-4 -> 7.8000
dqqua362 quantize 7.8 1e-3 -> 7.800
dqqua363 quantize 7.8 1e-2 -> 7.80
dqqua364 quantize 7.8 1e-1 -> 7.8
dqqua365 quantize 7.8 1e0 -> 8 Inexact Rounded
dqqua366 quantize 7.8 1e+1 -> 1E+1 Inexact Rounded
dqqua367 quantize 7.8 1e+2 -> 0E+2 Inexact Rounded
dqqua368 quantize 7.8 1e+3 -> 0E+3 Inexact Rounded
dqqua370 quantize -7.8 1e-5 -> -7.80000
dqqua371 quantize -7.8 1e-4 -> -7.8000
dqqua372 quantize -7.8 1e-3 -> -7.800
dqqua373 quantize -7.8 1e-2 -> -7.80
dqqua374 quantize -7.8 1e-1 -> -7.8
dqqua375 quantize -7.8 1e0 -> -8 Inexact Rounded
dqqua376 quantize -7.8 1e+1 -> -1E+1 Inexact Rounded
dqqua377 quantize -7.8 1e+2 -> -0E+2 Inexact Rounded
dqqua378 quantize -7.8 1e+3 -> -0E+3 Inexact Rounded
-- some individuals
dqqua380 quantize 1122334455667788991234567352364.506 1e-2 -> 1122334455667788991234567352364.51 Inexact Rounded
dqqua381 quantize 11223344556677889912345673523645.06 1e-2 -> 11223344556677889912345673523645.06
dqqua382 quantize 112233445566778899123456735236450.6 1e-2 -> NaN Invalid_operation
dqqua383 quantize 1122334455667788991234567352364506 1e-2 -> NaN Invalid_operation
dqqua384 quantize -1122334455667788991234567352364.506 1e-2 -> -1122334455667788991234567352364.51 Inexact Rounded
dqqua385 quantize -11223344556677889912345673523645.06 1e-2 -> -11223344556677889912345673523645.06
dqqua386 quantize -112233445566778899123456735236450.6 1e-2 -> NaN Invalid_operation
dqqua387 quantize -1122334455667788991234567352364506 1e-2 -> NaN Invalid_operation
rounding: down
dqqua389 quantize 112233445566778899123456735236450.6 1e-2 -> NaN Invalid_operation
rounding: half_up
-- and a few more from e-mail discussions
dqqua391 quantize 11223344556677889912345678912.34567 1e-3 -> 11223344556677889912345678912.346 Inexact Rounded
dqqua392 quantize 112233445566778899123456789123.4567 1e-3 -> 112233445566778899123456789123.457 Inexact Rounded
dqqua393 quantize 1122334455667788991234567891234567. 1e-3 -> NaN Invalid_operation
-- some 9999 round-up cases
dqqua400 quantize 9.999 1e-5 -> 9.99900
dqqua401 quantize 9.999 1e-4 -> 9.9990
dqqua402 quantize 9.999 1e-3 -> 9.999
dqqua403 quantize 9.999 1e-2 -> 10.00 Inexact Rounded
dqqua404 quantize 9.999 1e-1 -> 10.0 Inexact Rounded
dqqua405 quantize 9.999 1e0 -> 10 Inexact Rounded
dqqua406 quantize 9.999 1e1 -> 1E+1 Inexact Rounded
dqqua407 quantize 9.999 1e2 -> 0E+2 Inexact Rounded
dqqua410 quantize 0.999 1e-5 -> 0.99900
dqqua411 quantize 0.999 1e-4 -> 0.9990
dqqua412 quantize 0.999 1e-3 -> 0.999
dqqua413 quantize 0.999 1e-2 -> 1.00 Inexact Rounded
dqqua414 quantize 0.999 1e-1 -> 1.0 Inexact Rounded
dqqua415 quantize 0.999 1e0 -> 1 Inexact Rounded
dqqua416 quantize 0.999 1e1 -> 0E+1 Inexact Rounded
dqqua420 quantize 0.0999 1e-5 -> 0.09990
dqqua421 quantize 0.0999 1e-4 -> 0.0999
dqqua422 quantize 0.0999 1e-3 -> 0.100 Inexact Rounded
dqqua423 quantize 0.0999 1e-2 -> 0.10 Inexact Rounded
dqqua424 quantize 0.0999 1e-1 -> 0.1 Inexact Rounded
dqqua425 quantize 0.0999 1e0 -> 0 Inexact Rounded
dqqua426 quantize 0.0999 1e1 -> 0E+1 Inexact Rounded
dqqua430 quantize 0.00999 1e-5 -> 0.00999
dqqua431 quantize 0.00999 1e-4 -> 0.0100 Inexact Rounded
dqqua432 quantize 0.00999 1e-3 -> 0.010 Inexact Rounded
dqqua433 quantize 0.00999 1e-2 -> 0.01 Inexact Rounded
dqqua434 quantize 0.00999 1e-1 -> 0.0 Inexact Rounded
dqqua435 quantize 0.00999 1e0 -> 0 Inexact Rounded
dqqua436 quantize 0.00999 1e1 -> 0E+1 Inexact Rounded
dqqua440 quantize 0.000999 1e-5 -> 0.00100 Inexact Rounded
dqqua441 quantize 0.000999 1e-4 -> 0.0010 Inexact Rounded
dqqua442 quantize 0.000999 1e-3 -> 0.001 Inexact Rounded
dqqua443 quantize 0.000999 1e-2 -> 0.00 Inexact Rounded
dqqua444 quantize 0.000999 1e-1 -> 0.0 Inexact Rounded
dqqua445 quantize 0.000999 1e0 -> 0 Inexact Rounded
dqqua446 quantize 0.000999 1e1 -> 0E+1 Inexact Rounded
dqqua1001 quantize 0.000 0.001 -> 0.000
dqqua1002 quantize 0.001 0.001 -> 0.001
dqqua1003 quantize 0.0012 0.001 -> 0.001 Inexact Rounded
dqqua1004 quantize 0.0018 0.001 -> 0.002 Inexact Rounded
dqqua1005 quantize 0.501 0.001 -> 0.501
dqqua1006 quantize 0.5012 0.001 -> 0.501 Inexact Rounded
dqqua1007 quantize 0.5018 0.001 -> 0.502 Inexact Rounded
dqqua1008 quantize 0.999 0.001 -> 0.999
dqqua481 quantize 12345678000 1e+3 -> 1.2345678E+10 Rounded
dqqua482 quantize 1234567800 1e+1 -> 1.23456780E+9 Rounded
dqqua483 quantize 1234567890 1e+1 -> 1.23456789E+9 Rounded
dqqua484 quantize 1234567891 1e+1 -> 1.23456789E+9 Inexact Rounded
dqqua485 quantize 12345678901 1e+2 -> 1.23456789E+10 Inexact Rounded
dqqua486 quantize 1234567896 1e+1 -> 1.23456790E+9 Inexact Rounded
-- a potential double-round
dqqua487 quantize 1234.987643 1e-4 -> 1234.9876 Inexact Rounded
dqqua488 quantize 1234.987647 1e-4 -> 1234.9876 Inexact Rounded
dqqua491 quantize 12345678000 1e+3 -> 1.2345678E+10 Rounded
dqqua492 quantize 1234567800 1e+1 -> 1.23456780E+9 Rounded
dqqua493 quantize 1234567890 1e+1 -> 1.23456789E+9 Rounded
dqqua494 quantize 1234567891 1e+1 -> 1.23456789E+9 Inexact Rounded
dqqua495 quantize 12345678901 1e+2 -> 1.23456789E+10 Inexact Rounded
dqqua496 quantize 1234567896 1e+1 -> 1.23456790E+9 Inexact Rounded
dqqua497 quantize 1234.987643 1e-4 -> 1234.9876 Inexact Rounded
dqqua498 quantize 1234.987647 1e-4 -> 1234.9876 Inexact Rounded
-- Zeros
dqqua500 quantize 0 1e1 -> 0E+1
dqqua501 quantize 0 1e0 -> 0
dqqua502 quantize 0 1e-1 -> 0.0
dqqua503 quantize 0.0 1e-1 -> 0.0
dqqua504 quantize 0.0 1e0 -> 0
dqqua505 quantize 0.0 1e+1 -> 0E+1
dqqua506 quantize 0E+1 1e-1 -> 0.0
dqqua507 quantize 0E+1 1e0 -> 0
dqqua508 quantize 0E+1 1e+1 -> 0E+1
dqqua509 quantize -0 1e1 -> -0E+1
dqqua510 quantize -0 1e0 -> -0
dqqua511 quantize -0 1e-1 -> -0.0
dqqua512 quantize -0.0 1e-1 -> -0.0
dqqua513 quantize -0.0 1e0 -> -0
dqqua514 quantize -0.0 1e+1 -> -0E+1
dqqua515 quantize -0E+1 1e-1 -> -0.0
dqqua516 quantize -0E+1 1e0 -> -0
dqqua517 quantize -0E+1 1e+1 -> -0E+1
-- #519 here once a problem
dqqua518 quantize 0 0E-3 -> 0.000
dqqua519 quantize 0 0E-33 -> 0E-33
dqqua520 quantize 0.00000000000000000000000000000000 0E-33 -> 0E-33
dqqua521 quantize 0.000000000000000000000000000000000 0E-33 -> 0E-33
-- Some non-zeros with lots of padding on the right
dqqua523 quantize 1 0E-33 -> 1.000000000000000000000000000000000
dqqua524 quantize 12 0E-32 -> 12.00000000000000000000000000000000
dqqua525 quantize 123 0E-31 -> 123.0000000000000000000000000000000
dqqua526 quantize 123 0E-32 -> NaN Invalid_operation
dqqua527 quantize 123.4 0E-31 -> 123.4000000000000000000000000000000
dqqua528 quantize 123.4 0E-32 -> NaN Invalid_operation
-- Suspicious RHS values
dqqua530 quantize 1.234 1e359 -> 0E+359 Inexact Rounded
dqqua531 quantize 123.456 1e359 -> 0E+359 Inexact Rounded
dqqua532 quantize 1.234 1e359 -> 0E+359 Inexact Rounded
dqqua533 quantize 123.456 1e359 -> 0E+359 Inexact Rounded
-- next four are "won't fit" overflows
dqqua536 quantize 1.234 1e-299 -> NaN Invalid_operation
dqqua537 quantize 123.456 1e-299 -> NaN Invalid_operation
dqqua538 quantize 1.234 1e-299 -> NaN Invalid_operation
dqqua539 quantize 123.456 1e-299 -> NaN Invalid_operation
dqqua542 quantize 1.234E+299 1e299 -> 1E+299 Inexact Rounded
dqqua543 quantize 1.234E+298 1e299 -> 0E+299 Inexact Rounded
dqqua544 quantize 1.234 1e299 -> 0E+299 Inexact Rounded
dqqua547 quantize 0 1e-299 -> 0E-299
-- next two are "won't fit" overflows
dqqua548 quantize 1.234 1e-299 -> NaN Invalid_operation
dqqua549 quantize 1.234 1e-300 -> NaN Invalid_operation
-- [more below]
-- Specials
dqqua580 quantize Inf -Inf -> Infinity
dqqua581 quantize Inf 1e-299 -> NaN Invalid_operation
dqqua582 quantize Inf 1e-1 -> NaN Invalid_operation
dqqua583 quantize Inf 1e0 -> NaN Invalid_operation
dqqua584 quantize Inf 1e1 -> NaN Invalid_operation
dqqua585 quantize Inf 1e299 -> NaN Invalid_operation
dqqua586 quantize Inf Inf -> Infinity
dqqua587 quantize -1000 Inf -> NaN Invalid_operation
dqqua588 quantize -Inf Inf -> -Infinity
dqqua589 quantize -1 Inf -> NaN Invalid_operation
dqqua590 quantize 0 Inf -> NaN Invalid_operation
dqqua591 quantize 1 Inf -> NaN Invalid_operation
dqqua592 quantize 1000 Inf -> NaN Invalid_operation
dqqua593 quantize Inf Inf -> Infinity
dqqua594 quantize Inf 1e-0 -> NaN Invalid_operation
dqqua595 quantize -0 Inf -> NaN Invalid_operation
dqqua600 quantize -Inf -Inf -> -Infinity
dqqua601 quantize -Inf 1e-299 -> NaN Invalid_operation
dqqua602 quantize -Inf 1e-1 -> NaN Invalid_operation
dqqua603 quantize -Inf 1e0 -> NaN Invalid_operation
dqqua604 quantize -Inf 1e1 -> NaN Invalid_operation
dqqua605 quantize -Inf 1e299 -> NaN Invalid_operation
dqqua606 quantize -Inf Inf -> -Infinity
dqqua607 quantize -1000 Inf -> NaN Invalid_operation
dqqua608 quantize -Inf -Inf -> -Infinity
dqqua609 quantize -1 -Inf -> NaN Invalid_operation
dqqua610 quantize 0 -Inf -> NaN Invalid_operation
dqqua611 quantize 1 -Inf -> NaN Invalid_operation
dqqua612 quantize 1000 -Inf -> NaN Invalid_operation
dqqua613 quantize Inf -Inf -> Infinity
dqqua614 quantize -Inf 1e-0 -> NaN Invalid_operation
dqqua615 quantize -0 -Inf -> NaN Invalid_operation
dqqua621 quantize NaN -Inf -> NaN
dqqua622 quantize NaN 1e-299 -> NaN
dqqua623 quantize NaN 1e-1 -> NaN
dqqua624 quantize NaN 1e0 -> NaN
dqqua625 quantize NaN 1e1 -> NaN
dqqua626 quantize NaN 1e299 -> NaN
dqqua627 quantize NaN Inf -> NaN
dqqua628 quantize NaN NaN -> NaN
dqqua629 quantize -Inf NaN -> NaN
dqqua630 quantize -1000 NaN -> NaN
dqqua631 quantize -1 NaN -> NaN
dqqua632 quantize 0 NaN -> NaN
dqqua633 quantize 1 NaN -> NaN
dqqua634 quantize 1000 NaN -> NaN
dqqua635 quantize Inf NaN -> NaN
dqqua636 quantize NaN 1e-0 -> NaN
dqqua637 quantize -0 NaN -> NaN
dqqua641 quantize sNaN -Inf -> NaN Invalid_operation
dqqua642 quantize sNaN 1e-299 -> NaN Invalid_operation
dqqua643 quantize sNaN 1e-1 -> NaN Invalid_operation
dqqua644 quantize sNaN 1e0 -> NaN Invalid_operation
dqqua645 quantize sNaN 1e1 -> NaN Invalid_operation
dqqua646 quantize sNaN 1e299 -> NaN Invalid_operation
dqqua647 quantize sNaN NaN -> NaN Invalid_operation
dqqua648 quantize sNaN sNaN -> NaN Invalid_operation
dqqua649 quantize NaN sNaN -> NaN Invalid_operation
dqqua650 quantize -Inf sNaN -> NaN Invalid_operation
dqqua651 quantize -1000 sNaN -> NaN Invalid_operation
dqqua652 quantize -1 sNaN -> NaN Invalid_operation
dqqua653 quantize 0 sNaN -> NaN Invalid_operation
dqqua654 quantize 1 sNaN -> NaN Invalid_operation
dqqua655 quantize 1000 sNaN -> NaN Invalid_operation
dqqua656 quantize Inf sNaN -> NaN Invalid_operation
dqqua657 quantize NaN sNaN -> NaN Invalid_operation
dqqua658 quantize sNaN 1e-0 -> NaN Invalid_operation
dqqua659 quantize -0 sNaN -> NaN Invalid_operation
-- propagating NaNs
dqqua661 quantize NaN9 -Inf -> NaN9
dqqua662 quantize NaN8 919 -> NaN8
dqqua663 quantize NaN71 Inf -> NaN71
dqqua664 quantize NaN6 NaN5 -> NaN6
dqqua665 quantize -Inf NaN4 -> NaN4
dqqua666 quantize -919 NaN31 -> NaN31
dqqua667 quantize Inf NaN2 -> NaN2
dqqua671 quantize sNaN99 -Inf -> NaN99 Invalid_operation
dqqua672 quantize sNaN98 -11 -> NaN98 Invalid_operation
dqqua673 quantize sNaN97 NaN -> NaN97 Invalid_operation
dqqua674 quantize sNaN16 sNaN94 -> NaN16 Invalid_operation
dqqua675 quantize NaN95 sNaN93 -> NaN93 Invalid_operation
dqqua676 quantize -Inf sNaN92 -> NaN92 Invalid_operation
dqqua677 quantize 088 sNaN91 -> NaN91 Invalid_operation
dqqua678 quantize Inf sNaN90 -> NaN90 Invalid_operation
dqqua679 quantize NaN sNaN88 -> NaN88 Invalid_operation
dqqua681 quantize -NaN9 -Inf -> -NaN9
dqqua682 quantize -NaN8 919 -> -NaN8
dqqua683 quantize -NaN71 Inf -> -NaN71
dqqua684 quantize -NaN6 -NaN5 -> -NaN6
dqqua685 quantize -Inf -NaN4 -> -NaN4
dqqua686 quantize -919 -NaN31 -> -NaN31
dqqua687 quantize Inf -NaN2 -> -NaN2
dqqua691 quantize -sNaN99 -Inf -> -NaN99 Invalid_operation
dqqua692 quantize -sNaN98 -11 -> -NaN98 Invalid_operation
dqqua693 quantize -sNaN97 NaN -> -NaN97 Invalid_operation
dqqua694 quantize -sNaN16 sNaN94 -> -NaN16 Invalid_operation
dqqua695 quantize -NaN95 -sNaN93 -> -NaN93 Invalid_operation
dqqua696 quantize -Inf -sNaN92 -> -NaN92 Invalid_operation
dqqua697 quantize 088 -sNaN91 -> -NaN91 Invalid_operation
dqqua698 quantize Inf -sNaN90 -> -NaN90 Invalid_operation
dqqua699 quantize NaN -sNaN88 -> -NaN88 Invalid_operation
-- subnormals and underflow
dqqua710 quantize 1.00E-6143 1e-6143 -> 1E-6143 Rounded
dqqua711 quantize 0.1E-6143 2e-6144 -> 1E-6144 Subnormal
dqqua712 quantize 0.10E-6143 3e-6144 -> 1E-6144 Subnormal Rounded
dqqua713 quantize 0.100E-6143 4e-6144 -> 1E-6144 Subnormal Rounded
dqqua714 quantize 0.01E-6143 5e-6145 -> 1E-6145 Subnormal
-- next is rounded to Emin
dqqua715 quantize 0.999E-6143 1e-6143 -> 1E-6143 Inexact Rounded
dqqua716 quantize 0.099E-6143 10e-6144 -> 1E-6144 Inexact Rounded Subnormal
dqqua717 quantize 0.009E-6143 1e-6145 -> 1E-6145 Inexact Rounded Subnormal
dqqua718 quantize 0.001E-6143 1e-6145 -> 0E-6145 Inexact Rounded
dqqua719 quantize 0.0009E-6143 1e-6145 -> 0E-6145 Inexact Rounded
dqqua720 quantize 0.0001E-6143 1e-6145 -> 0E-6145 Inexact Rounded
dqqua730 quantize -1.00E-6143 1e-6143 -> -1E-6143 Rounded
dqqua731 quantize -0.1E-6143 1e-6143 -> -0E-6143 Rounded Inexact
dqqua732 quantize -0.10E-6143 1e-6143 -> -0E-6143 Rounded Inexact
dqqua733 quantize -0.100E-6143 1e-6143 -> -0E-6143 Rounded Inexact
dqqua734 quantize -0.01E-6143 1e-6143 -> -0E-6143 Inexact Rounded
-- next is rounded to Emin
dqqua735 quantize -0.999E-6143 90e-6143 -> -1E-6143 Inexact Rounded
dqqua736 quantize -0.099E-6143 -1e-6143 -> -0E-6143 Inexact Rounded
dqqua737 quantize -0.009E-6143 -1e-6143 -> -0E-6143 Inexact Rounded
dqqua738 quantize -0.001E-6143 -0e-6143 -> -0E-6143 Inexact Rounded
dqqua739 quantize -0.0001E-6143 0e-6143 -> -0E-6143 Inexact Rounded
dqqua740 quantize -1.00E-6143 1e-6144 -> -1.0E-6143 Rounded
dqqua741 quantize -0.1E-6143 1e-6144 -> -1E-6144 Subnormal
dqqua742 quantize -0.10E-6143 1e-6144 -> -1E-6144 Subnormal Rounded
dqqua743 quantize -0.100E-6143 1e-6144 -> -1E-6144 Subnormal Rounded
dqqua744 quantize -0.01E-6143 1e-6144 -> -0E-6144 Inexact Rounded
-- next is rounded to Emin
dqqua745 quantize -0.999E-6143 1e-6144 -> -1.0E-6143 Inexact Rounded
dqqua746 quantize -0.099E-6143 1e-6144 -> -1E-6144 Inexact Rounded Subnormal
dqqua747 quantize -0.009E-6143 1e-6144 -> -0E-6144 Inexact Rounded
dqqua748 quantize -0.001E-6143 1e-6144 -> -0E-6144 Inexact Rounded
dqqua749 quantize -0.0001E-6143 1e-6144 -> -0E-6144 Inexact Rounded
dqqua750 quantize -1.00E-6143 1e-6145 -> -1.00E-6143
dqqua751 quantize -0.1E-6143 1e-6145 -> -1.0E-6144 Subnormal
dqqua752 quantize -0.10E-6143 1e-6145 -> -1.0E-6144 Subnormal
dqqua753 quantize -0.100E-6143 1e-6145 -> -1.0E-6144 Subnormal Rounded
dqqua754 quantize -0.01E-6143 1e-6145 -> -1E-6145 Subnormal
-- next is rounded to Emin
dqqua755 quantize -0.999E-6143 1e-6145 -> -1.00E-6143 Inexact Rounded
dqqua756 quantize -0.099E-6143 1e-6145 -> -1.0E-6144 Inexact Rounded Subnormal
dqqua757 quantize -0.009E-6143 1e-6145 -> -1E-6145 Inexact Rounded Subnormal
dqqua758 quantize -0.001E-6143 1e-6145 -> -0E-6145 Inexact Rounded
dqqua759 quantize -0.0001E-6143 1e-6145 -> -0E-6145 Inexact Rounded
dqqua760 quantize -1.00E-6143 1e-6146 -> -1.000E-6143
dqqua761 quantize -0.1E-6143 1e-6146 -> -1.00E-6144 Subnormal
dqqua762 quantize -0.10E-6143 1e-6146 -> -1.00E-6144 Subnormal
dqqua763 quantize -0.100E-6143 1e-6146 -> -1.00E-6144 Subnormal
dqqua764 quantize -0.01E-6143 1e-6146 -> -1.0E-6145 Subnormal
dqqua765 quantize -0.999E-6143 1e-6146 -> -9.99E-6144 Subnormal
dqqua766 quantize -0.099E-6143 1e-6146 -> -9.9E-6145 Subnormal
dqqua767 quantize -0.009E-6143 1e-6146 -> -9E-6146 Subnormal
dqqua768 quantize -0.001E-6143 1e-6146 -> -1E-6146 Subnormal
dqqua769 quantize -0.0001E-6143 1e-6146 -> -0E-6146 Inexact Rounded
-- More from Fung Lee
-- the next four would appear to be in error, but they are misleading (the
-- operands will be clamped to a lower exponent) and so are omitted
-- dqqua1021 quantize 8.666666666666000E+6144 1.000000000000000E+6144 -> 8.666666666666000000000000000000000E+6144 Clamped
-- dqqua1022 quantize -8.666666666666000E+6144 1.000000000000000E+6144 -> -8.666666666666000000000000000000000E+6144 Clamped
-- dqqua1027 quantize 8.666666666666000E+323 1E+31 -> NaN Invalid_operation
-- dqqua1030 quantize 8.66666666E+3 1E+3 -> 9E+3 Inexact Rounded
-- Int and uInt32 edge values for testing conversions
dqqua1040 quantize -2147483646 0 -> -2147483646
dqqua1041 quantize -2147483647 0 -> -2147483647
dqqua1042 quantize -2147483648 0 -> -2147483648
dqqua1043 quantize -2147483649 0 -> -2147483649
dqqua1044 quantize 2147483646 0 -> 2147483646
dqqua1045 quantize 2147483647 0 -> 2147483647
dqqua1046 quantize 2147483648 0 -> 2147483648
dqqua1047 quantize 2147483649 0 -> 2147483649
dqqua1048 quantize 4294967294 0 -> 4294967294
dqqua1049 quantize 4294967295 0 -> 4294967295
dqqua1050 quantize 4294967296 0 -> 4294967296
dqqua1051 quantize 4294967297 0 -> 4294967297
-- Rounding swathe
rounding: half_even
dqqua1100 quantize 1.2300 1.00 -> 1.23 Rounded
dqqua1101 quantize 1.2301 1.00 -> 1.23 Inexact Rounded
dqqua1102 quantize 1.2310 1.00 -> 1.23 Inexact Rounded
dqqua1103 quantize 1.2350 1.00 -> 1.24 Inexact Rounded
dqqua1104 quantize 1.2351 1.00 -> 1.24 Inexact Rounded
dqqua1105 quantize 1.2450 1.00 -> 1.24 Inexact Rounded
dqqua1106 quantize 1.2451 1.00 -> 1.25 Inexact Rounded
dqqua1107 quantize 1.2360 1.00 -> 1.24 Inexact Rounded
dqqua1108 quantize 1.2370 1.00 -> 1.24 Inexact Rounded
dqqua1109 quantize 1.2399 1.00 -> 1.24 Inexact Rounded
rounding: half_up
dqqua1200 quantize 1.2300 1.00 -> 1.23 Rounded
dqqua1201 quantize 1.2301 1.00 -> 1.23 Inexact Rounded
dqqua1202 quantize 1.2310 1.00 -> 1.23 Inexact Rounded
dqqua1203 quantize 1.2350 1.00 -> 1.24 Inexact Rounded
dqqua1204 quantize 1.2351 1.00 -> 1.24 Inexact Rounded
dqqua1205 quantize 1.2450 1.00 -> 1.25 Inexact Rounded
dqqua1206 quantize 1.2451 1.00 -> 1.25 Inexact Rounded
dqqua1207 quantize 1.2360 1.00 -> 1.24 Inexact Rounded
dqqua1208 quantize 1.2370 1.00 -> 1.24 Inexact Rounded
dqqua1209 quantize 1.2399 1.00 -> 1.24 Inexact Rounded
rounding: half_down
dqqua1300 quantize 1.2300 1.00 -> 1.23 Rounded
dqqua1301 quantize 1.2301 1.00 -> 1.23 Inexact Rounded
dqqua1302 quantize 1.2310 1.00 -> 1.23 Inexact Rounded
dqqua1303 quantize 1.2350 1.00 -> 1.23 Inexact Rounded
dqqua1304 quantize 1.2351 1.00 -> 1.24 Inexact Rounded
dqqua1305 quantize 1.2450 1.00 -> 1.24 Inexact Rounded
dqqua1306 quantize 1.2451 1.00 -> 1.25 Inexact Rounded
dqqua1307 quantize 1.2360 1.00 -> 1.24 Inexact Rounded
dqqua1308 quantize 1.2370 1.00 -> 1.24 Inexact Rounded
dqqua1309 quantize 1.2399 1.00 -> 1.24 Inexact Rounded
rounding: up
dqqua1400 quantize 1.2300 1.00 -> 1.23 Rounded
dqqua1401 quantize 1.2301 1.00 -> 1.24 Inexact Rounded
dqqua1402 quantize 1.2310 1.00 -> 1.24 Inexact Rounded
dqqua1403 quantize 1.2350 1.00 -> 1.24 Inexact Rounded
dqqua1404 quantize 1.2351 1.00 -> 1.24 Inexact Rounded
dqqua1405 quantize 1.2450 1.00 -> 1.25 Inexact Rounded
dqqua1406 quantize 1.2451 1.00 -> 1.25 Inexact Rounded
dqqua1407 quantize 1.2360 1.00 -> 1.24 Inexact Rounded
dqqua1408 quantize 1.2370 1.00 -> 1.24 Inexact Rounded
dqqua1409 quantize 1.2399 1.00 -> 1.24 Inexact Rounded
dqqua1411 quantize -1.2399 1.00 -> -1.24 Inexact Rounded
rounding: down
dqqua1500 quantize 1.2300 1.00 -> 1.23 Rounded
dqqua1501 quantize 1.2301 1.00 -> 1.23 Inexact Rounded
dqqua1502 quantize 1.2310 1.00 -> 1.23 Inexact Rounded
dqqua1503 quantize 1.2350 1.00 -> 1.23 Inexact Rounded
dqqua1504 quantize 1.2351 1.00 -> 1.23 Inexact Rounded
dqqua1505 quantize 1.2450 1.00 -> 1.24 Inexact Rounded
dqqua1506 quantize 1.2451 1.00 -> 1.24 Inexact Rounded
dqqua1507 quantize 1.2360 1.00 -> 1.23 Inexact Rounded
dqqua1508 quantize 1.2370 1.00 -> 1.23 Inexact Rounded
dqqua1509 quantize 1.2399 1.00 -> 1.23 Inexact Rounded
dqqua1511 quantize -1.2399 1.00 -> -1.23 Inexact Rounded
rounding: ceiling
dqqua1600 quantize 1.2300 1.00 -> 1.23 Rounded
dqqua1601 quantize 1.2301 1.00 -> 1.24 Inexact Rounded
dqqua1602 quantize 1.2310 1.00 -> 1.24 Inexact Rounded
dqqua1603 quantize 1.2350 1.00 -> 1.24 Inexact Rounded
dqqua1604 quantize 1.2351 1.00 -> 1.24 Inexact Rounded
dqqua1605 quantize 1.2450 1.00 -> 1.25 Inexact Rounded
dqqua1606 quantize 1.2451 1.00 -> 1.25 Inexact Rounded
dqqua1607 quantize 1.2360 1.00 -> 1.24 Inexact Rounded
dqqua1608 quantize 1.2370 1.00 -> 1.24 Inexact Rounded
dqqua1609 quantize 1.2399 1.00 -> 1.24 Inexact Rounded
dqqua1611 quantize -1.2399 1.00 -> -1.23 Inexact Rounded
rounding: floor
dqqua1700 quantize 1.2300 1.00 -> 1.23 Rounded
dqqua1701 quantize 1.2301 1.00 -> 1.23 Inexact Rounded
dqqua1702 quantize 1.2310 1.00 -> 1.23 Inexact Rounded
dqqua1703 quantize 1.2350 1.00 -> 1.23 Inexact Rounded
dqqua1704 quantize 1.2351 1.00 -> 1.23 Inexact Rounded
dqqua1705 quantize 1.2450 1.00 -> 1.24 Inexact Rounded
dqqua1706 quantize 1.2451 1.00 -> 1.24 Inexact Rounded
dqqua1707 quantize 1.2360 1.00 -> 1.23 Inexact Rounded
dqqua1708 quantize 1.2370 1.00 -> 1.23 Inexact Rounded
dqqua1709 quantize 1.2399 1.00 -> 1.23 Inexact Rounded
dqqua1711 quantize -1.2399 1.00 -> -1.24 Inexact Rounded
rounding: 05up
dqqua1800 quantize 1.2000 1.00 -> 1.20 Rounded
dqqua1801 quantize 1.2001 1.00 -> 1.21 Inexact Rounded
dqqua1802 quantize 1.2010 1.00 -> 1.21 Inexact Rounded
dqqua1803 quantize 1.2050 1.00 -> 1.21 Inexact Rounded
dqqua1804 quantize 1.2051 1.00 -> 1.21 Inexact Rounded
dqqua1807 quantize 1.2060 1.00 -> 1.21 Inexact Rounded
dqqua1808 quantize 1.2070 1.00 -> 1.21 Inexact Rounded
dqqua1809 quantize 1.2099 1.00 -> 1.21 Inexact Rounded
dqqua1811 quantize -1.2099 1.00 -> -1.21 Inexact Rounded
dqqua1900 quantize 1.2100 1.00 -> 1.21 Rounded
dqqua1901 quantize 1.2101 1.00 -> 1.21 Inexact Rounded
dqqua1902 quantize 1.2110 1.00 -> 1.21 Inexact Rounded
dqqua1903 quantize 1.2150 1.00 -> 1.21 Inexact Rounded
dqqua1904 quantize 1.2151 1.00 -> 1.21 Inexact Rounded
dqqua1907 quantize 1.2160 1.00 -> 1.21 Inexact Rounded
dqqua1908 quantize 1.2170 1.00 -> 1.21 Inexact Rounded
dqqua1909 quantize 1.2199 1.00 -> 1.21 Inexact Rounded
dqqua1911 quantize -1.2199 1.00 -> -1.21 Inexact Rounded
dqqua2000 quantize 1.2400 1.00 -> 1.24 Rounded
dqqua2001 quantize 1.2401 1.00 -> 1.24 Inexact Rounded
dqqua2002 quantize 1.2410 1.00 -> 1.24 Inexact Rounded
dqqua2003 quantize 1.2450 1.00 -> 1.24 Inexact Rounded
dqqua2004 quantize 1.2451 1.00 -> 1.24 Inexact Rounded
dqqua2007 quantize 1.2460 1.00 -> 1.24 Inexact Rounded
dqqua2008 quantize 1.2470 1.00 -> 1.24 Inexact Rounded
dqqua2009 quantize 1.2499 1.00 -> 1.24 Inexact Rounded
dqqua2011 quantize -1.2499 1.00 -> -1.24 Inexact Rounded
dqqua2100 quantize 1.2500 1.00 -> 1.25 Rounded
dqqua2101 quantize 1.2501 1.00 -> 1.26 Inexact Rounded
dqqua2102 quantize 1.2510 1.00 -> 1.26 Inexact Rounded
dqqua2103 quantize 1.2550 1.00 -> 1.26 Inexact Rounded
dqqua2104 quantize 1.2551 1.00 -> 1.26 Inexact Rounded
dqqua2107 quantize 1.2560 1.00 -> 1.26 Inexact Rounded
dqqua2108 quantize 1.2570 1.00 -> 1.26 Inexact Rounded
dqqua2109 quantize 1.2599 1.00 -> 1.26 Inexact Rounded
dqqua2111 quantize -1.2599 1.00 -> -1.26 Inexact Rounded
dqqua2200 quantize 1.2600 1.00 -> 1.26 Rounded
dqqua2201 quantize 1.2601 1.00 -> 1.26 Inexact Rounded
dqqua2202 quantize 1.2610 1.00 -> 1.26 Inexact Rounded
dqqua2203 quantize 1.2650 1.00 -> 1.26 Inexact Rounded
dqqua2204 quantize 1.2651 1.00 -> 1.26 Inexact Rounded
dqqua2207 quantize 1.2660 1.00 -> 1.26 Inexact Rounded
dqqua2208 quantize 1.2670 1.00 -> 1.26 Inexact Rounded
dqqua2209 quantize 1.2699 1.00 -> 1.26 Inexact Rounded
dqqua2211 quantize -1.2699 1.00 -> -1.26 Inexact Rounded
dqqua2300 quantize 1.2900 1.00 -> 1.29 Rounded
dqqua2301 quantize 1.2901 1.00 -> 1.29 Inexact Rounded
dqqua2302 quantize 1.2910 1.00 -> 1.29 Inexact Rounded
dqqua2303 quantize 1.2950 1.00 -> 1.29 Inexact Rounded
dqqua2304 quantize 1.2951 1.00 -> 1.29 Inexact Rounded
dqqua2307 quantize 1.2960 1.00 -> 1.29 Inexact Rounded
dqqua2308 quantize 1.2970 1.00 -> 1.29 Inexact Rounded
dqqua2309 quantize 1.2999 1.00 -> 1.29 Inexact Rounded
dqqua2311 quantize -1.2999 1.00 -> -1.29 Inexact Rounded
-- Null tests
dqqua998 quantize 10 # -> NaN Invalid_operation
dqqua999 quantize # 1e10 -> NaN Invalid_operation

View File

@@ -0,0 +1,183 @@
------------------------------------------------------------------------
-- dqReduce.decTest -- remove trailing zeros from a decQuad --
-- Copyright (c) IBM Corporation, 2003, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqred001 reduce '1' -> '1'
dqred002 reduce '-1' -> '-1'
dqred003 reduce '1.00' -> '1'
dqred004 reduce '-1.00' -> '-1'
dqred005 reduce '0' -> '0'
dqred006 reduce '0.00' -> '0'
dqred007 reduce '00.0' -> '0'
dqred008 reduce '00.00' -> '0'
dqred009 reduce '00' -> '0'
dqred010 reduce '0E+1' -> '0'
dqred011 reduce '0E+5' -> '0'
dqred012 reduce '-2' -> '-2'
dqred013 reduce '2' -> '2'
dqred014 reduce '-2.00' -> '-2'
dqred015 reduce '2.00' -> '2'
dqred016 reduce '-0' -> '-0'
dqred017 reduce '-0.00' -> '-0'
dqred018 reduce '-00.0' -> '-0'
dqred019 reduce '-00.00' -> '-0'
dqred020 reduce '-00' -> '-0'
dqred021 reduce '-0E+5' -> '-0'
dqred022 reduce '-0E+1' -> '-0'
dqred030 reduce '+0.1' -> '0.1'
dqred031 reduce '-0.1' -> '-0.1'
dqred032 reduce '+0.01' -> '0.01'
dqred033 reduce '-0.01' -> '-0.01'
dqred034 reduce '+0.001' -> '0.001'
dqred035 reduce '-0.001' -> '-0.001'
dqred036 reduce '+0.000001' -> '0.000001'
dqred037 reduce '-0.000001' -> '-0.000001'
dqred038 reduce '+0.000000000001' -> '1E-12'
dqred039 reduce '-0.000000000001' -> '-1E-12'
dqred041 reduce 1.1 -> 1.1
dqred042 reduce 1.10 -> 1.1
dqred043 reduce 1.100 -> 1.1
dqred044 reduce 1.110 -> 1.11
dqred045 reduce -1.1 -> -1.1
dqred046 reduce -1.10 -> -1.1
dqred047 reduce -1.100 -> -1.1
dqred048 reduce -1.110 -> -1.11
dqred049 reduce 9.9 -> 9.9
dqred050 reduce 9.90 -> 9.9
dqred051 reduce 9.900 -> 9.9
dqred052 reduce 9.990 -> 9.99
dqred053 reduce -9.9 -> -9.9
dqred054 reduce -9.90 -> -9.9
dqred055 reduce -9.900 -> -9.9
dqred056 reduce -9.990 -> -9.99
-- some trailing fractional zeros with zeros in units
dqred060 reduce 10.0 -> 1E+1
dqred061 reduce 10.00 -> 1E+1
dqred062 reduce 100.0 -> 1E+2
dqred063 reduce 100.00 -> 1E+2
dqred064 reduce 1.1000E+3 -> 1.1E+3
dqred065 reduce 1.10000E+3 -> 1.1E+3
dqred066 reduce -10.0 -> -1E+1
dqred067 reduce -10.00 -> -1E+1
dqred068 reduce -100.0 -> -1E+2
dqred069 reduce -100.00 -> -1E+2
dqred070 reduce -1.1000E+3 -> -1.1E+3
dqred071 reduce -1.10000E+3 -> -1.1E+3
-- some insignificant trailing zeros with positive exponent
dqred080 reduce 10E+1 -> 1E+2
dqred081 reduce 100E+1 -> 1E+3
dqred082 reduce 1.0E+2 -> 1E+2
dqred083 reduce 1.0E+3 -> 1E+3
dqred084 reduce 1.1E+3 -> 1.1E+3
dqred085 reduce 1.00E+3 -> 1E+3
dqred086 reduce 1.10E+3 -> 1.1E+3
dqred087 reduce -10E+1 -> -1E+2
dqred088 reduce -100E+1 -> -1E+3
dqred089 reduce -1.0E+2 -> -1E+2
dqred090 reduce -1.0E+3 -> -1E+3
dqred091 reduce -1.1E+3 -> -1.1E+3
dqred092 reduce -1.00E+3 -> -1E+3
dqred093 reduce -1.10E+3 -> -1.1E+3
-- some significant trailing zeros, were we to be trimming
dqred100 reduce 11 -> 11
dqred101 reduce 10 -> 1E+1
dqred102 reduce 10. -> 1E+1
dqred103 reduce 1.1E+1 -> 11
dqred104 reduce 1.0E+1 -> 1E+1
dqred105 reduce 1.10E+2 -> 1.1E+2
dqred106 reduce 1.00E+2 -> 1E+2
dqred107 reduce 1.100E+3 -> 1.1E+3
dqred108 reduce 1.000E+3 -> 1E+3
dqred109 reduce 1.000000E+6 -> 1E+6
dqred110 reduce -11 -> -11
dqred111 reduce -10 -> -1E+1
dqred112 reduce -10. -> -1E+1
dqred113 reduce -1.1E+1 -> -11
dqred114 reduce -1.0E+1 -> -1E+1
dqred115 reduce -1.10E+2 -> -1.1E+2
dqred116 reduce -1.00E+2 -> -1E+2
dqred117 reduce -1.100E+3 -> -1.1E+3
dqred118 reduce -1.000E+3 -> -1E+3
dqred119 reduce -1.00000E+5 -> -1E+5
dqred120 reduce -1.000000E+6 -> -1E+6
dqred121 reduce -10.00000E+6 -> -1E+7
dqred122 reduce -100.0000E+6 -> -1E+8
dqred123 reduce -1000.000E+6 -> -1E+9
dqred124 reduce -10000.00E+6 -> -1E+10
dqred125 reduce -100000.0E+6 -> -1E+11
dqred126 reduce -1000000.E+6 -> -1E+12
-- examples from decArith
dqred140 reduce '2.1' -> '2.1'
dqred141 reduce '-2.0' -> '-2'
dqred142 reduce '1.200' -> '1.2'
dqred143 reduce '-120' -> '-1.2E+2'
dqred144 reduce '120.00' -> '1.2E+2'
dqred145 reduce '0.00' -> '0'
-- Nmax, Nmin, Ntiny
-- note origami effect on some of these
dqred151 reduce 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqred152 reduce 9.999999999999999999999999000000000E+6140 -> 9.99999999999999999999999900000E+6140
dqred153 reduce 9.999999999999999999999999999990000E+6144 -> 9.999999999999999999999999999990000E+6144
dqred154 reduce 1E-6143 -> 1E-6143
dqred155 reduce 1.000000000000000000000000000000000E-6143 -> 1E-6143
dqred156 reduce 2.000E-6173 -> 2E-6173 Subnormal
dqred157 reduce 1E-6176 -> 1E-6176 Subnormal
dqred161 reduce -1E-6176 -> -1E-6176 Subnormal
dqred162 reduce -2.000E-6173 -> -2E-6173 Subnormal
dqred163 reduce -1.000000000000000000000000000000000E-6143 -> -1E-6143
dqred164 reduce -1E-6143 -> -1E-6143
dqred165 reduce -9.999999999999999999999999000000000E+6140 -> -9.99999999999999999999999900000E+6140
dqred166 reduce -9.999999999999999999999999999990000E+6144 -> -9.999999999999999999999999999990000E+6144
dqred167 reduce -9.999999999999999999999999999999990E+6144 -> -9.999999999999999999999999999999990E+6144
dqred168 reduce -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
dqred169 reduce -9.999999999999999999999999999999990E+6144 -> -9.999999999999999999999999999999990E+6144
-- specials (reduce does not affect payload)
dqred820 reduce 'Inf' -> 'Infinity'
dqred821 reduce '-Inf' -> '-Infinity'
dqred822 reduce NaN -> NaN
dqred823 reduce sNaN -> NaN Invalid_operation
dqred824 reduce NaN101 -> NaN101
dqred825 reduce sNaN010 -> NaN10 Invalid_operation
dqred827 reduce -NaN -> -NaN
dqred828 reduce -sNaN -> -NaN Invalid_operation
dqred829 reduce -NaN101 -> -NaN101
dqred830 reduce -sNaN010 -> -NaN10 Invalid_operation
-- Null test
dqred900 reduce # -> NaN Invalid_operation

View File

@@ -0,0 +1,298 @@
------------------------------------------------------------------------
-- dqRotate.decTest -- rotate decQuad coefficient left or right --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqrot001 rotate 0 0 -> 0
dqrot002 rotate 0 2 -> 0
dqrot003 rotate 1 2 -> 100
dqrot004 rotate 1 33 -> 1000000000000000000000000000000000
dqrot005 rotate 1 34 -> 1
dqrot006 rotate 1 -1 -> 1000000000000000000000000000000000
dqrot007 rotate 0 -2 -> 0
dqrot008 rotate 1234567890123456789012345678901234 -1 -> 4123456789012345678901234567890123
dqrot009 rotate 1234567890123456789012345678901234 -33 -> 2345678901234567890123456789012341
dqrot010 rotate 1234567890123456789012345678901234 -34 -> 1234567890123456789012345678901234
dqrot011 rotate 9934567890123456789012345678901234 -33 -> 9345678901234567890123456789012349
dqrot012 rotate 9934567890123456789012345678901234 -34 -> 9934567890123456789012345678901234
-- rhs must be an integer
dqrot015 rotate 1 1.5 -> NaN Invalid_operation
dqrot016 rotate 1 1.0 -> NaN Invalid_operation
dqrot017 rotate 1 0.1 -> NaN Invalid_operation
dqrot018 rotate 1 0.0 -> NaN Invalid_operation
dqrot019 rotate 1 1E+1 -> NaN Invalid_operation
dqrot020 rotate 1 1E+99 -> NaN Invalid_operation
dqrot021 rotate 1 Inf -> NaN Invalid_operation
dqrot022 rotate 1 -Inf -> NaN Invalid_operation
-- and |rhs| <= precision
dqrot025 rotate 1 -1000 -> NaN Invalid_operation
dqrot026 rotate 1 -35 -> NaN Invalid_operation
dqrot027 rotate 1 35 -> NaN Invalid_operation
dqrot028 rotate 1 1000 -> NaN Invalid_operation
-- full pattern
dqrot030 rotate 1234567890123456789012345678901234 -34 -> 1234567890123456789012345678901234
dqrot031 rotate 1234567890123456789012345678901234 -33 -> 2345678901234567890123456789012341
dqrot032 rotate 1234567890123456789012345678901234 -32 -> 3456789012345678901234567890123412
dqrot033 rotate 1234567890123456789012345678901234 -31 -> 4567890123456789012345678901234123
dqrot034 rotate 1234567890123456789012345678901234 -30 -> 5678901234567890123456789012341234
dqrot035 rotate 1234567890123456789012345678901234 -29 -> 6789012345678901234567890123412345
dqrot036 rotate 1234567890123456789012345678901234 -28 -> 7890123456789012345678901234123456
dqrot037 rotate 1234567890123456789012345678901234 -27 -> 8901234567890123456789012341234567
dqrot038 rotate 1234567890123456789012345678901234 -26 -> 9012345678901234567890123412345678
dqrot039 rotate 1234567890123456789012345678901234 -25 -> 123456789012345678901234123456789
dqrot040 rotate 1234567890123456789012345678901234 -24 -> 1234567890123456789012341234567890
dqrot041 rotate 1234567890123456789012345678901234 -23 -> 2345678901234567890123412345678901
dqrot042 rotate 1234567890123456789012345678901234 -22 -> 3456789012345678901234123456789012
dqrot043 rotate 1234567890123456789012345678901234 -21 -> 4567890123456789012341234567890123
dqrot044 rotate 1234567890123456789012345678901234 -20 -> 5678901234567890123412345678901234
dqrot045 rotate 1234567890123456789012345678901234 -19 -> 6789012345678901234123456789012345
dqrot047 rotate 1234567890123456789012345678901234 -18 -> 7890123456789012341234567890123456
dqrot048 rotate 1234567890123456789012345678901234 -17 -> 8901234567890123412345678901234567
dqrot049 rotate 1234567890123456789012345678901234 -16 -> 9012345678901234123456789012345678
dqrot050 rotate 1234567890123456789012345678901234 -15 -> 123456789012341234567890123456789
dqrot051 rotate 1234567890123456789012345678901234 -14 -> 1234567890123412345678901234567890
dqrot052 rotate 1234567890123456789012345678901234 -13 -> 2345678901234123456789012345678901
dqrot053 rotate 1234567890123456789012345678901234 -12 -> 3456789012341234567890123456789012
dqrot054 rotate 1234567890123456789012345678901234 -11 -> 4567890123412345678901234567890123
dqrot055 rotate 1234567890123456789012345678901234 -10 -> 5678901234123456789012345678901234
dqrot056 rotate 1234567890123456789012345678901234 -9 -> 6789012341234567890123456789012345
dqrot057 rotate 1234567890123456789012345678901234 -8 -> 7890123412345678901234567890123456
dqrot058 rotate 1234567890123456789012345678901234 -7 -> 8901234123456789012345678901234567
dqrot059 rotate 1234567890123456789012345678901234 -6 -> 9012341234567890123456789012345678
dqrot060 rotate 1234567890123456789012345678901234 -5 -> 123412345678901234567890123456789
dqrot061 rotate 1234567890123456789012345678901234 -4 -> 1234123456789012345678901234567890
dqrot062 rotate 1234567890123456789012345678901234 -3 -> 2341234567890123456789012345678901
dqrot063 rotate 1234567890123456789012345678901234 -2 -> 3412345678901234567890123456789012
dqrot064 rotate 1234567890123456789012345678901234 -1 -> 4123456789012345678901234567890123
dqrot065 rotate 1234567890123456789012345678901234 -0 -> 1234567890123456789012345678901234
dqrot066 rotate 1234567890123456789012345678901234 +0 -> 1234567890123456789012345678901234
dqrot067 rotate 1234567890123456789012345678901234 +1 -> 2345678901234567890123456789012341
dqrot068 rotate 1234567890123456789012345678901234 +2 -> 3456789012345678901234567890123412
dqrot069 rotate 1234567890123456789012345678901234 +3 -> 4567890123456789012345678901234123
dqrot070 rotate 1234567890123456789012345678901234 +4 -> 5678901234567890123456789012341234
dqrot071 rotate 1234567890123456789012345678901234 +5 -> 6789012345678901234567890123412345
dqrot072 rotate 1234567890123456789012345678901234 +6 -> 7890123456789012345678901234123456
dqrot073 rotate 1234567890123456789012345678901234 +7 -> 8901234567890123456789012341234567
dqrot074 rotate 1234567890123456789012345678901234 +8 -> 9012345678901234567890123412345678
dqrot075 rotate 1234567890123456789012345678901234 +9 -> 123456789012345678901234123456789
dqrot076 rotate 1234567890123456789012345678901234 +10 -> 1234567890123456789012341234567890
dqrot077 rotate 1234567890123456789012345678901234 +11 -> 2345678901234567890123412345678901
dqrot078 rotate 1234567890123456789012345678901234 +12 -> 3456789012345678901234123456789012
dqrot079 rotate 1234567890123456789012345678901234 +13 -> 4567890123456789012341234567890123
dqrot080 rotate 1234567890123456789012345678901234 +14 -> 5678901234567890123412345678901234
dqrot081 rotate 1234567890123456789012345678901234 +15 -> 6789012345678901234123456789012345
dqrot082 rotate 1234567890123456789012345678901234 +16 -> 7890123456789012341234567890123456
dqrot083 rotate 1234567890123456789012345678901234 +17 -> 8901234567890123412345678901234567
dqrot084 rotate 1234567890123456789012345678901234 +18 -> 9012345678901234123456789012345678
dqrot085 rotate 1234567890123456789012345678901234 +19 -> 123456789012341234567890123456789
dqrot086 rotate 1234567890123456789012345678901234 +20 -> 1234567890123412345678901234567890
dqrot087 rotate 1234567890123456789012345678901234 +21 -> 2345678901234123456789012345678901
dqrot088 rotate 1234567890123456789012345678901234 +22 -> 3456789012341234567890123456789012
dqrot089 rotate 1234567890123456789012345678901234 +23 -> 4567890123412345678901234567890123
dqrot090 rotate 1234567890123456789012345678901234 +24 -> 5678901234123456789012345678901234
dqrot091 rotate 1234567890123456789012345678901234 +25 -> 6789012341234567890123456789012345
dqrot092 rotate 1234567890123456789012345678901234 +26 -> 7890123412345678901234567890123456
dqrot093 rotate 1234567890123456789012345678901234 +27 -> 8901234123456789012345678901234567
dqrot094 rotate 1234567890123456789012345678901234 +28 -> 9012341234567890123456789012345678
dqrot095 rotate 1234567890123456789012345678901234 +29 -> 123412345678901234567890123456789
dqrot096 rotate 1234567890123456789012345678901234 +30 -> 1234123456789012345678901234567890
dqrot097 rotate 1234567890123456789012345678901234 +31 -> 2341234567890123456789012345678901
dqrot098 rotate 1234567890123456789012345678901234 +32 -> 3412345678901234567890123456789012
dqrot099 rotate 1234567890123456789012345678901234 +33 -> 4123456789012345678901234567890123
dqrot100 rotate 1234567890123456789012345678901234 +34 -> 1234567890123456789012345678901234
-- zeros
dqrot270 rotate 0E-10 +29 -> 0E-10
dqrot271 rotate 0E-10 -29 -> 0E-10
dqrot272 rotate 0.000 +29 -> 0.000
dqrot273 rotate 0.000 -29 -> 0.000
dqrot274 rotate 0E+10 +29 -> 0E+10
dqrot275 rotate 0E+10 -29 -> 0E+10
dqrot276 rotate -0E-10 +29 -> -0E-10
dqrot277 rotate -0E-10 -29 -> -0E-10
dqrot278 rotate -0.000 +29 -> -0.000
dqrot279 rotate -0.000 -29 -> -0.000
dqrot280 rotate -0E+10 +29 -> -0E+10
dqrot281 rotate -0E+10 -29 -> -0E+10
-- Nmax, Nmin, Ntiny
dqrot141 rotate 9.999999999999999999999999999999999E+6144 -1 -> 9.999999999999999999999999999999999E+6144
dqrot142 rotate 9.999999999999999999999999999999999E+6144 -33 -> 9.999999999999999999999999999999999E+6144
dqrot143 rotate 9.999999999999999999999999999999999E+6144 1 -> 9.999999999999999999999999999999999E+6144
dqrot144 rotate 9.999999999999999999999999999999999E+6144 33 -> 9.999999999999999999999999999999999E+6144
dqrot145 rotate 1E-6143 -1 -> 1.000000000000000000000000000000000E-6110
dqrot146 rotate 1E-6143 -33 -> 1.0E-6142
dqrot147 rotate 1E-6143 1 -> 1.0E-6142
dqrot148 rotate 1E-6143 33 -> 1.000000000000000000000000000000000E-6110
dqrot151 rotate 1.000000000000000000000000000000000E-6143 -1 -> 1.00000000000000000000000000000000E-6144
dqrot152 rotate 1.000000000000000000000000000000000E-6143 -33 -> 1E-6176
dqrot153 rotate 1.000000000000000000000000000000000E-6143 1 -> 1E-6176
dqrot154 rotate 1.000000000000000000000000000000000E-6143 33 -> 1.00000000000000000000000000000000E-6144
dqrot155 rotate 9.000000000000000000000000000000000E-6143 -1 -> 9.00000000000000000000000000000000E-6144
dqrot156 rotate 9.000000000000000000000000000000000E-6143 -33 -> 9E-6176
dqrot157 rotate 9.000000000000000000000000000000000E-6143 1 -> 9E-6176
dqrot158 rotate 9.000000000000000000000000000000000E-6143 33 -> 9.00000000000000000000000000000000E-6144
dqrot160 rotate 1E-6176 -1 -> 1.000000000000000000000000000000000E-6143
dqrot161 rotate 1E-6176 -33 -> 1.0E-6175
dqrot162 rotate 1E-6176 1 -> 1.0E-6175
dqrot163 rotate 1E-6176 33 -> 1.000000000000000000000000000000000E-6143
-- negatives
dqrot171 rotate -9.999999999999999999999999999999999E+6144 -1 -> -9.999999999999999999999999999999999E+6144
dqrot172 rotate -9.999999999999999999999999999999999E+6144 -33 -> -9.999999999999999999999999999999999E+6144
dqrot173 rotate -9.999999999999999999999999999999999E+6144 1 -> -9.999999999999999999999999999999999E+6144
dqrot174 rotate -9.999999999999999999999999999999999E+6144 33 -> -9.999999999999999999999999999999999E+6144
dqrot175 rotate -1E-6143 -1 -> -1.000000000000000000000000000000000E-6110
dqrot176 rotate -1E-6143 -33 -> -1.0E-6142
dqrot177 rotate -1E-6143 1 -> -1.0E-6142
dqrot178 rotate -1E-6143 33 -> -1.000000000000000000000000000000000E-6110
dqrot181 rotate -1.000000000000000000000000000000000E-6143 -1 -> -1.00000000000000000000000000000000E-6144
dqrot182 rotate -1.000000000000000000000000000000000E-6143 -33 -> -1E-6176
dqrot183 rotate -1.000000000000000000000000000000000E-6143 1 -> -1E-6176
dqrot184 rotate -1.000000000000000000000000000000000E-6143 33 -> -1.00000000000000000000000000000000E-6144
dqrot185 rotate -9.000000000000000000000000000000000E-6143 -1 -> -9.00000000000000000000000000000000E-6144
dqrot186 rotate -9.000000000000000000000000000000000E-6143 -33 -> -9E-6176
dqrot187 rotate -9.000000000000000000000000000000000E-6143 1 -> -9E-6176
dqrot188 rotate -9.000000000000000000000000000000000E-6143 33 -> -9.00000000000000000000000000000000E-6144
dqrot190 rotate -1E-6176 -1 -> -1.000000000000000000000000000000000E-6143
dqrot191 rotate -1E-6176 -33 -> -1.0E-6175
dqrot192 rotate -1E-6176 1 -> -1.0E-6175
dqrot193 rotate -1E-6176 33 -> -1.000000000000000000000000000000000E-6143
-- more negatives (of sanities)
dqrot201 rotate -0 0 -> -0
dqrot202 rotate -0 2 -> -0
dqrot203 rotate -1 2 -> -100
dqrot204 rotate -1 33 -> -1000000000000000000000000000000000
dqrot205 rotate -1 34 -> -1
dqrot206 rotate -1 -1 -> -1000000000000000000000000000000000
dqrot207 rotate -0 -2 -> -0
dqrot208 rotate -1234567890123456789012345678901234 -1 -> -4123456789012345678901234567890123
dqrot209 rotate -1234567890123456789012345678901234 -33 -> -2345678901234567890123456789012341
dqrot210 rotate -1234567890123456789012345678901234 -34 -> -1234567890123456789012345678901234
dqrot211 rotate -9934567890123456789012345678901234 -33 -> -9345678901234567890123456789012349
dqrot212 rotate -9934567890123456789012345678901234 -34 -> -9934567890123456789012345678901234
-- Specials; NaNs are handled as usual
dqrot781 rotate -Inf -8 -> -Infinity
dqrot782 rotate -Inf -1 -> -Infinity
dqrot783 rotate -Inf -0 -> -Infinity
dqrot784 rotate -Inf 0 -> -Infinity
dqrot785 rotate -Inf 1 -> -Infinity
dqrot786 rotate -Inf 8 -> -Infinity
dqrot787 rotate -1000 -Inf -> NaN Invalid_operation
dqrot788 rotate -Inf -Inf -> NaN Invalid_operation
dqrot789 rotate -1 -Inf -> NaN Invalid_operation
dqrot790 rotate -0 -Inf -> NaN Invalid_operation
dqrot791 rotate 0 -Inf -> NaN Invalid_operation
dqrot792 rotate 1 -Inf -> NaN Invalid_operation
dqrot793 rotate 1000 -Inf -> NaN Invalid_operation
dqrot794 rotate Inf -Inf -> NaN Invalid_operation
dqrot800 rotate Inf -Inf -> NaN Invalid_operation
dqrot801 rotate Inf -8 -> Infinity
dqrot802 rotate Inf -1 -> Infinity
dqrot803 rotate Inf -0 -> Infinity
dqrot804 rotate Inf 0 -> Infinity
dqrot805 rotate Inf 1 -> Infinity
dqrot806 rotate Inf 8 -> Infinity
dqrot807 rotate Inf Inf -> NaN Invalid_operation
dqrot808 rotate -1000 Inf -> NaN Invalid_operation
dqrot809 rotate -Inf Inf -> NaN Invalid_operation
dqrot810 rotate -1 Inf -> NaN Invalid_operation
dqrot811 rotate -0 Inf -> NaN Invalid_operation
dqrot812 rotate 0 Inf -> NaN Invalid_operation
dqrot813 rotate 1 Inf -> NaN Invalid_operation
dqrot814 rotate 1000 Inf -> NaN Invalid_operation
dqrot815 rotate Inf Inf -> NaN Invalid_operation
dqrot821 rotate NaN -Inf -> NaN
dqrot822 rotate NaN -1000 -> NaN
dqrot823 rotate NaN -1 -> NaN
dqrot824 rotate NaN -0 -> NaN
dqrot825 rotate NaN 0 -> NaN
dqrot826 rotate NaN 1 -> NaN
dqrot827 rotate NaN 1000 -> NaN
dqrot828 rotate NaN Inf -> NaN
dqrot829 rotate NaN NaN -> NaN
dqrot830 rotate -Inf NaN -> NaN
dqrot831 rotate -1000 NaN -> NaN
dqrot832 rotate -1 NaN -> NaN
dqrot833 rotate -0 NaN -> NaN
dqrot834 rotate 0 NaN -> NaN
dqrot835 rotate 1 NaN -> NaN
dqrot836 rotate 1000 NaN -> NaN
dqrot837 rotate Inf NaN -> NaN
dqrot841 rotate sNaN -Inf -> NaN Invalid_operation
dqrot842 rotate sNaN -1000 -> NaN Invalid_operation
dqrot843 rotate sNaN -1 -> NaN Invalid_operation
dqrot844 rotate sNaN -0 -> NaN Invalid_operation
dqrot845 rotate sNaN 0 -> NaN Invalid_operation
dqrot846 rotate sNaN 1 -> NaN Invalid_operation
dqrot847 rotate sNaN 1000 -> NaN Invalid_operation
dqrot848 rotate sNaN NaN -> NaN Invalid_operation
dqrot849 rotate sNaN sNaN -> NaN Invalid_operation
dqrot850 rotate NaN sNaN -> NaN Invalid_operation
dqrot851 rotate -Inf sNaN -> NaN Invalid_operation
dqrot852 rotate -1000 sNaN -> NaN Invalid_operation
dqrot853 rotate -1 sNaN -> NaN Invalid_operation
dqrot854 rotate -0 sNaN -> NaN Invalid_operation
dqrot855 rotate 0 sNaN -> NaN Invalid_operation
dqrot856 rotate 1 sNaN -> NaN Invalid_operation
dqrot857 rotate 1000 sNaN -> NaN Invalid_operation
dqrot858 rotate Inf sNaN -> NaN Invalid_operation
dqrot859 rotate NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqrot861 rotate NaN1 -Inf -> NaN1
dqrot862 rotate +NaN2 -1000 -> NaN2
dqrot863 rotate NaN3 1000 -> NaN3
dqrot864 rotate NaN4 Inf -> NaN4
dqrot865 rotate NaN5 +NaN6 -> NaN5
dqrot866 rotate -Inf NaN7 -> NaN7
dqrot867 rotate -1000 NaN8 -> NaN8
dqrot868 rotate 1000 NaN9 -> NaN9
dqrot869 rotate Inf +NaN10 -> NaN10
dqrot871 rotate sNaN11 -Inf -> NaN11 Invalid_operation
dqrot872 rotate sNaN12 -1000 -> NaN12 Invalid_operation
dqrot873 rotate sNaN13 1000 -> NaN13 Invalid_operation
dqrot874 rotate sNaN14 NaN17 -> NaN14 Invalid_operation
dqrot875 rotate sNaN15 sNaN18 -> NaN15 Invalid_operation
dqrot876 rotate NaN16 sNaN19 -> NaN19 Invalid_operation
dqrot877 rotate -Inf +sNaN20 -> NaN20 Invalid_operation
dqrot878 rotate -1000 sNaN21 -> NaN21 Invalid_operation
dqrot879 rotate 1000 sNaN22 -> NaN22 Invalid_operation
dqrot880 rotate Inf sNaN23 -> NaN23 Invalid_operation
dqrot881 rotate +NaN25 +sNaN24 -> NaN24 Invalid_operation
dqrot882 rotate -NaN26 NaN28 -> -NaN26
dqrot883 rotate -sNaN27 sNaN29 -> -NaN27 Invalid_operation
dqrot884 rotate 1000 -NaN30 -> -NaN30
dqrot885 rotate 1000 -sNaN31 -> -NaN31 Invalid_operation

View File

@@ -0,0 +1,389 @@
------------------------------------------------------------------------
-- dqSameQuantum.decTest -- check decQuad quantums match --
-- Copyright (c) IBM Corporation, 2001, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- All operands and results are decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqsamq001 samequantum 0 0 -> 1
dqsamq002 samequantum 0 1 -> 1
dqsamq003 samequantum 1 0 -> 1
dqsamq004 samequantum 1 1 -> 1
dqsamq011 samequantum 10 1E+1 -> 0
dqsamq012 samequantum 10E+1 10E+1 -> 1
dqsamq013 samequantum 100 10E+1 -> 0
dqsamq014 samequantum 100 1E+2 -> 0
dqsamq015 samequantum 0.1 1E-2 -> 0
dqsamq016 samequantum 0.1 1E-1 -> 1
dqsamq017 samequantum 0.1 1E-0 -> 0
dqsamq018 samequantum 999 999 -> 1
dqsamq019 samequantum 999E-1 99.9 -> 1
dqsamq020 samequantum 111E-1 22.2 -> 1
dqsamq021 samequantum 111E-1 1234.2 -> 1
-- zeros
dqsamq030 samequantum 0.0 1.1 -> 1
dqsamq031 samequantum 0.0 1.11 -> 0
dqsamq032 samequantum 0.0 0 -> 0
dqsamq033 samequantum 0.0 0.0 -> 1
dqsamq034 samequantum 0.0 0.00 -> 0
dqsamq035 samequantum 0E+1 0E+0 -> 0
dqsamq036 samequantum 0E+1 0E+1 -> 1
dqsamq037 samequantum 0E+1 0E+2 -> 0
dqsamq038 samequantum 0E-17 0E-16 -> 0
dqsamq039 samequantum 0E-17 0E-17 -> 1
dqsamq040 samequantum 0E-17 0E-18 -> 0
dqsamq041 samequantum 0E-17 0.0E-15 -> 0
dqsamq042 samequantum 0E-17 0.0E-16 -> 1
dqsamq043 samequantum 0E-17 0.0E-17 -> 0
dqsamq044 samequantum -0E-17 0.0E-16 -> 1
dqsamq045 samequantum 0E-17 -0.0E-17 -> 0
dqsamq046 samequantum 0E-17 -0.0E-16 -> 1
dqsamq047 samequantum -0E-17 0.0E-17 -> 0
dqsamq048 samequantum -0E-17 -0.0E-16 -> 1
dqsamq049 samequantum -0E-17 -0.0E-17 -> 0
-- Nmax, Nmin, Ntiny
dqsamq051 samequantum 9.99999999999999999999999999999999E+6144 9.99999999999999999999999999999999E+6144 -> 1
dqsamq052 samequantum 1E-6143 1E-6143 -> 1
dqsamq053 samequantum 1.00000000000000000000000000000000E-6143 1.00000000000000000000000000000000E-6143 -> 1
dqsamq054 samequantum 1E-6176 1E-6176 -> 1
dqsamq055 samequantum 9.99999999999999999999999999999999E+6144 9.99999999999999999999999999999999E+6144 -> 1
dqsamq056 samequantum 1E-6143 1E-6143 -> 1
dqsamq057 samequantum 1.00000000000000000000000000000000E-6143 1.00000000000000000000000000000000E-6143 -> 1
dqsamq058 samequantum 1E-6176 1E-6176 -> 1
dqsamq061 samequantum -1E-6176 -1E-6176 -> 1
dqsamq062 samequantum -1.00000000000000000000000000000000E-6143 -1.00000000000000000000000000000000E-6143 -> 1
dqsamq063 samequantum -1E-6143 -1E-6143 -> 1
dqsamq064 samequantum -9.99999999999999999999999999999999E+6144 -9.99999999999999999999999999999999E+6144 -> 1
dqsamq065 samequantum -1E-6176 -1E-6176 -> 1
dqsamq066 samequantum -1.00000000000000000000000000000000E-6143 -1.00000000000000000000000000000000E-6143 -> 1
dqsamq067 samequantum -1E-6143 -1E-6143 -> 1
dqsamq068 samequantum -9.99999999999999999999999999999999E+6144 -9.99999999999999999999999999999999E+6144 -> 1
dqsamq071 samequantum -4E-6176 -1E-6176 -> 1
dqsamq072 samequantum -4.00000000000000000000000000000000E-6143 -1.00000000000000000000000000004000E-6143 -> 1
dqsamq073 samequantum -4E-6143 -1E-6143 -> 1
dqsamq074 samequantum -4.99999999999999999999999999999999E+6144 -9.99949999999999999999999999999999E+6144 -> 1
dqsamq075 samequantum -4E-6176 -1E-6176 -> 1
dqsamq076 samequantum -4.00000000000000000000000000000000E-6143 -1.00400000000000000000000000000000E-6143 -> 1
dqsamq077 samequantum -4E-6143 -1E-6143 -> 1
dqsamq078 samequantum -4.99999999999999999999999999999999E+6144 -9.94999999999999999999999999999999E+6144 -> 1
dqsamq081 samequantum -4E-1006 -1E-6176 -> 0
dqsamq082 samequantum -4.00000000000000000000000000000000E-6143 -1.00004000000000000000000000000000E-6136 -> 0
dqsamq083 samequantum -4E-6140 -1E-6143 -> 0
dqsamq084 samequantum -4.99999999999999999999999999999999E+6144 -9.99949999999999999999999999999999E+6136 -> 0
dqsamq085 samequantum -4E-1006 -1E-6176 -> 0
dqsamq086 samequantum -4.00000000000000000000000000000000E-6143 -1.00400000000000000000000000000000E-6136 -> 0
dqsamq087 samequantum -4E-6133 -1E-6143 -> 0
dqsamq088 samequantum -4.99999999999999999999999999999999E+6144 -9.94999999999999999999999999999999E+6136 -> 0
-- specials & combinations
dqsamq0110 samequantum -Inf -Inf -> 1
dqsamq0111 samequantum -Inf Inf -> 1
dqsamq0112 samequantum -Inf NaN -> 0
dqsamq0113 samequantum -Inf -7E+3 -> 0
dqsamq0114 samequantum -Inf -7 -> 0
dqsamq0115 samequantum -Inf -7E-3 -> 0
dqsamq0116 samequantum -Inf -0E-3 -> 0
dqsamq0117 samequantum -Inf -0 -> 0
dqsamq0118 samequantum -Inf -0E+3 -> 0
dqsamq0119 samequantum -Inf 0E-3 -> 0
dqsamq0120 samequantum -Inf 0 -> 0
dqsamq0121 samequantum -Inf 0E+3 -> 0
dqsamq0122 samequantum -Inf 7E-3 -> 0
dqsamq0123 samequantum -Inf 7 -> 0
dqsamq0124 samequantum -Inf 7E+3 -> 0
dqsamq0125 samequantum -Inf sNaN -> 0
dqsamq0210 samequantum Inf -Inf -> 1
dqsamq0211 samequantum Inf Inf -> 1
dqsamq0212 samequantum Inf NaN -> 0
dqsamq0213 samequantum Inf -7E+3 -> 0
dqsamq0214 samequantum Inf -7 -> 0
dqsamq0215 samequantum Inf -7E-3 -> 0
dqsamq0216 samequantum Inf -0E-3 -> 0
dqsamq0217 samequantum Inf -0 -> 0
dqsamq0218 samequantum Inf -0E+3 -> 0
dqsamq0219 samequantum Inf 0E-3 -> 0
dqsamq0220 samequantum Inf 0 -> 0
dqsamq0221 samequantum Inf 0E+3 -> 0
dqsamq0222 samequantum Inf 7E-3 -> 0
dqsamq0223 samequantum Inf 7 -> 0
dqsamq0224 samequantum Inf 7E+3 -> 0
dqsamq0225 samequantum Inf sNaN -> 0
dqsamq0310 samequantum NaN -Inf -> 0
dqsamq0311 samequantum NaN Inf -> 0
dqsamq0312 samequantum NaN NaN -> 1
dqsamq0313 samequantum NaN -7E+3 -> 0
dqsamq0314 samequantum NaN -7 -> 0
dqsamq0315 samequantum NaN -7E-3 -> 0
dqsamq0316 samequantum NaN -0E-3 -> 0
dqsamq0317 samequantum NaN -0 -> 0
dqsamq0318 samequantum NaN -0E+3 -> 0
dqsamq0319 samequantum NaN 0E-3 -> 0
dqsamq0320 samequantum NaN 0 -> 0
dqsamq0321 samequantum NaN 0E+3 -> 0
dqsamq0322 samequantum NaN 7E-3 -> 0
dqsamq0323 samequantum NaN 7 -> 0
dqsamq0324 samequantum NaN 7E+3 -> 0
dqsamq0325 samequantum NaN sNaN -> 1
dqsamq0410 samequantum -7E+3 -Inf -> 0
dqsamq0411 samequantum -7E+3 Inf -> 0
dqsamq0412 samequantum -7E+3 NaN -> 0
dqsamq0413 samequantum -7E+3 -7E+3 -> 1
dqsamq0414 samequantum -7E+3 -7 -> 0
dqsamq0415 samequantum -7E+3 -7E-3 -> 0
dqsamq0416 samequantum -7E+3 -0E-3 -> 0
dqsamq0417 samequantum -7E+3 -0 -> 0
dqsamq0418 samequantum -7E+3 -0E+3 -> 1
dqsamq0419 samequantum -7E+3 0E-3 -> 0
dqsamq0420 samequantum -7E+3 0 -> 0
dqsamq0421 samequantum -7E+3 0E+3 -> 1
dqsamq0422 samequantum -7E+3 7E-3 -> 0
dqsamq0423 samequantum -7E+3 7 -> 0
dqsamq0424 samequantum -7E+3 7E+3 -> 1
dqsamq0425 samequantum -7E+3 sNaN -> 0
dqsamq0510 samequantum -7 -Inf -> 0
dqsamq0511 samequantum -7 Inf -> 0
dqsamq0512 samequantum -7 NaN -> 0
dqsamq0513 samequantum -7 -7E+3 -> 0
dqsamq0514 samequantum -7 -7 -> 1
dqsamq0515 samequantum -7 -7E-3 -> 0
dqsamq0516 samequantum -7 -0E-3 -> 0
dqsamq0517 samequantum -7 -0 -> 1
dqsamq0518 samequantum -7 -0E+3 -> 0
dqsamq0519 samequantum -7 0E-3 -> 0
dqsamq0520 samequantum -7 0 -> 1
dqsamq0521 samequantum -7 0E+3 -> 0
dqsamq0522 samequantum -7 7E-3 -> 0
dqsamq0523 samequantum -7 7 -> 1
dqsamq0524 samequantum -7 7E+3 -> 0
dqsamq0525 samequantum -7 sNaN -> 0
dqsamq0610 samequantum -7E-3 -Inf -> 0
dqsamq0611 samequantum -7E-3 Inf -> 0
dqsamq0612 samequantum -7E-3 NaN -> 0
dqsamq0613 samequantum -7E-3 -7E+3 -> 0
dqsamq0614 samequantum -7E-3 -7 -> 0
dqsamq0615 samequantum -7E-3 -7E-3 -> 1
dqsamq0616 samequantum -7E-3 -0E-3 -> 1
dqsamq0617 samequantum -7E-3 -0 -> 0
dqsamq0618 samequantum -7E-3 -0E+3 -> 0
dqsamq0619 samequantum -7E-3 0E-3 -> 1
dqsamq0620 samequantum -7E-3 0 -> 0
dqsamq0621 samequantum -7E-3 0E+3 -> 0
dqsamq0622 samequantum -7E-3 7E-3 -> 1
dqsamq0623 samequantum -7E-3 7 -> 0
dqsamq0624 samequantum -7E-3 7E+3 -> 0
dqsamq0625 samequantum -7E-3 sNaN -> 0
dqsamq0710 samequantum -0E-3 -Inf -> 0
dqsamq0711 samequantum -0E-3 Inf -> 0
dqsamq0712 samequantum -0E-3 NaN -> 0
dqsamq0713 samequantum -0E-3 -7E+3 -> 0
dqsamq0714 samequantum -0E-3 -7 -> 0
dqsamq0715 samequantum -0E-3 -7E-3 -> 1
dqsamq0716 samequantum -0E-3 -0E-3 -> 1
dqsamq0717 samequantum -0E-3 -0 -> 0
dqsamq0718 samequantum -0E-3 -0E+3 -> 0
dqsamq0719 samequantum -0E-3 0E-3 -> 1
dqsamq0720 samequantum -0E-3 0 -> 0
dqsamq0721 samequantum -0E-3 0E+3 -> 0
dqsamq0722 samequantum -0E-3 7E-3 -> 1
dqsamq0723 samequantum -0E-3 7 -> 0
dqsamq0724 samequantum -0E-3 7E+3 -> 0
dqsamq0725 samequantum -0E-3 sNaN -> 0
dqsamq0810 samequantum -0 -Inf -> 0
dqsamq0811 samequantum -0 Inf -> 0
dqsamq0812 samequantum -0 NaN -> 0
dqsamq0813 samequantum -0 -7E+3 -> 0
dqsamq0814 samequantum -0 -7 -> 1
dqsamq0815 samequantum -0 -7E-3 -> 0
dqsamq0816 samequantum -0 -0E-3 -> 0
dqsamq0817 samequantum -0 -0 -> 1
dqsamq0818 samequantum -0 -0E+3 -> 0
dqsamq0819 samequantum -0 0E-3 -> 0
dqsamq0820 samequantum -0 0 -> 1
dqsamq0821 samequantum -0 0E+3 -> 0
dqsamq0822 samequantum -0 7E-3 -> 0
dqsamq0823 samequantum -0 7 -> 1
dqsamq0824 samequantum -0 7E+3 -> 0
dqsamq0825 samequantum -0 sNaN -> 0
dqsamq0910 samequantum -0E+3 -Inf -> 0
dqsamq0911 samequantum -0E+3 Inf -> 0
dqsamq0912 samequantum -0E+3 NaN -> 0
dqsamq0913 samequantum -0E+3 -7E+3 -> 1
dqsamq0914 samequantum -0E+3 -7 -> 0
dqsamq0915 samequantum -0E+3 -7E-3 -> 0
dqsamq0916 samequantum -0E+3 -0E-3 -> 0
dqsamq0917 samequantum -0E+3 -0 -> 0
dqsamq0918 samequantum -0E+3 -0E+3 -> 1
dqsamq0919 samequantum -0E+3 0E-3 -> 0
dqsamq0920 samequantum -0E+3 0 -> 0
dqsamq0921 samequantum -0E+3 0E+3 -> 1
dqsamq0922 samequantum -0E+3 7E-3 -> 0
dqsamq0923 samequantum -0E+3 7 -> 0
dqsamq0924 samequantum -0E+3 7E+3 -> 1
dqsamq0925 samequantum -0E+3 sNaN -> 0
dqsamq1110 samequantum 0E-3 -Inf -> 0
dqsamq1111 samequantum 0E-3 Inf -> 0
dqsamq1112 samequantum 0E-3 NaN -> 0
dqsamq1113 samequantum 0E-3 -7E+3 -> 0
dqsamq1114 samequantum 0E-3 -7 -> 0
dqsamq1115 samequantum 0E-3 -7E-3 -> 1
dqsamq1116 samequantum 0E-3 -0E-3 -> 1
dqsamq1117 samequantum 0E-3 -0 -> 0
dqsamq1118 samequantum 0E-3 -0E+3 -> 0
dqsamq1119 samequantum 0E-3 0E-3 -> 1
dqsamq1120 samequantum 0E-3 0 -> 0
dqsamq1121 samequantum 0E-3 0E+3 -> 0
dqsamq1122 samequantum 0E-3 7E-3 -> 1
dqsamq1123 samequantum 0E-3 7 -> 0
dqsamq1124 samequantum 0E-3 7E+3 -> 0
dqsamq1125 samequantum 0E-3 sNaN -> 0
dqsamq1210 samequantum 0 -Inf -> 0
dqsamq1211 samequantum 0 Inf -> 0
dqsamq1212 samequantum 0 NaN -> 0
dqsamq1213 samequantum 0 -7E+3 -> 0
dqsamq1214 samequantum 0 -7 -> 1
dqsamq1215 samequantum 0 -7E-3 -> 0
dqsamq1216 samequantum 0 -0E-3 -> 0
dqsamq1217 samequantum 0 -0 -> 1
dqsamq1218 samequantum 0 -0E+3 -> 0
dqsamq1219 samequantum 0 0E-3 -> 0
dqsamq1220 samequantum 0 0 -> 1
dqsamq1221 samequantum 0 0E+3 -> 0
dqsamq1222 samequantum 0 7E-3 -> 0
dqsamq1223 samequantum 0 7 -> 1
dqsamq1224 samequantum 0 7E+3 -> 0
dqsamq1225 samequantum 0 sNaN -> 0
dqsamq1310 samequantum 0E+3 -Inf -> 0
dqsamq1311 samequantum 0E+3 Inf -> 0
dqsamq1312 samequantum 0E+3 NaN -> 0
dqsamq1313 samequantum 0E+3 -7E+3 -> 1
dqsamq1314 samequantum 0E+3 -7 -> 0
dqsamq1315 samequantum 0E+3 -7E-3 -> 0
dqsamq1316 samequantum 0E+3 -0E-3 -> 0
dqsamq1317 samequantum 0E+3 -0 -> 0
dqsamq1318 samequantum 0E+3 -0E+3 -> 1
dqsamq1319 samequantum 0E+3 0E-3 -> 0
dqsamq1320 samequantum 0E+3 0 -> 0
dqsamq1321 samequantum 0E+3 0E+3 -> 1
dqsamq1322 samequantum 0E+3 7E-3 -> 0
dqsamq1323 samequantum 0E+3 7 -> 0
dqsamq1324 samequantum 0E+3 7E+3 -> 1
dqsamq1325 samequantum 0E+3 sNaN -> 0
dqsamq1410 samequantum 7E-3 -Inf -> 0
dqsamq1411 samequantum 7E-3 Inf -> 0
dqsamq1412 samequantum 7E-3 NaN -> 0
dqsamq1413 samequantum 7E-3 -7E+3 -> 0
dqsamq1414 samequantum 7E-3 -7 -> 0
dqsamq1415 samequantum 7E-3 -7E-3 -> 1
dqsamq1416 samequantum 7E-3 -0E-3 -> 1
dqsamq1417 samequantum 7E-3 -0 -> 0
dqsamq1418 samequantum 7E-3 -0E+3 -> 0
dqsamq1419 samequantum 7E-3 0E-3 -> 1
dqsamq1420 samequantum 7E-3 0 -> 0
dqsamq1421 samequantum 7E-3 0E+3 -> 0
dqsamq1422 samequantum 7E-3 7E-3 -> 1
dqsamq1423 samequantum 7E-3 7 -> 0
dqsamq1424 samequantum 7E-3 7E+3 -> 0
dqsamq1425 samequantum 7E-3 sNaN -> 0
dqsamq1510 samequantum 7 -Inf -> 0
dqsamq1511 samequantum 7 Inf -> 0
dqsamq1512 samequantum 7 NaN -> 0
dqsamq1513 samequantum 7 -7E+3 -> 0
dqsamq1514 samequantum 7 -7 -> 1
dqsamq1515 samequantum 7 -7E-3 -> 0
dqsamq1516 samequantum 7 -0E-3 -> 0
dqsamq1517 samequantum 7 -0 -> 1
dqsamq1518 samequantum 7 -0E+3 -> 0
dqsamq1519 samequantum 7 0E-3 -> 0
dqsamq1520 samequantum 7 0 -> 1
dqsamq1521 samequantum 7 0E+3 -> 0
dqsamq1522 samequantum 7 7E-3 -> 0
dqsamq1523 samequantum 7 7 -> 1
dqsamq1524 samequantum 7 7E+3 -> 0
dqsamq1525 samequantum 7 sNaN -> 0
dqsamq1610 samequantum 7E+3 -Inf -> 0
dqsamq1611 samequantum 7E+3 Inf -> 0
dqsamq1612 samequantum 7E+3 NaN -> 0
dqsamq1613 samequantum 7E+3 -7E+3 -> 1
dqsamq1614 samequantum 7E+3 -7 -> 0
dqsamq1615 samequantum 7E+3 -7E-3 -> 0
dqsamq1616 samequantum 7E+3 -0E-3 -> 0
dqsamq1617 samequantum 7E+3 -0 -> 0
dqsamq1618 samequantum 7E+3 -0E+3 -> 1
dqsamq1619 samequantum 7E+3 0E-3 -> 0
dqsamq1620 samequantum 7E+3 0 -> 0
dqsamq1621 samequantum 7E+3 0E+3 -> 1
dqsamq1622 samequantum 7E+3 7E-3 -> 0
dqsamq1623 samequantum 7E+3 7 -> 0
dqsamq1624 samequantum 7E+3 7E+3 -> 1
dqsamq1625 samequantum 7E+3 sNaN -> 0
dqsamq1710 samequantum sNaN -Inf -> 0
dqsamq1711 samequantum sNaN Inf -> 0
dqsamq1712 samequantum sNaN NaN -> 1
dqsamq1713 samequantum sNaN -7E+3 -> 0
dqsamq1714 samequantum sNaN -7 -> 0
dqsamq1715 samequantum sNaN -7E-3 -> 0
dqsamq1716 samequantum sNaN -0E-3 -> 0
dqsamq1717 samequantum sNaN -0 -> 0
dqsamq1718 samequantum sNaN -0E+3 -> 0
dqsamq1719 samequantum sNaN 0E-3 -> 0
dqsamq1720 samequantum sNaN 0 -> 0
dqsamq1721 samequantum sNaN 0E+3 -> 0
dqsamq1722 samequantum sNaN 7E-3 -> 0
dqsamq1723 samequantum sNaN 7 -> 0
dqsamq1724 samequantum sNaN 7E+3 -> 0
dqsamq1725 samequantum sNaN sNaN -> 1
-- noisy NaNs
dqsamq1730 samequantum sNaN3 sNaN3 -> 1
dqsamq1731 samequantum sNaN3 sNaN4 -> 1
dqsamq1732 samequantum NaN3 NaN3 -> 1
dqsamq1733 samequantum NaN3 NaN4 -> 1
dqsamq1734 samequantum sNaN3 3 -> 0
dqsamq1735 samequantum NaN3 3 -> 0
dqsamq1736 samequantum 4 sNaN4 -> 0
dqsamq1737 samequantum 3 NaN3 -> 0
dqsamq1738 samequantum Inf sNaN4 -> 0
dqsamq1739 samequantum -Inf NaN3 -> 0

View File

@@ -0,0 +1,635 @@
------------------------------------------------------------------------
-- dqSubtract.decTest -- decQuad subtraction --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- This set of tests are for decQuads only; all arguments are
-- representable in a decQuad
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- [first group are 'quick confidence check']
dqsub001 subtract 0 0 -> '0'
dqsub002 subtract 1 1 -> '0'
dqsub003 subtract 1 2 -> '-1'
dqsub004 subtract 2 1 -> '1'
dqsub005 subtract 2 2 -> '0'
dqsub006 subtract 3 2 -> '1'
dqsub007 subtract 2 3 -> '-1'
dqsub011 subtract -0 0 -> '-0'
dqsub012 subtract -1 1 -> '-2'
dqsub013 subtract -1 2 -> '-3'
dqsub014 subtract -2 1 -> '-3'
dqsub015 subtract -2 2 -> '-4'
dqsub016 subtract -3 2 -> '-5'
dqsub017 subtract -2 3 -> '-5'
dqsub021 subtract 0 -0 -> '0'
dqsub022 subtract 1 -1 -> '2'
dqsub023 subtract 1 -2 -> '3'
dqsub024 subtract 2 -1 -> '3'
dqsub025 subtract 2 -2 -> '4'
dqsub026 subtract 3 -2 -> '5'
dqsub027 subtract 2 -3 -> '5'
dqsub030 subtract 11 1 -> 10
dqsub031 subtract 10 1 -> 9
dqsub032 subtract 9 1 -> 8
dqsub033 subtract 1 1 -> 0
dqsub034 subtract 0 1 -> -1
dqsub035 subtract -1 1 -> -2
dqsub036 subtract -9 1 -> -10
dqsub037 subtract -10 1 -> -11
dqsub038 subtract -11 1 -> -12
dqsub040 subtract '5.75' '3.3' -> '2.45'
dqsub041 subtract '5' '-3' -> '8'
dqsub042 subtract '-5' '-3' -> '-2'
dqsub043 subtract '-7' '2.5' -> '-9.5'
dqsub044 subtract '0.7' '0.3' -> '0.4'
dqsub045 subtract '1.3' '0.3' -> '1.0'
dqsub046 subtract '1.25' '1.25' -> '0.00'
dqsub050 subtract '1.23456789' '1.00000000' -> '0.23456789'
dqsub051 subtract '1.23456789' '1.00000089' -> '0.23456700'
dqsub060 subtract '70' '10000e+34' -> '-1.000000000000000000000000000000000E+38' Inexact Rounded
dqsub061 subtract '700' '10000e+34' -> '-1.000000000000000000000000000000000E+38' Inexact Rounded
dqsub062 subtract '7000' '10000e+34' -> '-9.999999999999999999999999999999999E+37' Inexact Rounded
dqsub063 subtract '70000' '10000e+34' -> '-9.999999999999999999999999999999993E+37' Rounded
dqsub064 subtract '700000' '10000e+34' -> '-9.999999999999999999999999999999930E+37' Rounded
-- symmetry:
dqsub065 subtract '10000e+34' '70' -> '1.000000000000000000000000000000000E+38' Inexact Rounded
dqsub066 subtract '10000e+34' '700' -> '1.000000000000000000000000000000000E+38' Inexact Rounded
dqsub067 subtract '10000e+34' '7000' -> '9.999999999999999999999999999999999E+37' Inexact Rounded
dqsub068 subtract '10000e+34' '70000' -> '9.999999999999999999999999999999993E+37' Rounded
dqsub069 subtract '10000e+34' '700000' -> '9.999999999999999999999999999999930E+37' Rounded
-- some of the next group are really constructor tests
dqsub090 subtract '00.0' '0.0' -> '0.0'
dqsub091 subtract '00.0' '0.00' -> '0.00'
dqsub092 subtract '0.00' '00.0' -> '0.00'
dqsub093 subtract '00.0' '0.00' -> '0.00'
dqsub094 subtract '0.00' '00.0' -> '0.00'
dqsub095 subtract '3' '.3' -> '2.7'
dqsub096 subtract '3.' '.3' -> '2.7'
dqsub097 subtract '3.0' '.3' -> '2.7'
dqsub098 subtract '3.00' '.3' -> '2.70'
dqsub099 subtract '3' '3' -> '0'
dqsub100 subtract '3' '+3' -> '0'
dqsub101 subtract '3' '-3' -> '6'
dqsub102 subtract '3' '0.3' -> '2.7'
dqsub103 subtract '3.' '0.3' -> '2.7'
dqsub104 subtract '3.0' '0.3' -> '2.7'
dqsub105 subtract '3.00' '0.3' -> '2.70'
dqsub106 subtract '3' '3.0' -> '0.0'
dqsub107 subtract '3' '+3.0' -> '0.0'
dqsub108 subtract '3' '-3.0' -> '6.0'
-- the above all from add; massaged and extended. Now some new ones...
-- [particularly important for comparisons]
-- NB: -xE-8 below were non-exponents pre-ANSI X3-274, and -1E-7 or 0E-7
-- with input rounding.
dqsub120 subtract '10.23456784' '10.23456789' -> '-5E-8'
dqsub121 subtract '10.23456785' '10.23456789' -> '-4E-8'
dqsub122 subtract '10.23456786' '10.23456789' -> '-3E-8'
dqsub123 subtract '10.23456787' '10.23456789' -> '-2E-8'
dqsub124 subtract '10.23456788' '10.23456789' -> '-1E-8'
dqsub125 subtract '10.23456789' '10.23456789' -> '0E-8'
dqsub126 subtract '10.23456790' '10.23456789' -> '1E-8'
dqsub127 subtract '10.23456791' '10.23456789' -> '2E-8'
dqsub128 subtract '10.23456792' '10.23456789' -> '3E-8'
dqsub129 subtract '10.23456793' '10.23456789' -> '4E-8'
dqsub130 subtract '10.23456794' '10.23456789' -> '5E-8'
dqsub131 subtract '10.23456781' '10.23456786' -> '-5E-8'
dqsub132 subtract '10.23456782' '10.23456786' -> '-4E-8'
dqsub133 subtract '10.23456783' '10.23456786' -> '-3E-8'
dqsub134 subtract '10.23456784' '10.23456786' -> '-2E-8'
dqsub135 subtract '10.23456785' '10.23456786' -> '-1E-8'
dqsub136 subtract '10.23456786' '10.23456786' -> '0E-8'
dqsub137 subtract '10.23456787' '10.23456786' -> '1E-8'
dqsub138 subtract '10.23456788' '10.23456786' -> '2E-8'
dqsub139 subtract '10.23456789' '10.23456786' -> '3E-8'
dqsub140 subtract '10.23456790' '10.23456786' -> '4E-8'
dqsub141 subtract '10.23456791' '10.23456786' -> '5E-8'
dqsub142 subtract '1' '0.999999999' -> '1E-9'
dqsub143 subtract '0.999999999' '1' -> '-1E-9'
dqsub144 subtract '-10.23456780' '-10.23456786' -> '6E-8'
dqsub145 subtract '-10.23456790' '-10.23456786' -> '-4E-8'
dqsub146 subtract '-10.23456791' '-10.23456786' -> '-5E-8'
-- additional scaled arithmetic tests [0.97 problem]
dqsub160 subtract '0' '.1' -> '-0.1'
dqsub161 subtract '00' '.97983' -> '-0.97983'
dqsub162 subtract '0' '.9' -> '-0.9'
dqsub163 subtract '0' '0.102' -> '-0.102'
dqsub164 subtract '0' '.4' -> '-0.4'
dqsub165 subtract '0' '.307' -> '-0.307'
dqsub166 subtract '0' '.43822' -> '-0.43822'
dqsub167 subtract '0' '.911' -> '-0.911'
dqsub168 subtract '.0' '.02' -> '-0.02'
dqsub169 subtract '00' '.392' -> '-0.392'
dqsub170 subtract '0' '.26' -> '-0.26'
dqsub171 subtract '0' '0.51' -> '-0.51'
dqsub172 subtract '0' '.2234' -> '-0.2234'
dqsub173 subtract '0' '.2' -> '-0.2'
dqsub174 subtract '.0' '.0008' -> '-0.0008'
-- 0. on left
dqsub180 subtract '0.0' '-.1' -> '0.1'
dqsub181 subtract '0.00' '-.97983' -> '0.97983'
dqsub182 subtract '0.0' '-.9' -> '0.9'
dqsub183 subtract '0.0' '-0.102' -> '0.102'
dqsub184 subtract '0.0' '-.4' -> '0.4'
dqsub185 subtract '0.0' '-.307' -> '0.307'
dqsub186 subtract '0.0' '-.43822' -> '0.43822'
dqsub187 subtract '0.0' '-.911' -> '0.911'
dqsub188 subtract '0.0' '-.02' -> '0.02'
dqsub189 subtract '0.00' '-.392' -> '0.392'
dqsub190 subtract '0.0' '-.26' -> '0.26'
dqsub191 subtract '0.0' '-0.51' -> '0.51'
dqsub192 subtract '0.0' '-.2234' -> '0.2234'
dqsub193 subtract '0.0' '-.2' -> '0.2'
dqsub194 subtract '0.0' '-.0008' -> '0.0008'
-- negatives of same
dqsub200 subtract '0' '-.1' -> '0.1'
dqsub201 subtract '00' '-.97983' -> '0.97983'
dqsub202 subtract '0' '-.9' -> '0.9'
dqsub203 subtract '0' '-0.102' -> '0.102'
dqsub204 subtract '0' '-.4' -> '0.4'
dqsub205 subtract '0' '-.307' -> '0.307'
dqsub206 subtract '0' '-.43822' -> '0.43822'
dqsub207 subtract '0' '-.911' -> '0.911'
dqsub208 subtract '.0' '-.02' -> '0.02'
dqsub209 subtract '00' '-.392' -> '0.392'
dqsub210 subtract '0' '-.26' -> '0.26'
dqsub211 subtract '0' '-0.51' -> '0.51'
dqsub212 subtract '0' '-.2234' -> '0.2234'
dqsub213 subtract '0' '-.2' -> '0.2'
dqsub214 subtract '.0' '-.0008' -> '0.0008'
-- more fixed, LHS swaps [really the same as testcases under add]
dqsub220 subtract '-56267E-12' 0 -> '-5.6267E-8'
dqsub221 subtract '-56267E-11' 0 -> '-5.6267E-7'
dqsub222 subtract '-56267E-10' 0 -> '-0.0000056267'
dqsub223 subtract '-56267E-9' 0 -> '-0.000056267'
dqsub224 subtract '-56267E-8' 0 -> '-0.00056267'
dqsub225 subtract '-56267E-7' 0 -> '-0.0056267'
dqsub226 subtract '-56267E-6' 0 -> '-0.056267'
dqsub227 subtract '-56267E-5' 0 -> '-0.56267'
dqsub228 subtract '-56267E-2' 0 -> '-562.67'
dqsub229 subtract '-56267E-1' 0 -> '-5626.7'
dqsub230 subtract '-56267E-0' 0 -> '-56267'
-- symmetry ...
dqsub240 subtract 0 '-56267E-12' -> '5.6267E-8'
dqsub241 subtract 0 '-56267E-11' -> '5.6267E-7'
dqsub242 subtract 0 '-56267E-10' -> '0.0000056267'
dqsub243 subtract 0 '-56267E-9' -> '0.000056267'
dqsub244 subtract 0 '-56267E-8' -> '0.00056267'
dqsub245 subtract 0 '-56267E-7' -> '0.0056267'
dqsub246 subtract 0 '-56267E-6' -> '0.056267'
dqsub247 subtract 0 '-56267E-5' -> '0.56267'
dqsub248 subtract 0 '-56267E-2' -> '562.67'
dqsub249 subtract 0 '-56267E-1' -> '5626.7'
dqsub250 subtract 0 '-56267E-0' -> '56267'
-- now some more from the 'new' add
dqsub301 subtract '1.23456789' '1.00000000' -> '0.23456789'
dqsub302 subtract '1.23456789' '1.00000011' -> '0.23456778'
-- some carrying effects
dqsub321 subtract '0.9998' '0.0000' -> '0.9998'
dqsub322 subtract '0.9998' '0.0001' -> '0.9997'
dqsub323 subtract '0.9998' '0.0002' -> '0.9996'
dqsub324 subtract '0.9998' '0.0003' -> '0.9995'
dqsub325 subtract '0.9998' '-0.0000' -> '0.9998'
dqsub326 subtract '0.9998' '-0.0001' -> '0.9999'
dqsub327 subtract '0.9998' '-0.0002' -> '1.0000'
dqsub328 subtract '0.9998' '-0.0003' -> '1.0001'
-- internal boundaries
dqsub346 subtract '10000e+9' '7' -> '9999999999993'
dqsub347 subtract '10000e+9' '70' -> '9999999999930'
dqsub348 subtract '10000e+9' '700' -> '9999999999300'
dqsub349 subtract '10000e+9' '7000' -> '9999999993000'
dqsub350 subtract '10000e+9' '70000' -> '9999999930000'
dqsub351 subtract '10000e+9' '700000' -> '9999999300000'
dqsub352 subtract '7' '10000e+9' -> '-9999999999993'
dqsub353 subtract '70' '10000e+9' -> '-9999999999930'
dqsub354 subtract '700' '10000e+9' -> '-9999999999300'
dqsub355 subtract '7000' '10000e+9' -> '-9999999993000'
dqsub356 subtract '70000' '10000e+9' -> '-9999999930000'
dqsub357 subtract '700000' '10000e+9' -> '-9999999300000'
-- zero preservation
dqsub361 subtract 1 '0.0001' -> '0.9999'
dqsub362 subtract 1 '0.00001' -> '0.99999'
dqsub363 subtract 1 '0.000001' -> '0.999999'
dqsub364 subtract 1 '0.0000000000000000000000000000000001' -> '0.9999999999999999999999999999999999'
dqsub365 subtract 1 '0.00000000000000000000000000000000001' -> '1.000000000000000000000000000000000' Inexact Rounded
dqsub366 subtract 1 '0.000000000000000000000000000000000001' -> '1.000000000000000000000000000000000' Inexact Rounded
-- some funny zeros [in case of bad signum]
dqsub370 subtract 1 0 -> 1
dqsub371 subtract 1 0. -> 1
dqsub372 subtract 1 .0 -> 1.0
dqsub373 subtract 1 0.0 -> 1.0
dqsub374 subtract 0 1 -> -1
dqsub375 subtract 0. 1 -> -1
dqsub376 subtract .0 1 -> -1.0
dqsub377 subtract 0.0 1 -> -1.0
-- leading 0 digit before round
dqsub910 subtract -103519362 -51897955.3 -> -51621406.7
dqsub911 subtract 159579.444 89827.5229 -> 69751.9211
dqsub920 subtract 333.0000000000000000000000000123456 33.00000000000000000000000001234566 -> 299.9999999999999999999999999999999 Inexact Rounded
dqsub921 subtract 333.0000000000000000000000000123456 33.00000000000000000000000001234565 -> 300.0000000000000000000000000000000 Inexact Rounded
dqsub922 subtract 133.0000000000000000000000000123456 33.00000000000000000000000001234565 -> 99.99999999999999999999999999999995
dqsub923 subtract 133.0000000000000000000000000123456 33.00000000000000000000000001234564 -> 99.99999999999999999999999999999996
dqsub924 subtract 133.0000000000000000000000000123456 33.00000000000000000000000001234540 -> 100.0000000000000000000000000000002 Rounded
dqsub925 subtract 133.0000000000000000000000000123456 43.00000000000000000000000001234560 -> 90.00000000000000000000000000000000
dqsub926 subtract 133.0000000000000000000000000123456 43.00000000000000000000000001234561 -> 89.99999999999999999999999999999999
dqsub927 subtract 133.0000000000000000000000000123456 43.00000000000000000000000001234566 -> 89.99999999999999999999999999999994
dqsub928 subtract 101.0000000000000000000000000123456 91.00000000000000000000000001234566 -> 9.99999999999999999999999999999994
dqsub929 subtract 101.0000000000000000000000000123456 99.00000000000000000000000001234566 -> 1.99999999999999999999999999999994
-- more LHS swaps [were fixed]
dqsub390 subtract '-56267E-10' 0 -> '-0.0000056267'
dqsub391 subtract '-56267E-6' 0 -> '-0.056267'
dqsub392 subtract '-56267E-5' 0 -> '-0.56267'
dqsub393 subtract '-56267E-4' 0 -> '-5.6267'
dqsub394 subtract '-56267E-3' 0 -> '-56.267'
dqsub395 subtract '-56267E-2' 0 -> '-562.67'
dqsub396 subtract '-56267E-1' 0 -> '-5626.7'
dqsub397 subtract '-56267E-0' 0 -> '-56267'
dqsub398 subtract '-5E-10' 0 -> '-5E-10'
dqsub399 subtract '-5E-7' 0 -> '-5E-7'
dqsub400 subtract '-5E-6' 0 -> '-0.000005'
dqsub401 subtract '-5E-5' 0 -> '-0.00005'
dqsub402 subtract '-5E-4' 0 -> '-0.0005'
dqsub403 subtract '-5E-1' 0 -> '-0.5'
dqsub404 subtract '-5E0' 0 -> '-5'
dqsub405 subtract '-5E1' 0 -> '-50'
dqsub406 subtract '-5E5' 0 -> '-500000'
dqsub407 subtract '-5E33' 0 -> '-5000000000000000000000000000000000'
dqsub408 subtract '-5E34' 0 -> '-5.000000000000000000000000000000000E+34' Rounded
dqsub409 subtract '-5E35' 0 -> '-5.000000000000000000000000000000000E+35' Rounded
dqsub410 subtract '-5E36' 0 -> '-5.000000000000000000000000000000000E+36' Rounded
dqsub411 subtract '-5E100' 0 -> '-5.000000000000000000000000000000000E+100' Rounded
-- more RHS swaps [were fixed]
dqsub420 subtract 0 '-56267E-10' -> '0.0000056267'
dqsub421 subtract 0 '-56267E-6' -> '0.056267'
dqsub422 subtract 0 '-56267E-5' -> '0.56267'
dqsub423 subtract 0 '-56267E-4' -> '5.6267'
dqsub424 subtract 0 '-56267E-3' -> '56.267'
dqsub425 subtract 0 '-56267E-2' -> '562.67'
dqsub426 subtract 0 '-56267E-1' -> '5626.7'
dqsub427 subtract 0 '-56267E-0' -> '56267'
dqsub428 subtract 0 '-5E-10' -> '5E-10'
dqsub429 subtract 0 '-5E-7' -> '5E-7'
dqsub430 subtract 0 '-5E-6' -> '0.000005'
dqsub431 subtract 0 '-5E-5' -> '0.00005'
dqsub432 subtract 0 '-5E-4' -> '0.0005'
dqsub433 subtract 0 '-5E-1' -> '0.5'
dqsub434 subtract 0 '-5E0' -> '5'
dqsub435 subtract 0 '-5E1' -> '50'
dqsub436 subtract 0 '-5E5' -> '500000'
dqsub437 subtract 0 '-5E33' -> '5000000000000000000000000000000000'
dqsub438 subtract 0 '-5E34' -> '5.000000000000000000000000000000000E+34' Rounded
dqsub439 subtract 0 '-5E35' -> '5.000000000000000000000000000000000E+35' Rounded
dqsub440 subtract 0 '-5E36' -> '5.000000000000000000000000000000000E+36' Rounded
dqsub441 subtract 0 '-5E100' -> '5.000000000000000000000000000000000E+100' Rounded
-- try borderline precision, with carries, etc.
dqsub461 subtract '1E+16' '1' -> '9999999999999999'
dqsub462 subtract '1E+12' '-1.111' -> '1000000000001.111'
dqsub463 subtract '1.111' '-1E+12' -> '1000000000001.111'
dqsub464 subtract '-1' '-1E+16' -> '9999999999999999'
dqsub465 subtract '7E+15' '1' -> '6999999999999999'
dqsub466 subtract '7E+12' '-1.111' -> '7000000000001.111'
dqsub467 subtract '1.111' '-7E+12' -> '7000000000001.111'
dqsub468 subtract '-1' '-7E+15' -> '6999999999999999'
-- 1234567890123456 1234567890123456 1 23456789012345
dqsub470 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555563' -> '1.000000000000000000000000000000001' Inexact Rounded
dqsub471 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555562' -> '1.000000000000000000000000000000001' Inexact Rounded
dqsub472 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555561' -> '1.000000000000000000000000000000000' Inexact Rounded
dqsub473 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555560' -> '1.000000000000000000000000000000000' Inexact Rounded
dqsub474 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555559' -> '1.000000000000000000000000000000000' Inexact Rounded
dqsub475 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555558' -> '1.000000000000000000000000000000000' Inexact Rounded
dqsub476 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555557' -> '1.000000000000000000000000000000000' Inexact Rounded
dqsub477 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555556' -> '1.000000000000000000000000000000000' Rounded
dqsub478 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555555' -> '0.9999999999999999999999999999999999'
dqsub479 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555554' -> '0.9999999999999999999999999999999998'
dqsub480 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555553' -> '0.9999999999999999999999999999999997'
dqsub481 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555552' -> '0.9999999999999999999999999999999996'
dqsub482 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555551' -> '0.9999999999999999999999999999999995'
dqsub483 subtract '0.4444444444444444444444444444444444' '-0.5555555555555555555555555555555550' -> '0.9999999999999999999999999999999994'
-- and some more, including residue effects and different roundings
rounding: half_up
dqsub500 subtract '1231234555555555555555555567456789' 0 -> '1231234555555555555555555567456789'
dqsub501 subtract '1231234555555555555555555567456789' 0.000000001 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub502 subtract '1231234555555555555555555567456789' 0.000001 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub503 subtract '1231234555555555555555555567456789' 0.1 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub504 subtract '1231234555555555555555555567456789' 0.4 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub505 subtract '1231234555555555555555555567456789' 0.49 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub506 subtract '1231234555555555555555555567456789' 0.499999 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub507 subtract '1231234555555555555555555567456789' 0.499999999 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub508 subtract '1231234555555555555555555567456789' 0.5 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub509 subtract '1231234555555555555555555567456789' 0.500000001 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub510 subtract '1231234555555555555555555567456789' 0.500001 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub511 subtract '1231234555555555555555555567456789' 0.51 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub512 subtract '1231234555555555555555555567456789' 0.6 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub513 subtract '1231234555555555555555555567456789' 0.9 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub514 subtract '1231234555555555555555555567456789' 0.99999 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub515 subtract '1231234555555555555555555567456789' 0.999999999 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub516 subtract '1231234555555555555555555567456789' 1 -> '1231234555555555555555555567456788'
dqsub517 subtract '1231234555555555555555555567456789' 1.000000001 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub518 subtract '1231234555555555555555555567456789' 1.00001 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub519 subtract '1231234555555555555555555567456789' 1.1 -> '1231234555555555555555555567456788' Inexact Rounded
rounding: half_even
dqsub520 subtract '1231234555555555555555555567456789' 0 -> '1231234555555555555555555567456789'
dqsub521 subtract '1231234555555555555555555567456789' 0.000000001 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub522 subtract '1231234555555555555555555567456789' 0.000001 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub523 subtract '1231234555555555555555555567456789' 0.1 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub524 subtract '1231234555555555555555555567456789' 0.4 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub525 subtract '1231234555555555555555555567456789' 0.49 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub526 subtract '1231234555555555555555555567456789' 0.499999 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub527 subtract '1231234555555555555555555567456789' 0.499999999 -> '1231234555555555555555555567456789' Inexact Rounded
dqsub528 subtract '1231234555555555555555555567456789' 0.5 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub529 subtract '1231234555555555555555555567456789' 0.500000001 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub530 subtract '1231234555555555555555555567456789' 0.500001 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub531 subtract '1231234555555555555555555567456789' 0.51 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub532 subtract '1231234555555555555555555567456789' 0.6 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub533 subtract '1231234555555555555555555567456789' 0.9 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub534 subtract '1231234555555555555555555567456789' 0.99999 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub535 subtract '1231234555555555555555555567456789' 0.999999999 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub536 subtract '1231234555555555555555555567456789' 1 -> '1231234555555555555555555567456788'
dqsub537 subtract '1231234555555555555555555567456789' 1.00000001 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub538 subtract '1231234555555555555555555567456789' 1.00001 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub539 subtract '1231234555555555555555555567456789' 1.1 -> '1231234555555555555555555567456788' Inexact Rounded
-- critical few with even bottom digit...
dqsub540 subtract '1231234555555555555555555567456788' 0.499999999 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub541 subtract '1231234555555555555555555567456788' 0.5 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub542 subtract '1231234555555555555555555567456788' 0.500000001 -> '1231234555555555555555555567456787' Inexact Rounded
rounding: down
dqsub550 subtract '1231234555555555555555555567456789' 0 -> '1231234555555555555555555567456789'
dqsub551 subtract '1231234555555555555555555567456789' 0.000000001 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub552 subtract '1231234555555555555555555567456789' 0.000001 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub553 subtract '1231234555555555555555555567456789' 0.1 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub554 subtract '1231234555555555555555555567456789' 0.4 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub555 subtract '1231234555555555555555555567456789' 0.49 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub556 subtract '1231234555555555555555555567456789' 0.499999 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub557 subtract '1231234555555555555555555567456789' 0.499999999 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub558 subtract '1231234555555555555555555567456789' 0.5 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub559 subtract '1231234555555555555555555567456789' 0.500000001 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub560 subtract '1231234555555555555555555567456789' 0.500001 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub561 subtract '1231234555555555555555555567456789' 0.51 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub562 subtract '1231234555555555555555555567456789' 0.6 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub563 subtract '1231234555555555555555555567456789' 0.9 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub564 subtract '1231234555555555555555555567456789' 0.99999 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub565 subtract '1231234555555555555555555567456789' 0.999999999 -> '1231234555555555555555555567456788' Inexact Rounded
dqsub566 subtract '1231234555555555555555555567456789' 1 -> '1231234555555555555555555567456788'
dqsub567 subtract '1231234555555555555555555567456789' 1.00000001 -> '1231234555555555555555555567456787' Inexact Rounded
dqsub568 subtract '1231234555555555555555555567456789' 1.00001 -> '1231234555555555555555555567456787' Inexact Rounded
dqsub569 subtract '1231234555555555555555555567456789' 1.1 -> '1231234555555555555555555567456787' Inexact Rounded
-- symmetry...
rounding: half_up
dqsub600 subtract 0 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789'
dqsub601 subtract 0.000000001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub602 subtract 0.000001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub603 subtract 0.1 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub604 subtract 0.4 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub605 subtract 0.49 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub606 subtract 0.499999 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub607 subtract 0.499999999 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub608 subtract 0.5 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub609 subtract 0.500000001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub610 subtract 0.500001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub611 subtract 0.51 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub612 subtract 0.6 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub613 subtract 0.9 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub614 subtract 0.99999 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub615 subtract 0.999999999 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub616 subtract 1 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788'
dqsub617 subtract 1.000000001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub618 subtract 1.00001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub619 subtract 1.1 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
rounding: half_even
dqsub620 subtract 0 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789'
dqsub621 subtract 0.000000001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub622 subtract 0.000001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub623 subtract 0.1 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub624 subtract 0.4 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub625 subtract 0.49 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub626 subtract 0.499999 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub627 subtract 0.499999999 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
dqsub628 subtract 0.5 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub629 subtract 0.500000001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub630 subtract 0.500001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub631 subtract 0.51 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub632 subtract 0.6 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub633 subtract 0.9 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub634 subtract 0.99999 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub635 subtract 0.999999999 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub636 subtract 1 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788'
dqsub637 subtract 1.00000001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub638 subtract 1.00001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub639 subtract 1.1 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
-- critical few with even bottom digit...
dqsub640 subtract 0.499999999 '1231234555555555555555555567456788' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub641 subtract 0.5 '1231234555555555555555555567456788' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub642 subtract 0.500000001 '1231234555555555555555555567456788' -> '-1231234555555555555555555567456787' Inexact Rounded
rounding: down
dqsub650 subtract 0 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789'
dqsub651 subtract 0.000000001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub652 subtract 0.000001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub653 subtract 0.1 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub654 subtract 0.4 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub655 subtract 0.49 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub656 subtract 0.499999 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub657 subtract 0.499999999 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub658 subtract 0.5 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub659 subtract 0.500000001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub660 subtract 0.500001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub661 subtract 0.51 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub662 subtract 0.6 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub663 subtract 0.9 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub664 subtract 0.99999 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub665 subtract 0.999999999 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
dqsub666 subtract 1 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788'
dqsub667 subtract 1.00000001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456787' Inexact Rounded
dqsub668 subtract 1.00001 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456787' Inexact Rounded
dqsub669 subtract 1.1 '1231234555555555555555555567456789' -> '-1231234555555555555555555567456787' Inexact Rounded
-- lots of leading zeros in intermediate result, and showing effects of
-- input rounding would have affected the following
rounding: half_up
dqsub670 subtract '1234567456789' '1234567456788.1' -> 0.9
dqsub671 subtract '1234567456789' '1234567456788.9' -> 0.1
dqsub672 subtract '1234567456789' '1234567456789.1' -> -0.1
dqsub673 subtract '1234567456789' '1234567456789.5' -> -0.5
dqsub674 subtract '1234567456789' '1234567456789.9' -> -0.9
rounding: half_even
dqsub680 subtract '1234567456789' '1234567456788.1' -> 0.9
dqsub681 subtract '1234567456789' '1234567456788.9' -> 0.1
dqsub682 subtract '1234567456789' '1234567456789.1' -> -0.1
dqsub683 subtract '1234567456789' '1234567456789.5' -> -0.5
dqsub684 subtract '1234567456789' '1234567456789.9' -> -0.9
dqsub685 subtract '1234567456788' '1234567456787.1' -> 0.9
dqsub686 subtract '1234567456788' '1234567456787.9' -> 0.1
dqsub687 subtract '1234567456788' '1234567456788.1' -> -0.1
dqsub688 subtract '1234567456788' '1234567456788.5' -> -0.5
dqsub689 subtract '1234567456788' '1234567456788.9' -> -0.9
rounding: down
dqsub690 subtract '1234567456789' '1234567456788.1' -> 0.9
dqsub691 subtract '1234567456789' '1234567456788.9' -> 0.1
dqsub692 subtract '1234567456789' '1234567456789.1' -> -0.1
dqsub693 subtract '1234567456789' '1234567456789.5' -> -0.5
dqsub694 subtract '1234567456789' '1234567456789.9' -> -0.9
-- Specials
dqsub780 subtract -Inf Inf -> -Infinity
dqsub781 subtract -Inf 1000 -> -Infinity
dqsub782 subtract -Inf 1 -> -Infinity
dqsub783 subtract -Inf -0 -> -Infinity
dqsub784 subtract -Inf -1 -> -Infinity
dqsub785 subtract -Inf -1000 -> -Infinity
dqsub787 subtract -1000 Inf -> -Infinity
dqsub788 subtract -Inf Inf -> -Infinity
dqsub789 subtract -1 Inf -> -Infinity
dqsub790 subtract 0 Inf -> -Infinity
dqsub791 subtract 1 Inf -> -Infinity
dqsub792 subtract 1000 Inf -> -Infinity
dqsub800 subtract Inf Inf -> NaN Invalid_operation
dqsub801 subtract Inf 1000 -> Infinity
dqsub802 subtract Inf 1 -> Infinity
dqsub803 subtract Inf 0 -> Infinity
dqsub804 subtract Inf -0 -> Infinity
dqsub805 subtract Inf -1 -> Infinity
dqsub806 subtract Inf -1000 -> Infinity
dqsub807 subtract Inf -Inf -> Infinity
dqsub808 subtract -1000 -Inf -> Infinity
dqsub809 subtract -Inf -Inf -> NaN Invalid_operation
dqsub810 subtract -1 -Inf -> Infinity
dqsub811 subtract -0 -Inf -> Infinity
dqsub812 subtract 0 -Inf -> Infinity
dqsub813 subtract 1 -Inf -> Infinity
dqsub814 subtract 1000 -Inf -> Infinity
dqsub815 subtract Inf -Inf -> Infinity
dqsub821 subtract NaN Inf -> NaN
dqsub822 subtract -NaN 1000 -> -NaN
dqsub823 subtract NaN 1 -> NaN
dqsub824 subtract NaN 0 -> NaN
dqsub825 subtract NaN -0 -> NaN
dqsub826 subtract NaN -1 -> NaN
dqsub827 subtract NaN -1000 -> NaN
dqsub828 subtract NaN -Inf -> NaN
dqsub829 subtract -NaN NaN -> -NaN
dqsub830 subtract -Inf NaN -> NaN
dqsub831 subtract -1000 NaN -> NaN
dqsub832 subtract -1 NaN -> NaN
dqsub833 subtract -0 NaN -> NaN
dqsub834 subtract 0 NaN -> NaN
dqsub835 subtract 1 NaN -> NaN
dqsub836 subtract 1000 -NaN -> -NaN
dqsub837 subtract Inf NaN -> NaN
dqsub841 subtract sNaN Inf -> NaN Invalid_operation
dqsub842 subtract -sNaN 1000 -> -NaN Invalid_operation
dqsub843 subtract sNaN 1 -> NaN Invalid_operation
dqsub844 subtract sNaN 0 -> NaN Invalid_operation
dqsub845 subtract sNaN -0 -> NaN Invalid_operation
dqsub846 subtract sNaN -1 -> NaN Invalid_operation
dqsub847 subtract sNaN -1000 -> NaN Invalid_operation
dqsub848 subtract sNaN NaN -> NaN Invalid_operation
dqsub849 subtract sNaN sNaN -> NaN Invalid_operation
dqsub850 subtract NaN sNaN -> NaN Invalid_operation
dqsub851 subtract -Inf -sNaN -> -NaN Invalid_operation
dqsub852 subtract -1000 sNaN -> NaN Invalid_operation
dqsub853 subtract -1 sNaN -> NaN Invalid_operation
dqsub854 subtract -0 sNaN -> NaN Invalid_operation
dqsub855 subtract 0 sNaN -> NaN Invalid_operation
dqsub856 subtract 1 sNaN -> NaN Invalid_operation
dqsub857 subtract 1000 sNaN -> NaN Invalid_operation
dqsub858 subtract Inf sNaN -> NaN Invalid_operation
dqsub859 subtract NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqsub861 subtract NaN01 -Inf -> NaN1
dqsub862 subtract -NaN02 -1000 -> -NaN2
dqsub863 subtract NaN03 1000 -> NaN3
dqsub864 subtract NaN04 Inf -> NaN4
dqsub865 subtract NaN05 NaN61 -> NaN5
dqsub866 subtract -Inf -NaN71 -> -NaN71
dqsub867 subtract -1000 NaN81 -> NaN81
dqsub868 subtract 1000 NaN91 -> NaN91
dqsub869 subtract Inf NaN101 -> NaN101
dqsub871 subtract sNaN011 -Inf -> NaN11 Invalid_operation
dqsub872 subtract sNaN012 -1000 -> NaN12 Invalid_operation
dqsub873 subtract -sNaN013 1000 -> -NaN13 Invalid_operation
dqsub874 subtract sNaN014 NaN171 -> NaN14 Invalid_operation
dqsub875 subtract sNaN015 sNaN181 -> NaN15 Invalid_operation
dqsub876 subtract NaN016 sNaN191 -> NaN191 Invalid_operation
dqsub877 subtract -Inf sNaN201 -> NaN201 Invalid_operation
dqsub878 subtract -1000 sNaN211 -> NaN211 Invalid_operation
dqsub879 subtract 1000 -sNaN221 -> -NaN221 Invalid_operation
dqsub880 subtract Inf sNaN231 -> NaN231 Invalid_operation
dqsub881 subtract NaN025 sNaN241 -> NaN241 Invalid_operation
-- edge case spills
dqsub901 subtract 2.E-3 1.002 -> -1.000
dqsub902 subtract 2.0E-3 1.002 -> -1.0000
dqsub903 subtract 2.00E-3 1.0020 -> -1.00000
dqsub904 subtract 2.000E-3 1.00200 -> -1.000000
dqsub905 subtract 2.0000E-3 1.002000 -> -1.0000000
dqsub906 subtract 2.00000E-3 1.0020000 -> -1.00000000
dqsub907 subtract 2.000000E-3 1.00200000 -> -1.000000000
dqsub908 subtract 2.0000000E-3 1.002000000 -> -1.0000000000
-- subnormals and overflows covered under Add
-- Examples from SQL proposal (Krishna Kulkarni)
dqsub1125 subtract 130E-2 120E-2 -> 0.10
dqsub1126 subtract 130E-2 12E-1 -> 0.10
dqsub1127 subtract 130E-2 1E0 -> 0.30
dqsub1128 subtract 1E2 1E4 -> -9.9E+3
-- Null tests
dqsub9990 subtract 10 # -> NaN Invalid_operation
dqsub9991 subtract # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,410 @@
------------------------------------------------------------------------
-- dqXor.decTest -- digitwise logical XOR for decQuads --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check (truth table)
dqxor001 xor 0 0 -> 0
dqxor002 xor 0 1 -> 1
dqxor003 xor 1 0 -> 1
dqxor004 xor 1 1 -> 0
dqxor005 xor 1100 1010 -> 110
-- and at msd and msd-1
dqxor006 xor 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqxor007 xor 0000000000000000000000000000000000 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqxor008 xor 1000000000000000000000000000000000 0000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqxor009 xor 1000000000000000000000000000000000 1000000000000000000000000000000000 -> 0
dqxor010 xor 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqxor011 xor 0000000000000000000000000000000000 0100000000000000000000000000000000 -> 100000000000000000000000000000000
dqxor012 xor 0100000000000000000000000000000000 0000000000000000000000000000000000 -> 100000000000000000000000000000000
dqxor013 xor 0100000000000000000000000000000000 0100000000000000000000000000000000 -> 0
-- Various lengths
-- 1234567890123456789012345678901234
dqxor601 xor 0111111111111111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000000000000000
dqxor602 xor 1011111111111111111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000000000000000
dqxor603 xor 1101111111111111111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000000000000000
dqxor604 xor 1110111111111111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000000000000
dqxor605 xor 1111011111111111111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000000000000
dqxor606 xor 1111101111111111111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000000000000
dqxor607 xor 1111110111111111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000000000
dqxor608 xor 1111111011111111111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000000000
dqxor609 xor 1111111101111111111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000000000
dqxor610 xor 1111111110111111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000000
dqxor611 xor 1111111111011111111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000000
dqxor612 xor 1111111111101111111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000000
dqxor613 xor 1111111111110111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000
dqxor614 xor 1111111111111011111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000
dqxor615 xor 1111111111111101111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000
dqxor616 xor 1111111111111110111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000
dqxor617 xor 1111111111111111011111111111111111 1111111111111111111111111111111111 -> 100000000000000000
dqxor618 xor 1111111111111111101111111111111111 1111111111111111111111111111111111 -> 10000000000000000
dqxor619 xor 1111111111111111110111111111111111 1111111111111111111111111111111111 -> 1000000000000000
dqxor620 xor 1111111111111111111011111111111111 1111111111111111111111111111111111 -> 100000000000000
dqxor621 xor 1111111111111111111101111111111111 1111111111111111111111111111111111 -> 10000000000000
dqxor622 xor 1111111111111111111110111111111111 1111111111111111111111111111111111 -> 1000000000000
dqxor623 xor 1111111111111111111111011111111111 1111111111111111111111111111111111 -> 100000000000
dqxor624 xor 1111111111111111111111101111111111 1111111111111111111111111111111111 -> 10000000000
dqxor625 xor 1111111111111111111111110111111111 1111111111111111111111111111111111 -> 1000000000
dqxor626 xor 1111111111111111111111111011111111 1111111111111111111111111111111111 -> 100000000
dqxor627 xor 1111111111111111111111111101111111 1111111111111111111111111111111111 -> 10000000
dqxor628 xor 1111111111111111111111111110111111 1111111111111111111111111111111111 -> 1000000
dqxor629 xor 1111111111111111111111111111011111 1111111111111111111111111111111111 -> 100000
dqxor630 xor 1111111111111111111111111111101111 1111111111111111111111111111111111 -> 10000
dqxor631 xor 1111111111111111111111111111110111 1111111111111111111111111111111111 -> 1000
dqxor632 xor 1111111111111111111111111111111011 1111111111111111111111111111111111 -> 100
dqxor633 xor 1111111111111111111111111111111101 1111111111111111111111111111111111 -> 10
dqxor634 xor 1111111111111111111111111111111110 1111111111111111111111111111111111 -> 1
dqxor641 xor 1111111111111111111111111111111111 0111111111111111111111111111111111 -> 1000000000000000000000000000000000
dqxor642 xor 1111111111111111111111111111111111 1011111111111111111111111111111111 -> 100000000000000000000000000000000
dqxor643 xor 1111111111111111111111111111111111 1101111111111111111111111111111111 -> 10000000000000000000000000000000
dqxor644 xor 1111111111111111111111111111111111 1110111111111111111111111111111111 -> 1000000000000000000000000000000
dqxor645 xor 1111111111111111111111111111111111 1111011111111111111111111111111111 -> 100000000000000000000000000000
dqxor646 xor 1111111111111111111111111111111111 1111101111111111111111111111111111 -> 10000000000000000000000000000
dqxor647 xor 1111111111111111111111111111111111 1111110111111111111111111111111111 -> 1000000000000000000000000000
dqxor648 xor 1111111111111111111111111111111111 1111111011111111111111111111111111 -> 100000000000000000000000000
dqxor649 xor 1111111111111111111111111111111111 1111111101111111111111111111111111 -> 10000000000000000000000000
dqxor650 xor 1111111111111111111111111111111111 1111111110111111111111111111111111 -> 1000000000000000000000000
dqxor651 xor 1111111111111111111111111111111111 1111111111011111111111111111111111 -> 100000000000000000000000
dqxor652 xor 1111111111111111111111111111111111 1111111111101111111111111111111111 -> 10000000000000000000000
dqxor653 xor 1111111111111111111111111111111111 1111111111110111111111111111111111 -> 1000000000000000000000
dqxor654 xor 1111111111111111111111111111111111 1111111111111011111111111111111111 -> 100000000000000000000
dqxor655 xor 1111111111111111111111111111111111 1111111111111101111111111111111111 -> 10000000000000000000
dqxor656 xor 1111111111111111111111111111111111 1111111111111110111111111111111111 -> 1000000000000000000
dqxor657 xor 1111111111111111111111111111111111 1111111111111111011111111111111111 -> 100000000000000000
dqxor658 xor 1111111111111111111111111111111111 1111111111111111101111111111111111 -> 10000000000000000
dqxor659 xor 1111111111111111111111111111111111 1111111111111111110111111111111111 -> 1000000000000000
dqxor660 xor 1111111111111111111111111111111111 1111111111111111111011111111111111 -> 100000000000000
dqxor661 xor 1111111111111111111111111111111111 1111111111111111111101111111111111 -> 10000000000000
dqxor662 xor 1111111111111111111111111111111111 1111111111111111111110111111111111 -> 1000000000000
dqxor663 xor 1111111111111111111111111111111111 1111111111111111111111011111111111 -> 100000000000
dqxor664 xor 1111111111111111111111111111111111 1111111111111111111111101111111111 -> 10000000000
dqxor665 xor 1111111111111111111111111111111111 1111111111111111111111110111111111 -> 1000000000
dqxor666 xor 1111111111111111111111111111111111 1111111111111111111111111011111111 -> 100000000
dqxor667 xor 1111111111111111111111111111111111 1111111111111111111111111101111111 -> 10000000
dqxor668 xor 1111111111111111111111111111111111 1111111111111111111111111110111111 -> 1000000
dqxor669 xor 1111111111111111111111111111111111 1111111111111111111111111111011111 -> 100000
dqxor670 xor 1111111111111111111111111111111111 1111111111111111111111111111101111 -> 10000
dqxor671 xor 1111111111111111111111111111111111 1111111111111111111111111111110111 -> 1000
dqxor672 xor 1111111111111111111111111111111111 1111111111111111111111111111111011 -> 100
dqxor673 xor 1111111111111111111111111111111111 1111111111111111111111111111111101 -> 10
dqxor674 xor 1111111111111111111111111111111111 1111111111111111111111111111111110 -> 1
dqxor675 xor 0111111111111111111111111111111111 1111111111111111111111111111111110 -> 1000000000000000000000000000000001
dqxor676 xor 1111111111111111111111111111111111 1111111111111111111111111111111110 -> 1
dqxor021 xor 1111111110000000 1111111110000000 -> 0
dqxor022 xor 111111110000000 111111110000000 -> 0
dqxor023 xor 11111110000000 11111110000000 -> 0
dqxor024 xor 1111110000000 1111110000000 -> 0
dqxor025 xor 111110000000 111110000000 -> 0
dqxor026 xor 11110000000 11110000000 -> 0
dqxor027 xor 1110000000 1110000000 -> 0
dqxor028 xor 110000000 110000000 -> 0
dqxor029 xor 10000000 10000000 -> 0
dqxor030 xor 1000000 1000000 -> 0
dqxor031 xor 100000 100000 -> 0
dqxor032 xor 10000 10000 -> 0
dqxor033 xor 1000 1000 -> 0
dqxor034 xor 100 100 -> 0
dqxor035 xor 10 10 -> 0
dqxor036 xor 1 1 -> 0
dqxor040 xor 111111111 111111111111 -> 111000000000
dqxor041 xor 11111111 111111111111 -> 111100000000
dqxor042 xor 11111111 111111111 -> 100000000
dqxor043 xor 1111111 100000010 -> 101111101
dqxor044 xor 111111 100000100 -> 100111011
dqxor045 xor 11111 100001000 -> 100010111
dqxor046 xor 1111 100010000 -> 100011111
dqxor047 xor 111 100100000 -> 100100111
dqxor048 xor 11 101000000 -> 101000011
dqxor049 xor 1 110000000 -> 110000001
dqxor050 xor 1111111111 1 -> 1111111110
dqxor051 xor 111111111 1 -> 111111110
dqxor052 xor 11111111 1 -> 11111110
dqxor053 xor 1111111 1 -> 1111110
dqxor054 xor 111111 1 -> 111110
dqxor055 xor 11111 1 -> 11110
dqxor056 xor 1111 1 -> 1110
dqxor057 xor 111 1 -> 110
dqxor058 xor 11 1 -> 10
dqxor059 xor 1 1 -> 0
dqxor060 xor 1111111111 0 -> 1111111111
dqxor061 xor 111111111 0 -> 111111111
dqxor062 xor 11111111 0 -> 11111111
dqxor063 xor 1111111 0 -> 1111111
dqxor064 xor 111111 0 -> 111111
dqxor065 xor 11111 0 -> 11111
dqxor066 xor 1111 0 -> 1111
dqxor067 xor 111 0 -> 111
dqxor068 xor 11 0 -> 11
dqxor069 xor 1 0 -> 1
dqxor070 xor 1 1111111111 -> 1111111110
dqxor071 xor 1 111111111 -> 111111110
dqxor072 xor 1 11111111 -> 11111110
dqxor073 xor 1 1111111 -> 1111110
dqxor074 xor 1 111111 -> 111110
dqxor075 xor 1 11111 -> 11110
dqxor076 xor 1 1111 -> 1110
dqxor077 xor 1 111 -> 110
dqxor078 xor 1 11 -> 10
dqxor079 xor 1 1 -> 0
dqxor080 xor 0 1111111111 -> 1111111111
dqxor081 xor 0 111111111 -> 111111111
dqxor082 xor 0 11111111 -> 11111111
dqxor083 xor 0 1111111 -> 1111111
dqxor084 xor 0 111111 -> 111111
dqxor085 xor 0 11111 -> 11111
dqxor086 xor 0 1111 -> 1111
dqxor087 xor 0 111 -> 111
dqxor088 xor 0 11 -> 11
dqxor089 xor 0 1 -> 1
dqxor090 xor 011111111 111101111 -> 100010000
dqxor091 xor 101111111 111101111 -> 10010000
dqxor092 xor 110111111 111101111 -> 1010000
dqxor093 xor 111011111 111101111 -> 110000
dqxor094 xor 111101111 111101111 -> 0
dqxor095 xor 111110111 111101111 -> 11000
dqxor096 xor 111111011 111101111 -> 10100
dqxor097 xor 111111101 111101111 -> 10010
dqxor098 xor 111111110 111101111 -> 10001
dqxor100 xor 111101111 011111111 -> 100010000
dqxor101 xor 111101111 101111111 -> 10010000
dqxor102 xor 111101111 110111111 -> 1010000
dqxor103 xor 111101111 111011111 -> 110000
dqxor104 xor 111101111 111101111 -> 0
dqxor105 xor 111101111 111110111 -> 11000
dqxor106 xor 111101111 111111011 -> 10100
dqxor107 xor 111101111 111111101 -> 10010
dqxor108 xor 111101111 111111110 -> 10001
-- non-0/1 should not be accepted, nor should signs
dqxor220 xor 111111112 111111111 -> NaN Invalid_operation
dqxor221 xor 333333333 333333333 -> NaN Invalid_operation
dqxor222 xor 555555555 555555555 -> NaN Invalid_operation
dqxor223 xor 777777777 777777777 -> NaN Invalid_operation
dqxor224 xor 999999999 999999999 -> NaN Invalid_operation
dqxor225 xor 222222222 999999999 -> NaN Invalid_operation
dqxor226 xor 444444444 999999999 -> NaN Invalid_operation
dqxor227 xor 666666666 999999999 -> NaN Invalid_operation
dqxor228 xor 888888888 999999999 -> NaN Invalid_operation
dqxor229 xor 999999999 222222222 -> NaN Invalid_operation
dqxor230 xor 999999999 444444444 -> NaN Invalid_operation
dqxor231 xor 999999999 666666666 -> NaN Invalid_operation
dqxor232 xor 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
dqxor240 xor 567468689 -934981942 -> NaN Invalid_operation
dqxor241 xor 567367689 934981942 -> NaN Invalid_operation
dqxor242 xor -631917772 -706014634 -> NaN Invalid_operation
dqxor243 xor -756253257 138579234 -> NaN Invalid_operation
dqxor244 xor 835590149 567435400 -> NaN Invalid_operation
-- test MSD
dqxor250 xor 2000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqxor251 xor 7000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqxor252 xor 8000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqxor253 xor 9000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqxor254 xor 2000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqxor255 xor 7000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqxor256 xor 8000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqxor257 xor 9000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqxor258 xor 1000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqxor259 xor 1000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqxor260 xor 1000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqxor261 xor 1000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
dqxor262 xor 0000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqxor263 xor 0000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqxor264 xor 0000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqxor265 xor 0000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
-- test MSD-1
dqxor270 xor 0200000111000111000111001000000000 1000000111000111000111100000000010 -> NaN Invalid_operation
dqxor271 xor 0700000111000111000111000100000000 1000000111000111000111010000000100 -> NaN Invalid_operation
dqxor272 xor 0800000111000111000111000010000000 1000000111000111000111001000001000 -> NaN Invalid_operation
dqxor273 xor 0900000111000111000111000001000000 1000000111000111000111000100010000 -> NaN Invalid_operation
dqxor274 xor 1000000111000111000111000000100000 0200000111000111000111000010100000 -> NaN Invalid_operation
dqxor275 xor 1000000111000111000111000000010000 0700000111000111000111000001000000 -> NaN Invalid_operation
dqxor276 xor 1000000111000111000111000000001000 0800000111000111000111000010100000 -> NaN Invalid_operation
dqxor277 xor 1000000111000111000111000000000100 0900000111000111000111000000010000 -> NaN Invalid_operation
-- test LSD
dqxor280 xor 0010000111000111000111000000000002 1000000111000111000111000100000001 -> NaN Invalid_operation
dqxor281 xor 0001000111000111000111000000000007 1000000111000111000111001000000011 -> NaN Invalid_operation
dqxor282 xor 0000000111000111000111100000000008 1000000111000111000111010000000001 -> NaN Invalid_operation
dqxor283 xor 0000000111000111000111010000000009 1000000111000111000111100000000001 -> NaN Invalid_operation
dqxor284 xor 1000000111000111000111001000000000 0001000111000111000111000000000002 -> NaN Invalid_operation
dqxor285 xor 1000000111000111000111000100000000 0010000111000111000111000000000007 -> NaN Invalid_operation
dqxor286 xor 1000000111000111000111000010000000 0100000111000111000111000000000008 -> NaN Invalid_operation
dqxor287 xor 1000000111000111000111000001000000 1000000111000111000111000000000009 -> NaN Invalid_operation
-- test Middie
dqxor288 xor 0010000111000111000111000020000000 1000000111000111000111001000000000 -> NaN Invalid_operation
dqxor289 xor 0001000111000111000111000070000001 1000000111000111000111000100000000 -> NaN Invalid_operation
dqxor290 xor 0000000111000111000111100080000010 1000000111000111000111000010000000 -> NaN Invalid_operation
dqxor291 xor 0000000111000111000111010090000100 1000000111000111000111000001000000 -> NaN Invalid_operation
dqxor292 xor 1000000111000111000111001000001000 0000000111000111000111000020100000 -> NaN Invalid_operation
dqxor293 xor 1000000111000111000111000100010000 0000000111000111000111000070010000 -> NaN Invalid_operation
dqxor294 xor 1000000111000111000111000010100000 0000000111000111000111000080001000 -> NaN Invalid_operation
dqxor295 xor 1000000111000111000111000001000000 0000000111000111000111000090000100 -> NaN Invalid_operation
-- signs
dqxor296 xor -1000000111000111000111000001000000 -0000001110001110001110010000000100 -> NaN Invalid_operation
dqxor297 xor -1000000111000111000111000001000000 0000001110001110001110000010000100 -> NaN Invalid_operation
dqxor298 xor 1000000111000111000111000001000000 -0000001110001110001110001000000100 -> NaN Invalid_operation
dqxor299 xor 1000000111000111000111000001000000 0000001110001110001110000011000100 -> 1000001001001001001001000010000100
-- Nmax, Nmin, Ntiny-like
dqxor331 xor 2 9.99999999E+999 -> NaN Invalid_operation
dqxor332 xor 3 1E-999 -> NaN Invalid_operation
dqxor333 xor 4 1.00000000E-2821 -> NaN Invalid_operation
dqxor334 xor 5 1E-900 -> NaN Invalid_operation
dqxor335 xor 6 -1E-900 -> NaN Invalid_operation
dqxor336 xor 7 -1.00000000E-999 -> NaN Invalid_operation
dqxor337 xor 8 -1E-999 -> NaN Invalid_operation
dqxor338 xor 9 -9.99999999E+999 -> NaN Invalid_operation
dqxor341 xor 9.99999999E+999 -18 -> NaN Invalid_operation
dqxor342 xor 1E-999 01 -> NaN Invalid_operation
dqxor343 xor 1.00000000E-999 -18 -> NaN Invalid_operation
dqxor344 xor 1E-908 18 -> NaN Invalid_operation
dqxor345 xor -1E-907 -10 -> NaN Invalid_operation
dqxor346 xor -1.00000000E-999 18 -> NaN Invalid_operation
dqxor347 xor -1E-999 10 -> NaN Invalid_operation
dqxor348 xor -9.99999999E+2991 -18 -> NaN Invalid_operation
-- A few other non-integers
dqxor361 xor 1.0 1 -> NaN Invalid_operation
dqxor362 xor 1E+1 1 -> NaN Invalid_operation
dqxor363 xor 0.0 1 -> NaN Invalid_operation
dqxor364 xor 0E+1 1 -> NaN Invalid_operation
dqxor365 xor 9.9 1 -> NaN Invalid_operation
dqxor366 xor 9E+1 1 -> NaN Invalid_operation
dqxor371 xor 0 1.0 -> NaN Invalid_operation
dqxor372 xor 0 1E+1 -> NaN Invalid_operation
dqxor373 xor 0 0.0 -> NaN Invalid_operation
dqxor374 xor 0 0E+1 -> NaN Invalid_operation
dqxor375 xor 0 9.9 -> NaN Invalid_operation
dqxor376 xor 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
dqxor780 xor -Inf -Inf -> NaN Invalid_operation
dqxor781 xor -Inf -1000 -> NaN Invalid_operation
dqxor782 xor -Inf -1 -> NaN Invalid_operation
dqxor783 xor -Inf -0 -> NaN Invalid_operation
dqxor784 xor -Inf 0 -> NaN Invalid_operation
dqxor785 xor -Inf 1 -> NaN Invalid_operation
dqxor786 xor -Inf 1000 -> NaN Invalid_operation
dqxor787 xor -1000 -Inf -> NaN Invalid_operation
dqxor788 xor -Inf -Inf -> NaN Invalid_operation
dqxor789 xor -1 -Inf -> NaN Invalid_operation
dqxor790 xor -0 -Inf -> NaN Invalid_operation
dqxor791 xor 0 -Inf -> NaN Invalid_operation
dqxor792 xor 1 -Inf -> NaN Invalid_operation
dqxor793 xor 1000 -Inf -> NaN Invalid_operation
dqxor794 xor Inf -Inf -> NaN Invalid_operation
dqxor800 xor Inf -Inf -> NaN Invalid_operation
dqxor801 xor Inf -1000 -> NaN Invalid_operation
dqxor802 xor Inf -1 -> NaN Invalid_operation
dqxor803 xor Inf -0 -> NaN Invalid_operation
dqxor804 xor Inf 0 -> NaN Invalid_operation
dqxor805 xor Inf 1 -> NaN Invalid_operation
dqxor806 xor Inf 1000 -> NaN Invalid_operation
dqxor807 xor Inf Inf -> NaN Invalid_operation
dqxor808 xor -1000 Inf -> NaN Invalid_operation
dqxor809 xor -Inf Inf -> NaN Invalid_operation
dqxor810 xor -1 Inf -> NaN Invalid_operation
dqxor811 xor -0 Inf -> NaN Invalid_operation
dqxor812 xor 0 Inf -> NaN Invalid_operation
dqxor813 xor 1 Inf -> NaN Invalid_operation
dqxor814 xor 1000 Inf -> NaN Invalid_operation
dqxor815 xor Inf Inf -> NaN Invalid_operation
dqxor821 xor NaN -Inf -> NaN Invalid_operation
dqxor822 xor NaN -1000 -> NaN Invalid_operation
dqxor823 xor NaN -1 -> NaN Invalid_operation
dqxor824 xor NaN -0 -> NaN Invalid_operation
dqxor825 xor NaN 0 -> NaN Invalid_operation
dqxor826 xor NaN 1 -> NaN Invalid_operation
dqxor827 xor NaN 1000 -> NaN Invalid_operation
dqxor828 xor NaN Inf -> NaN Invalid_operation
dqxor829 xor NaN NaN -> NaN Invalid_operation
dqxor830 xor -Inf NaN -> NaN Invalid_operation
dqxor831 xor -1000 NaN -> NaN Invalid_operation
dqxor832 xor -1 NaN -> NaN Invalid_operation
dqxor833 xor -0 NaN -> NaN Invalid_operation
dqxor834 xor 0 NaN -> NaN Invalid_operation
dqxor835 xor 1 NaN -> NaN Invalid_operation
dqxor836 xor 1000 NaN -> NaN Invalid_operation
dqxor837 xor Inf NaN -> NaN Invalid_operation
dqxor841 xor sNaN -Inf -> NaN Invalid_operation
dqxor842 xor sNaN -1000 -> NaN Invalid_operation
dqxor843 xor sNaN -1 -> NaN Invalid_operation
dqxor844 xor sNaN -0 -> NaN Invalid_operation
dqxor845 xor sNaN 0 -> NaN Invalid_operation
dqxor846 xor sNaN 1 -> NaN Invalid_operation
dqxor847 xor sNaN 1000 -> NaN Invalid_operation
dqxor848 xor sNaN NaN -> NaN Invalid_operation
dqxor849 xor sNaN sNaN -> NaN Invalid_operation
dqxor850 xor NaN sNaN -> NaN Invalid_operation
dqxor851 xor -Inf sNaN -> NaN Invalid_operation
dqxor852 xor -1000 sNaN -> NaN Invalid_operation
dqxor853 xor -1 sNaN -> NaN Invalid_operation
dqxor854 xor -0 sNaN -> NaN Invalid_operation
dqxor855 xor 0 sNaN -> NaN Invalid_operation
dqxor856 xor 1 sNaN -> NaN Invalid_operation
dqxor857 xor 1000 sNaN -> NaN Invalid_operation
dqxor858 xor Inf sNaN -> NaN Invalid_operation
dqxor859 xor NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqxor861 xor NaN1 -Inf -> NaN Invalid_operation
dqxor862 xor +NaN2 -1000 -> NaN Invalid_operation
dqxor863 xor NaN3 1000 -> NaN Invalid_operation
dqxor864 xor NaN4 Inf -> NaN Invalid_operation
dqxor865 xor NaN5 +NaN6 -> NaN Invalid_operation
dqxor866 xor -Inf NaN7 -> NaN Invalid_operation
dqxor867 xor -1000 NaN8 -> NaN Invalid_operation
dqxor868 xor 1000 NaN9 -> NaN Invalid_operation
dqxor869 xor Inf +NaN10 -> NaN Invalid_operation
dqxor871 xor sNaN11 -Inf -> NaN Invalid_operation
dqxor872 xor sNaN12 -1000 -> NaN Invalid_operation
dqxor873 xor sNaN13 1000 -> NaN Invalid_operation
dqxor874 xor sNaN14 NaN17 -> NaN Invalid_operation
dqxor875 xor sNaN15 sNaN18 -> NaN Invalid_operation
dqxor876 xor NaN16 sNaN19 -> NaN Invalid_operation
dqxor877 xor -Inf +sNaN20 -> NaN Invalid_operation
dqxor878 xor -1000 sNaN21 -> NaN Invalid_operation
dqxor879 xor 1000 sNaN22 -> NaN Invalid_operation
dqxor880 xor Inf sNaN23 -> NaN Invalid_operation
dqxor881 xor +NaN25 +sNaN24 -> NaN Invalid_operation
dqxor882 xor -NaN26 NaN28 -> NaN Invalid_operation
dqxor883 xor -sNaN27 sNaN29 -> NaN Invalid_operation
dqxor884 xor 1000 -NaN30 -> NaN Invalid_operation
dqxor885 xor 1000 -sNaN31 -> NaN Invalid_operation

View File

@@ -0,0 +1,372 @@
------------------------------------------------------------------------
-- dsEncode.decTest -- decimal four-byte format testcases --
-- Copyright (c) IBM Corporation, 2000, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-- [Previously called decimal32.decTest]
version: 2.59
-- This set of tests is for the four-byte concrete representation.
-- Its characteristics are:
--
-- 1 bit sign
-- 5 bits combination field
-- 6 bits exponent continuation
-- 20 bits coefficient continuation
--
-- Total exponent length 8 bits
-- Total coefficient length 24 bits (7 digits)
--
-- Elimit = 191 (maximum encoded exponent)
-- Emax = 96 (largest exponent value)
-- Emin = -95 (smallest exponent value)
-- bias = 101 (subtracted from encoded exponent) = -Etiny
-- The testcases here have only exactly representable data on the
-- 'left-hand-side'; rounding from strings is tested in 'base'
-- testcase groups.
extended: 1
clamp: 1
precision: 7
rounding: half_up
maxExponent: 96
minExponent: -95
-- General testcases
-- (mostly derived from the Strawman 4 document and examples)
decs001 apply #A23003D0 -> -7.50
decs002 apply -7.50 -> #A23003D0
-- derivative canonical plain strings
decs003 apply #A26003D0 -> -7.50E+3
decs004 apply -7.50E+3 -> #A26003D0
decs005 apply #A25003D0 -> -750
decs006 apply -750 -> #A25003D0
decs007 apply #A24003D0 -> -75.0
decs008 apply -75.0 -> #A24003D0
decs009 apply #A22003D0 -> -0.750
decs010 apply -0.750 -> #A22003D0
decs011 apply #A21003D0 -> -0.0750
decs012 apply -0.0750 -> #A21003D0
decs013 apply #A1f003D0 -> -0.000750
decs014 apply -0.000750 -> #A1f003D0
decs015 apply #A1d003D0 -> -0.00000750
decs016 apply -0.00000750 -> #A1d003D0
decs017 apply #A1c003D0 -> -7.50E-7
decs018 apply -7.50E-7 -> #A1c003D0
-- Normality
decs020 apply 1234567 -> #2654d2e7
decs021 apply -1234567 -> #a654d2e7
decs022 apply 1111111 -> #26524491
-- Nmax and similar
decs031 apply 9.999999E+96 -> #77f3fcff
decs032 apply #77f3fcff -> 9.999999E+96
decs033 apply 1.234567E+96 -> #47f4d2e7
decs034 apply #47f4d2e7 -> 1.234567E+96
-- fold-downs (more below)
decs035 apply 1.23E+96 -> #47f4c000 Clamped
decs036 apply #47f4c000 -> 1.230000E+96
decs037 apply 1E+96 -> #47f00000 Clamped
decs038 apply #47f00000 -> 1.000000E+96
decs051 apply 12345 -> #225049c5
decs052 apply #225049c5 -> 12345
decs053 apply 1234 -> #22500534
decs054 apply #22500534 -> 1234
decs055 apply 123 -> #225000a3
decs056 apply #225000a3 -> 123
decs057 apply 12 -> #22500012
decs058 apply #22500012 -> 12
decs059 apply 1 -> #22500001
decs060 apply #22500001 -> 1
decs061 apply 1.23 -> #223000a3
decs062 apply #223000a3 -> 1.23
decs063 apply 123.45 -> #223049c5
decs064 apply #223049c5 -> 123.45
-- Nmin and below
decs071 apply 1E-95 -> #00600001
decs072 apply #00600001 -> 1E-95
decs073 apply 1.000000E-95 -> #04000000
decs074 apply #04000000 -> 1.000000E-95
decs075 apply 1.000001E-95 -> #04000001
decs076 apply #04000001 -> 1.000001E-95
decs077 apply 0.100000E-95 -> #00020000 Subnormal
decs07x apply 1.00000E-96 -> 1.00000E-96 Subnormal
decs078 apply #00020000 -> 1.00000E-96 Subnormal
decs079 apply 0.000010E-95 -> #00000010 Subnormal
decs080 apply #00000010 -> 1.0E-100 Subnormal
decs081 apply 0.000001E-95 -> #00000001 Subnormal
decs082 apply #00000001 -> 1E-101 Subnormal
decs083 apply 1e-101 -> #00000001 Subnormal
decs084 apply #00000001 -> 1E-101 Subnormal
decs08x apply 1e-101 -> 1E-101 Subnormal
-- underflows cannot be tested; just check edge case
decs090 apply 1e-101 -> #00000001 Subnormal
-- same again, negatives --
-- Nmax and similar
decs122 apply -9.999999E+96 -> #f7f3fcff
decs123 apply #f7f3fcff -> -9.999999E+96
decs124 apply -1.234567E+96 -> #c7f4d2e7
decs125 apply #c7f4d2e7 -> -1.234567E+96
-- fold-downs (more below)
decs130 apply -1.23E+96 -> #c7f4c000 Clamped
decs131 apply #c7f4c000 -> -1.230000E+96
decs132 apply -1E+96 -> #c7f00000 Clamped
decs133 apply #c7f00000 -> -1.000000E+96
decs151 apply -12345 -> #a25049c5
decs152 apply #a25049c5 -> -12345
decs153 apply -1234 -> #a2500534
decs154 apply #a2500534 -> -1234
decs155 apply -123 -> #a25000a3
decs156 apply #a25000a3 -> -123
decs157 apply -12 -> #a2500012
decs158 apply #a2500012 -> -12
decs159 apply -1 -> #a2500001
decs160 apply #a2500001 -> -1
decs161 apply -1.23 -> #a23000a3
decs162 apply #a23000a3 -> -1.23
decs163 apply -123.45 -> #a23049c5
decs164 apply #a23049c5 -> -123.45
-- Nmin and below
decs171 apply -1E-95 -> #80600001
decs172 apply #80600001 -> -1E-95
decs173 apply -1.000000E-95 -> #84000000
decs174 apply #84000000 -> -1.000000E-95
decs175 apply -1.000001E-95 -> #84000001
decs176 apply #84000001 -> -1.000001E-95
decs177 apply -0.100000E-95 -> #80020000 Subnormal
decs178 apply #80020000 -> -1.00000E-96 Subnormal
decs179 apply -0.000010E-95 -> #80000010 Subnormal
decs180 apply #80000010 -> -1.0E-100 Subnormal
decs181 apply -0.000001E-95 -> #80000001 Subnormal
decs182 apply #80000001 -> -1E-101 Subnormal
decs183 apply -1e-101 -> #80000001 Subnormal
decs184 apply #80000001 -> -1E-101 Subnormal
-- underflow edge case
decs190 apply -1e-101 -> #80000001 Subnormal
-- zeros
decs400 apply 0E-400 -> #00000000 Clamped
decs401 apply 0E-101 -> #00000000
decs402 apply #00000000 -> 0E-101
decs403 apply 0.000000E-95 -> #00000000
decs404 apply #00000000 -> 0E-101
decs405 apply 0E-2 -> #22300000
decs406 apply #22300000 -> 0.00
decs407 apply 0 -> #22500000
decs408 apply #22500000 -> 0
decs409 apply 0E+3 -> #22800000
decs410 apply #22800000 -> 0E+3
decs411 apply 0E+90 -> #43f00000
decs412 apply #43f00000 -> 0E+90
-- clamped zeros...
decs413 apply 0E+91 -> #43f00000 Clamped
decs414 apply #43f00000 -> 0E+90
decs415 apply 0E+96 -> #43f00000 Clamped
decs416 apply #43f00000 -> 0E+90
decs417 apply 0E+400 -> #43f00000 Clamped
decs418 apply #43f00000 -> 0E+90
-- negative zeros
decs420 apply -0E-400 -> #80000000 Clamped
decs421 apply -0E-101 -> #80000000
decs422 apply #80000000 -> -0E-101
decs423 apply -0.000000E-95 -> #80000000
decs424 apply #80000000 -> -0E-101
decs425 apply -0E-2 -> #a2300000
decs426 apply #a2300000 -> -0.00
decs427 apply -0 -> #a2500000
decs428 apply #a2500000 -> -0
decs429 apply -0E+3 -> #a2800000
decs430 apply #a2800000 -> -0E+3
decs431 apply -0E+90 -> #c3f00000
decs432 apply #c3f00000 -> -0E+90
-- clamped zeros...
decs433 apply -0E+91 -> #c3f00000 Clamped
decs434 apply #c3f00000 -> -0E+90
decs435 apply -0E+96 -> #c3f00000 Clamped
decs436 apply #c3f00000 -> -0E+90
decs437 apply -0E+400 -> #c3f00000 Clamped
decs438 apply #c3f00000 -> -0E+90
-- Specials
decs500 apply Infinity -> #78000000
decs501 apply #78787878 -> #78000000
decs502 apply #78000000 -> Infinity
decs503 apply #79797979 -> #78000000
decs504 apply #79000000 -> Infinity
decs505 apply #7a7a7a7a -> #78000000
decs506 apply #7a000000 -> Infinity
decs507 apply #7b7b7b7b -> #78000000
decs508 apply #7b000000 -> Infinity
decs509 apply #7c7c7c7c -> #7c0c7c7c
decs510 apply NaN -> #7c000000
decs511 apply #7c000000 -> NaN
decs512 apply #7d7d7d7d -> #7c0d7d7d
decs513 apply #7d000000 -> NaN
decs514 apply #7e7e7e7e -> #7e0e7c7e
decs515 apply #7e000000 -> sNaN
decs516 apply #7f7f7f7f -> #7e0f7c7f
decs517 apply #7f000000 -> sNaN
decs518 apply #7fffffff -> sNaN999999
decs519 apply #7fffffff -> #7e03fcff
decs520 apply -Infinity -> #f8000000
decs521 apply #f8787878 -> #f8000000
decs522 apply #f8000000 -> -Infinity
decs523 apply #f9797979 -> #f8000000
decs524 apply #f9000000 -> -Infinity
decs525 apply #fa7a7a7a -> #f8000000
decs526 apply #fa000000 -> -Infinity
decs527 apply #fb7b7b7b -> #f8000000
decs528 apply #fb000000 -> -Infinity
decs529 apply -NaN -> #fc000000
decs530 apply #fc7c7c7c -> #fc0c7c7c
decs531 apply #fc000000 -> -NaN
decs532 apply #fd7d7d7d -> #fc0d7d7d
decs533 apply #fd000000 -> -NaN
decs534 apply #fe7e7e7e -> #fe0e7c7e
decs535 apply #fe000000 -> -sNaN
decs536 apply #ff7f7f7f -> #fe0f7c7f
decs537 apply #ff000000 -> -sNaN
decs538 apply #ffffffff -> -sNaN999999
decs539 apply #ffffffff -> #fe03fcff
-- diagnostic NaNs
decs540 apply NaN -> #7c000000
decs541 apply NaN0 -> #7c000000
decs542 apply NaN1 -> #7c000001
decs543 apply NaN12 -> #7c000012
decs544 apply NaN79 -> #7c000079
decs545 apply NaN12345 -> #7c0049c5
decs546 apply NaN123456 -> #7c028e56
decs547 apply NaN799799 -> #7c0f7fdf
decs548 apply NaN999999 -> #7c03fcff
-- fold-down full sequence
decs601 apply 1E+96 -> #47f00000 Clamped
decs602 apply #47f00000 -> 1.000000E+96
decs603 apply 1E+95 -> #43f20000 Clamped
decs604 apply #43f20000 -> 1.00000E+95
decs605 apply 1E+94 -> #43f04000 Clamped
decs606 apply #43f04000 -> 1.0000E+94
decs607 apply 1E+93 -> #43f00400 Clamped
decs608 apply #43f00400 -> 1.000E+93
decs609 apply 1E+92 -> #43f00080 Clamped
decs610 apply #43f00080 -> 1.00E+92
decs611 apply 1E+91 -> #43f00010 Clamped
decs612 apply #43f00010 -> 1.0E+91
decs613 apply 1E+90 -> #43f00001
decs614 apply #43f00001 -> 1E+90
-- Selected DPD codes
decs700 apply #22500000 -> 0
decs701 apply #22500009 -> 9
decs702 apply #22500010 -> 10
decs703 apply #22500019 -> 19
decs704 apply #22500020 -> 20
decs705 apply #22500029 -> 29
decs706 apply #22500030 -> 30
decs707 apply #22500039 -> 39
decs708 apply #22500040 -> 40
decs709 apply #22500049 -> 49
decs710 apply #22500050 -> 50
decs711 apply #22500059 -> 59
decs712 apply #22500060 -> 60
decs713 apply #22500069 -> 69
decs714 apply #22500070 -> 70
decs715 apply #22500071 -> 71
decs716 apply #22500072 -> 72
decs717 apply #22500073 -> 73
decs718 apply #22500074 -> 74
decs719 apply #22500075 -> 75
decs720 apply #22500076 -> 76
decs721 apply #22500077 -> 77
decs722 apply #22500078 -> 78
decs723 apply #22500079 -> 79
decs730 apply #2250029e -> 994
decs731 apply #2250029f -> 995
decs732 apply #225002a0 -> 520
decs733 apply #225002a1 -> 521
-- DPD: one of each of the huffman groups
decs740 apply #225003f7 -> 777
decs741 apply #225003f8 -> 778
decs742 apply #225003eb -> 787
decs743 apply #2250037d -> 877
decs744 apply #2250039f -> 997
decs745 apply #225003bf -> 979
decs746 apply #225003df -> 799
decs747 apply #2250006e -> 888
-- DPD all-highs cases (includes the 24 redundant codes)
decs750 apply #2250006e -> 888
decs751 apply #2250016e -> 888
decs752 apply #2250026e -> 888
decs753 apply #2250036e -> 888
decs754 apply #2250006f -> 889
decs755 apply #2250016f -> 889
decs756 apply #2250026f -> 889
decs757 apply #2250036f -> 889
decs760 apply #2250007e -> 898
decs761 apply #2250017e -> 898
decs762 apply #2250027e -> 898
decs763 apply #2250037e -> 898
decs764 apply #2250007f -> 899
decs765 apply #2250017f -> 899
decs766 apply #2250027f -> 899
decs767 apply #2250037f -> 899
decs770 apply #225000ee -> 988
decs771 apply #225001ee -> 988
decs772 apply #225002ee -> 988
decs773 apply #225003ee -> 988
decs774 apply #225000ef -> 989
decs775 apply #225001ef -> 989
decs776 apply #225002ef -> 989
decs777 apply #225003ef -> 989
decs780 apply #225000fe -> 998
decs781 apply #225001fe -> 998
decs782 apply #225002fe -> 998
decs783 apply #225003fe -> 998
decs784 apply #225000ff -> 999
decs785 apply #225001ff -> 999
decs786 apply #225002ff -> 999
decs787 apply #225003ff -> 999
-- narrowing case
decs790 apply 2.00E-99 -> #00000100 Subnormal
decs791 apply #00000100 -> 2.00E-99 Subnormal

View File

@@ -0,0 +1,674 @@
------------------------------------------------------------------------
-- exp.decTest -- decimal natural exponentiation --
-- Copyright (c) IBM Corporation, 2005, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Tests of the exponential function. Currently all testcases here
-- show results which are correctly rounded (within <= 0.5 ulp).
extended: 1
precision: 9
rounding: half_even
maxExponent: 384
minexponent: -383
-- basics (examples in specification, etc.)
expx001 exp -Infinity -> 0
expx002 exp -10 -> 0.0000453999298 Inexact Rounded
expx003 exp -1 -> 0.367879441 Inexact Rounded
expx004 exp 0 -> 1
expx005 exp -0 -> 1
expx006 exp 1 -> 2.71828183 Inexact Rounded
expx007 exp 0.693147181 -> 2.00000000 Inexact Rounded
expx008 exp 10 -> 22026.4658 Inexact Rounded
expx009 exp +Infinity -> Infinity
-- tiny edge cases
precision: 7
expx011 exp 0.1 -> 1.105171 Inexact Rounded
expx012 exp 0.01 -> 1.010050 Inexact Rounded
expx013 exp 0.001 -> 1.001001 Inexact Rounded
expx014 exp 0.0001 -> 1.000100 Inexact Rounded
expx015 exp 0.00001 -> 1.000010 Inexact Rounded
expx016 exp 0.000001 -> 1.000001 Inexact Rounded
expx017 exp 0.0000001 -> 1.000000 Inexact Rounded
expx018 exp 0.0000003 -> 1.000000 Inexact Rounded
expx019 exp 0.0000004 -> 1.000000 Inexact Rounded
expx020 exp 0.0000005 -> 1.000001 Inexact Rounded
expx021 exp 0.0000008 -> 1.000001 Inexact Rounded
expx022 exp 0.0000009 -> 1.000001 Inexact Rounded
expx023 exp 0.0000010 -> 1.000001 Inexact Rounded
expx024 exp 0.0000011 -> 1.000001 Inexact Rounded
expx025 exp 0.00000009 -> 1.000000 Inexact Rounded
expx026 exp 0.00000005 -> 1.000000 Inexact Rounded
expx027 exp 0.00000004 -> 1.000000 Inexact Rounded
expx028 exp 0.00000001 -> 1.000000 Inexact Rounded
-- and some more zeros
expx030 exp 0.00000000 -> 1
expx031 exp 0E+100 -> 1
expx032 exp 0E-100 -> 1
expx033 exp -0.00000000 -> 1
expx034 exp -0E+100 -> 1
expx035 exp -0E-100 -> 1
-- basic e=0, e=1, e=2, e=4, e>=8 cases
precision: 7
expx041 exp 1 -> 2.718282 Inexact Rounded
expx042 exp -1 -> 0.3678794 Inexact Rounded
expx043 exp 10 -> 22026.47 Inexact Rounded
expx044 exp -10 -> 0.00004539993 Inexact Rounded
expx045 exp 100 -> 2.688117E+43 Inexact Rounded
expx046 exp -100 -> 3.720076E-44 Inexact Rounded
expx047 exp 1000 -> Infinity Overflow Inexact Rounded
expx048 exp -1000 -> 0E-389 Underflow Inexact Rounded Clamped Subnormal
expx049 exp 100000000 -> Infinity Overflow Inexact Rounded
expx050 exp -100000000 -> 0E-389 Underflow Inexact Rounded Clamped Subnormal
-- miscellanea
-- similar to 'VF bug' test, at 17, but with last digit corrected for decimal
precision: 16
expx055 exp -5.42410311287441459172E+2 -> 2.717658486884572E-236 Inexact Rounded
-- result from NetRexx/Java prototype -> 2.7176584868845721117677929628617246054459644711108E-236
-- result from Rexx (series) version -> 2.717658486884572111767792962861724605446E-236
precision: 17
expx056 exp -5.42410311287441459172E+2 -> 2.7176584868845721E-236 Inexact Rounded
precision: 18
expx057 exp -5.42410311287441459172E+2 -> 2.71765848688457211E-236 Inexact Rounded
precision: 19
expx058 exp -5.42410311287441459172E+2 -> 2.717658486884572112E-236 Inexact Rounded
precision: 20
expx059 exp -5.42410311287441459172E+2 -> 2.7176584868845721118E-236 Inexact Rounded
-- rounding in areas of ..500.., ..499.., ..100.., ..999.. sequences
precision: 50
expx101 exp -9E-8 -> 0.99999991000000404999987850000273374995079250073811 Inexact Rounded
precision: 31
expx102 exp -9E-8 -> 0.9999999100000040499998785000027 Inexact Rounded
precision: 30
expx103 exp -9E-8 -> 0.999999910000004049999878500003 Inexact Rounded
precision: 29
expx104 exp -9E-8 -> 0.99999991000000404999987850000 Inexact Rounded
precision: 28
expx105 exp -9E-8 -> 0.9999999100000040499998785000 Inexact Rounded
precision: 27
expx106 exp -9E-8 -> 0.999999910000004049999878500 Inexact Rounded
precision: 26
expx107 exp -9E-8 -> 0.99999991000000404999987850 Inexact Rounded
precision: 25
expx108 exp -9E-8 -> 0.9999999100000040499998785 Inexact Rounded
precision: 24
expx109 exp -9E-8 -> 0.999999910000004049999879 Inexact Rounded
precision: 23
expx110 exp -9E-8 -> 0.99999991000000404999988 Inexact Rounded
precision: 22
expx111 exp -9E-8 -> 0.9999999100000040499999 Inexact Rounded
precision: 21
expx112 exp -9E-8 -> 0.999999910000004050000 Inexact Rounded
precision: 20
expx113 exp -9E-8 -> 0.99999991000000405000 Inexact Rounded
precision: 19
expx114 exp -9E-8 -> 0.9999999100000040500 Inexact Rounded
precision: 18
expx115 exp -9E-8 -> 0.999999910000004050 Inexact Rounded
precision: 17
expx116 exp -9E-8 -> 0.99999991000000405 Inexact Rounded
precision: 16
expx117 exp -9E-8 -> 0.9999999100000040 Inexact Rounded
precision: 15
expx118 exp -9E-8 -> 0.999999910000004 Inexact Rounded
precision: 14
expx119 exp -9E-8 -> 0.99999991000000 Inexact Rounded
precision: 13
expx120 exp -9E-8 -> 0.9999999100000 Inexact Rounded
precision: 12
expx121 exp -9E-8 -> 0.999999910000 Inexact Rounded
precision: 11
expx122 exp -9E-8 -> 0.99999991000 Inexact Rounded
precision: 10
expx123 exp -9E-8 -> 0.9999999100 Inexact Rounded
precision: 9
expx124 exp -9E-8 -> 0.999999910 Inexact Rounded
precision: 8
expx125 exp -9E-8 -> 0.99999991 Inexact Rounded
precision: 7
expx126 exp -9E-8 -> 0.9999999 Inexact Rounded
precision: 6
expx127 exp -9E-8 -> 1.00000 Inexact Rounded
precision: 5
expx128 exp -9E-8 -> 1.0000 Inexact Rounded
precision: 4
expx129 exp -9E-8 -> 1.000 Inexact Rounded
precision: 3
expx130 exp -9E-8 -> 1.00 Inexact Rounded
precision: 2
expx131 exp -9E-8 -> 1.0 Inexact Rounded
precision: 1
expx132 exp -9E-8 -> 1 Inexact Rounded
-- sanity checks, with iteration counts [normalized so 0<=|x|<1]
precision: 50
expx210 exp 0 -> 1
-- iterations: 2
expx211 exp -1E-40 -> 0.99999999999999999999999999999999999999990000000000 Inexact Rounded
-- iterations: 8
expx212 exp -9E-7 -> 0.99999910000040499987850002733749507925073811240510 Inexact Rounded
-- iterations: 6
expx213 exp -9E-8 -> 0.99999991000000404999987850000273374995079250073811 Inexact Rounded
-- iterations: 15
expx214 exp -0.003 -> 0.99700449550337297601206623409756091074177480489845 Inexact Rounded
-- iterations: 14
expx215 exp -0.001 -> 0.99900049983337499166805535716765597470235590236008 Inexact Rounded
-- iterations: 26
expx216 exp -0.1 -> 0.90483741803595957316424905944643662119470536098040 Inexact Rounded
-- iterations: 39
expx217 exp -0.7 -> 0.49658530379140951470480009339752896170766716571182 Inexact Rounded
-- iterations: 41
expx218 exp -0.9 -> 0.40656965974059911188345423964562598783370337617038 Inexact Rounded
-- iterations: 43
expx219 exp -0.99 -> 0.37157669102204569053152411990820138691802885490501 Inexact Rounded
-- iterations: 26
expx220 exp -1 -> 0.36787944117144232159552377016146086744581113103177 Inexact Rounded
-- iterations: 26
expx221 exp -1.01 -> 0.36421897957152331975704629563734548959589139192482 Inexact Rounded
-- iterations: 27
expx222 exp -1.1 -> 0.33287108369807955328884690643131552161247952156921 Inexact Rounded
-- iterations: 28
expx223 exp -1.5 -> 0.22313016014842982893328047076401252134217162936108 Inexact Rounded
-- iterations: 30
expx224 exp -2 -> 0.13533528323661269189399949497248440340763154590958 Inexact Rounded
-- iterations: 36
expx225 exp -5 -> 0.0067379469990854670966360484231484242488495850273551 Inexact Rounded
-- iterations: 26
expx226 exp -10 -> 0.000045399929762484851535591515560550610237918088866565 Inexact Rounded
-- iterations: 28
expx227 exp -14 -> 8.3152871910356788406398514256526229460765836498457E-7 Inexact Rounded
-- iterations: 29
expx228 exp -15 -> 3.0590232050182578837147949770228963937082078081856E-7 Inexact Rounded
-- iterations: 30
expx233 exp 0 -> 1
-- iterations: 2
expx234 exp 1E-40 -> 1.0000000000000000000000000000000000000001000000000 Inexact Rounded
-- iterations: 7
expx235 exp 9E-7 -> 1.0000009000004050001215000273375049207507381125949 Inexact Rounded
-- iterations: 6
expx236 exp 9E-8 -> 1.0000000900000040500001215000027337500492075007381 Inexact Rounded
-- iterations: 15
expx237 exp 0.003 -> 1.0030045045033770260129340913489002053318727195619 Inexact Rounded
-- iterations: 13
expx238 exp 0.001 -> 1.0010005001667083416680557539930583115630762005807 Inexact Rounded
-- iterations: 25
expx239 exp 0.1 -> 1.1051709180756476248117078264902466682245471947375 Inexact Rounded
-- iterations: 38
expx240 exp 0.7 -> 2.0137527074704765216245493885830652700175423941459 Inexact Rounded
-- iterations: 41
expx241 exp 0.9 -> 2.4596031111569496638001265636024706954217723064401 Inexact Rounded
-- iterations: 42
expx242 exp 0.99 -> 2.6912344723492622890998794040710139721802931841030 Inexact Rounded
-- iterations: 26
expx243 exp 1 -> 2.7182818284590452353602874713526624977572470937000 Inexact Rounded
-- iterations: 26
expx244 exp 1.01 -> 2.7456010150169164939897763166603876240737508195960 Inexact Rounded
-- iterations: 26
expx245 exp 1.1 -> 3.0041660239464331120584079535886723932826810260163 Inexact Rounded
-- iterations: 28
expx246 exp 1.5 -> 4.4816890703380648226020554601192758190057498683697 Inexact Rounded
-- iterations: 29
expx247 exp 2 -> 7.3890560989306502272304274605750078131803155705518 Inexact Rounded
-- iterations: 36
expx248 exp 5 -> 148.41315910257660342111558004055227962348766759388 Inexact Rounded
-- iterations: 26
expx249 exp 10 -> 22026.465794806716516957900645284244366353512618557 Inexact Rounded
-- iterations: 28
expx250 exp 14 -> 1202604.2841647767777492367707678594494124865433761 Inexact Rounded
-- iterations: 28
expx251 exp 15 -> 3269017.3724721106393018550460917213155057385438200 Inexact Rounded
-- iterations: 29
-- a biggie [result verified 3 ways]
precision: 250
expx260 exp 1 -> 2.718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427427466391932003059921817413596629043572900334295260595630738132328627943490763233829880753195251019011573834187930702154089149934884167509244761460668 Inexact Rounded
-- extreme range boundaries
precision: 16
maxExponent: 999999
minExponent: -999999
-- Ntiny boundary
expx290 exp -2302618.022332529 -> 0E-1000014 Underflow Subnormal Inexact Rounded Clamped
expx291 exp -2302618.022332528 -> 1E-1000014 Underflow Subnormal Inexact Rounded
-- Nmax/10 and Nmax boundary
expx292 exp 2302582.790408952 -> 9.999999993100277E+999998 Inexact Rounded
expx293 exp 2302582.790408953 -> 1.000000000310028E+999999 Inexact Rounded
expx294 exp 2302585.092993946 -> 9.999999003159870E+999999 Inexact Rounded
expx295 exp 2302585.092994036 -> 9.999999903159821E+999999 Inexact Rounded
expx296 exp 2302585.092994045 -> 9.999999993159820E+999999 Inexact Rounded
expx297 exp 2302585.092994046 -> Infinity Overflow Inexact Rounded
-- 0<-x<<1 effects
precision: 30
expx320 exp -4.9999999999999E-8 -> 0.999999950000001250000979166617 Inexact Rounded
expx321 exp -5.0000000000000E-8 -> 0.999999950000001249999979166667 Inexact Rounded
expx322 exp -5.0000000000001E-8 -> 0.999999950000001249998979166717 Inexact Rounded
precision: 20
expx323 exp -4.9999999999999E-8 -> 0.99999995000000125000 Inexact Rounded
expx324 exp -5.0000000000000E-8 -> 0.99999995000000125000 Inexact Rounded
expx325 exp -5.0000000000001E-8 -> 0.99999995000000125000 Inexact Rounded
precision: 14
expx326 exp -4.9999999999999E-8 -> 0.99999995000000 Inexact Rounded
expx327 exp -5.0000000000000E-8 -> 0.99999995000000 Inexact Rounded
expx328 exp -5.0000000000001E-8 -> 0.99999995000000 Inexact Rounded
-- overprecise and 0<-x<<1
precision: 8
expx330 exp -4.9999999999999E-8 -> 0.99999995 Inexact Rounded
expx331 exp -5.0000000000000E-8 -> 0.99999995 Inexact Rounded
expx332 exp -5.0000000000001E-8 -> 0.99999995 Inexact Rounded
precision: 7
expx333 exp -4.9999999999999E-8 -> 1.000000 Inexact Rounded
expx334 exp -5.0000000000000E-8 -> 1.000000 Inexact Rounded
expx335 exp -5.0000000000001E-8 -> 1.000000 Inexact Rounded
precision: 3
expx336 exp -4.9999999999999E-8 -> 1.00 Inexact Rounded
expx337 exp -5.0000000000000E-8 -> 1.00 Inexact Rounded
expx338 exp -5.0000000000001E-8 -> 1.00 Inexact Rounded
-- 0<x<<1 effects
precision: 30
expx340 exp 4.9999999999999E-8 -> 1.00000005000000124999902083328 Inexact Rounded
expx341 exp 5.0000000000000E-8 -> 1.00000005000000125000002083333 Inexact Rounded
expx342 exp 5.0000000000001E-8 -> 1.00000005000000125000102083338 Inexact Rounded
precision: 20
expx343 exp 4.9999999999999E-8 -> 1.0000000500000012500 Inexact Rounded
expx344 exp 5.0000000000000E-8 -> 1.0000000500000012500 Inexact Rounded
expx345 exp 5.0000000000001E-8 -> 1.0000000500000012500 Inexact Rounded
precision: 14
expx346 exp 4.9999999999999E-8 -> 1.0000000500000 Inexact Rounded
expx347 exp 5.0000000000000E-8 -> 1.0000000500000 Inexact Rounded
expx348 exp 5.0000000000001E-8 -> 1.0000000500000 Inexact Rounded
-- overprecise and 0<x<<1
precision: 8
expx350 exp 4.9999999999999E-8 -> 1.0000001 Inexact Rounded
expx351 exp 5.0000000000000E-8 -> 1.0000001 Inexact Rounded
expx352 exp 5.0000000000001E-8 -> 1.0000001 Inexact Rounded
precision: 7
expx353 exp 4.9999999999999E-8 -> 1.000000 Inexact Rounded
expx354 exp 5.0000000000000E-8 -> 1.000000 Inexact Rounded
expx355 exp 5.0000000000001E-8 -> 1.000000 Inexact Rounded
precision: 3
expx356 exp 4.9999999999999E-8 -> 1.00 Inexact Rounded
expx357 exp 5.0000000000000E-8 -> 1.00 Inexact Rounded
expx358 exp 5.0000000000001E-8 -> 1.00 Inexact Rounded
-- cases near 1 -- 1 2345678901234567890
precision: 20
expx401 exp 0.99999999999996 -> 2.7182818284589365041 Inexact Rounded
expx402 exp 0.99999999999997 -> 2.7182818284589636869 Inexact Rounded
expx403 exp 0.99999999999998 -> 2.7182818284589908697 Inexact Rounded
expx404 exp 0.99999999999999 -> 2.7182818284590180525 Inexact Rounded
expx405 exp 1.0000000000000 -> 2.7182818284590452354 Inexact Rounded
expx406 exp 1.0000000000001 -> 2.7182818284593170635 Inexact Rounded
expx407 exp 1.0000000000002 -> 2.7182818284595888917 Inexact Rounded
precision: 14
expx411 exp 0.99999999999996 -> 2.7182818284589 Inexact Rounded
expx412 exp 0.99999999999997 -> 2.7182818284590 Inexact Rounded
expx413 exp 0.99999999999998 -> 2.7182818284590 Inexact Rounded
expx414 exp 0.99999999999999 -> 2.7182818284590 Inexact Rounded
expx415 exp 1.0000000000000 -> 2.7182818284590 Inexact Rounded
expx416 exp 1.0000000000001 -> 2.7182818284593 Inexact Rounded
expx417 exp 1.0000000000002 -> 2.7182818284596 Inexact Rounded
-- overprecise...
precision: 7
expx421 exp 0.99999999999996 -> 2.718282 Inexact Rounded
expx422 exp 0.99999999999997 -> 2.718282 Inexact Rounded
expx423 exp 0.99999999999998 -> 2.718282 Inexact Rounded
expx424 exp 0.99999999999999 -> 2.718282 Inexact Rounded
expx425 exp 1.0000000000001 -> 2.718282 Inexact Rounded
expx426 exp 1.0000000000002 -> 2.718282 Inexact Rounded
expx427 exp 1.0000000000003 -> 2.718282 Inexact Rounded
precision: 2
expx431 exp 0.99999999999996 -> 2.7 Inexact Rounded
expx432 exp 0.99999999999997 -> 2.7 Inexact Rounded
expx433 exp 0.99999999999998 -> 2.7 Inexact Rounded
expx434 exp 0.99999999999999 -> 2.7 Inexact Rounded
expx435 exp 1.0000000000001 -> 2.7 Inexact Rounded
expx436 exp 1.0000000000002 -> 2.7 Inexact Rounded
expx437 exp 1.0000000000003 -> 2.7 Inexact Rounded
-- basics at low precisions
precision: 3
expx501 exp -Infinity -> 0
expx502 exp -10 -> 0.0000454 Inexact Rounded
expx503 exp -1 -> 0.368 Inexact Rounded
expx504 exp 0 -> 1
expx505 exp -0 -> 1
expx506 exp 1 -> 2.72 Inexact Rounded
expx507 exp 0.693147181 -> 2.00 Inexact Rounded
expx508 exp 10 -> 2.20E+4 Inexact Rounded
expx509 exp +Infinity -> Infinity
precision: 2
expx511 exp -Infinity -> 0
expx512 exp -10 -> 0.000045 Inexact Rounded
expx513 exp -1 -> 0.37 Inexact Rounded
expx514 exp 0 -> 1
expx515 exp -0 -> 1
expx516 exp 1 -> 2.7 Inexact Rounded
expx517 exp 0.693147181 -> 2.0 Inexact Rounded
expx518 exp 10 -> 2.2E+4 Inexact Rounded
expx519 exp +Infinity -> Infinity
precision: 1
expx521 exp -Infinity -> 0
expx522 exp -10 -> 0.00005 Inexact Rounded
expx523 exp -1 -> 0.4 Inexact Rounded
expx524 exp 0 -> 1
expx525 exp -0 -> 1
expx526 exp 1 -> 3 Inexact Rounded
expx527 exp 0.693147181 -> 2 Inexact Rounded
expx528 exp 10 -> 2E+4 Inexact Rounded
expx529 exp +Infinity -> Infinity
-- overflows, including some overprecise borderlines
precision: 7
maxExponent: 384
minExponent: -383
expx701 exp 1000000000 -> Infinity Overflow Inexact Rounded
expx702 exp 100000000 -> Infinity Overflow Inexact Rounded
expx703 exp 10000000 -> Infinity Overflow Inexact Rounded
expx704 exp 1000000 -> Infinity Overflow Inexact Rounded
expx705 exp 100000 -> Infinity Overflow Inexact Rounded
expx706 exp 10000 -> Infinity Overflow Inexact Rounded
expx707 exp 1000 -> Infinity Overflow Inexact Rounded
expx708 exp 886.4952608 -> Infinity Overflow Inexact Rounded
expx709 exp 886.4952607 -> 9.999999E+384 Inexact Rounded
expx710 exp 886.49527 -> Infinity Overflow Inexact Rounded
expx711 exp 886.49526 -> 9.999992E+384 Inexact Rounded
precision: 16
expx721 exp 886.4952608027075883 -> Infinity Overflow Inexact Rounded
expx722 exp 886.4952608027075882 -> 9.999999999999999E+384 Inexact Rounded
expx723 exp 886.49526080270759 -> Infinity Overflow Inexact Rounded
expx724 exp 886.49526080270758 -> 9.999999999999917E+384 Inexact Rounded
expx725 exp 886.4952608027076 -> Infinity Overflow Inexact Rounded
expx726 exp 886.4952608027075 -> 9.999999999999117E+384 Inexact Rounded
-- and by special request ...
precision: 15
expx731 exp 886.495260802708 -> Infinity Overflow Inexact Rounded
expx732 exp 886.495260802707 -> 9.99999999999412E+384 Inexact Rounded
expx733 exp 886.495260802706 -> 9.99999999998412E+384 Inexact Rounded
maxExponent: 999
minExponent: -999
expx735 exp 2302.58509299405 -> Infinity Overflow Inexact Rounded
expx736 exp 2302.58509299404 -> 9.99999999994316E+999 Inexact Rounded
expx737 exp 2302.58509299403 -> 9.99999999984316E+999 Inexact Rounded
-- subnormals and underflows, including underflow-to-zero edge point
precision: 7
maxExponent: 384
minExponent: -383
expx751 exp -1000000000 -> 0E-389 Underflow Inexact Rounded Clamped Subnormal
expx752 exp -100000000 -> 0E-389 Underflow Inexact Rounded Clamped Subnormal
expx753 exp -10000000 -> 0E-389 Underflow Inexact Rounded Clamped Subnormal
expx754 exp -1000000 -> 0E-389 Underflow Inexact Rounded Clamped Subnormal
expx755 exp -100000 -> 0E-389 Underflow Inexact Rounded Clamped Subnormal
expx756 exp -10000 -> 0E-389 Underflow Inexact Rounded Clamped Subnormal
expx757 exp -1000 -> 0E-389 Underflow Inexact Rounded Clamped Subnormal
expx758 exp -881.89009 -> 1.000001E-383 Inexact Rounded
expx759 exp -881.8901 -> 9.99991E-384 Inexact Rounded Underflow Subnormal
expx760 exp -885 -> 4.4605E-385 Inexact Rounded Underflow Subnormal
expx761 exp -888 -> 2.221E-386 Inexact Rounded Underflow Subnormal
expx762 exp -890 -> 3.01E-387 Inexact Rounded Underflow Subnormal
expx763 exp -892.9 -> 1.7E-388 Inexact Rounded Underflow Subnormal
expx764 exp -893 -> 1.5E-388 Inexact Rounded Underflow Subnormal
expx765 exp -893.5 -> 9E-389 Inexact Rounded Underflow Subnormal
expx766 exp -895.7056 -> 1E-389 Inexact Rounded Underflow Subnormal
expx769 exp -895.8 -> 1E-389 Inexact Rounded Underflow Subnormal
expx770 exp -895.73 -> 1E-389 Inexact Rounded Underflow Subnormal
expx771 exp -896.3987 -> 1E-389 Inexact Rounded Underflow Subnormal
expx772 exp -896.3988 -> 0E-389 Inexact Rounded Underflow Subnormal Clamped
expx773 exp -898.0081 -> 0E-389 Inexact Rounded Underflow Subnormal Clamped
expx774 exp -898.0082 -> 0E-389 Inexact Rounded Underflow Subnormal Clamped
-- special values
maxexponent: 999
minexponent: -999
expx820 exp Inf -> Infinity
expx821 exp -Inf -> 0
expx822 exp NaN -> NaN
expx823 exp sNaN -> NaN Invalid_operation
-- propagating NaNs
expx824 exp sNaN123 -> NaN123 Invalid_operation
expx825 exp -sNaN321 -> -NaN321 Invalid_operation
expx826 exp NaN456 -> NaN456
expx827 exp -NaN654 -> -NaN654
expx828 exp NaN1 -> NaN1
-- Invalid operations due to restrictions
-- [next two probably skipped by most test harnesses]
precision: 100000000
expx901 exp -Infinity -> NaN Invalid_context
precision: 99999999
expx902 exp -Infinity -> NaN Invalid_context
precision: 9
maxExponent: 1000000
minExponent: -999999
expx903 exp -Infinity -> NaN Invalid_context
maxExponent: 999999
minExponent: -999999
expx904 exp -Infinity -> 0
maxExponent: 999999
minExponent: -1000000
expx905 exp -Infinity -> NaN Invalid_context
maxExponent: 999999
minExponent: -999998
expx906 exp -Infinity -> 0
--
maxExponent: 384
minExponent: -383
precision: 16
rounding: half_even
-- Null test
expx900 exp # -> NaN Invalid_operation
-- Randoms P=50, within 0-999
Precision: 50
maxExponent: 384
minExponent: -383
expx1501 exp 656.35397950590285612266095596539934213943872885728 -> 1.1243757610640319783611178528839652672062820040314E+285 Inexact Rounded
expx1502 exp 0.93620571093652800225038550600780322831236082781471 -> 2.5502865130986176689199711857825771311178046842009 Inexact Rounded
expx1503 exp 0.00000000000000008340785856601514714183373874105791 -> 1.0000000000000000834078585660151506202691740252512 Inexact Rounded
expx1504 exp 0.00009174057262887789625745574686545163168788456203 -> 1.0000917447809239005146722341251524081006051473273 Inexact Rounded
expx1505 exp 33.909116897973797735657751591014926629051117541243 -> 532773181025002.03543618901306726495870476617232229 Inexact Rounded
expx1506 exp 0.00000740470413004406592124575295278456936809587311 -> 1.0000074047315449333590066395670306135567889210814 Inexact Rounded
expx1507 exp 0.00000000000124854922222108802453746922483071445492 -> 1.0000000000012485492222218674621176239911424968263 Inexact Rounded
expx1508 exp 4.1793280674155659794286951159430651258356014391382 -> 65.321946520147199404199787811336860087975118278185 Inexact Rounded
expx1509 exp 485.43595745460655893746179890255529919221550201686 -> 6.6398403920459617255950476953129377459845366585463E+210 Inexact Rounded
expx1510 exp 0.00000000003547259806590856032527875157830328156597 -> 1.0000000000354725980665377129320589406715000685515 Inexact Rounded
expx1511 exp 0.00000000000000759621497339104047930616478635042678 -> 1.0000000000000075962149733910693305471257715463887 Inexact Rounded
expx1512 exp 9.7959168821760339304571595474480640286072720233796 -> 17960.261146042955179164303653412650751681436352437 Inexact Rounded
expx1513 exp 0.00000000566642006258290526783901451194943164535581 -> 1.0000000056664200786370634609832438815665249347650 Inexact Rounded
expx1514 exp 741.29888791134298194088827572374718940925820027354 -> 8.7501694006317332808128946666402622432064923198731E+321 Inexact Rounded
expx1515 exp 032.75573003552517668808529099897153710887014947935 -> 168125196578678.17725841108617955904425345631092339 Inexact Rounded
expx1516 exp 42.333700726429333308594265553422902463737399437644 -> 2428245675864172475.4681119493045657797309369672012 Inexact Rounded
expx1517 exp 0.00000000000000559682616876491888197609158802835798 -> 1.0000000000000055968261687649345442076732739577049 Inexact Rounded
expx1518 exp 0.00000000000080703688668280193584758300973549486312 -> 1.0000000000008070368866831275901158164321867914342 Inexact Rounded
expx1519 exp 640.72396012796509482382712891709072570653606838251 -> 1.8318094990683394229304133068983914236995326891045E+278 Inexact Rounded
expx1520 exp 0.00000000000000509458922167631071416948112219512224 -> 1.0000000000000050945892216763236915891499324358556 Inexact Rounded
expx1521 exp 6.7670394314315206378625221583973414660727960241395 -> 868.73613012822031367806248697092884415119568271315 Inexact Rounded
expx1522 exp 04.823217407412963506638267226891024138054783122548 -> 124.36457929588837129731821077586705505565904205366 Inexact Rounded
expx1523 exp 193.51307878701196403991208482520115359690106143615 -> 1.1006830872854715677390914655452261550768957576034E+84 Inexact Rounded
expx1524 exp 5.7307749038303650539200345901210497015617393970463 -> 308.20800743106843083522721523715645950574866495196 Inexact Rounded
expx1525 exp 0.00000000000095217825199797965200541169123743500267 -> 1.0000000000009521782519984329737172007991390381273 Inexact Rounded
expx1526 exp 0.00027131440949183370966393682617930153495028919140 -> 1.0002713512185751022906058160480606598754913607364 Inexact Rounded
expx1527 exp 0.00000000064503059114680682343002315662069272707123 -> 1.0000000006450305913548390552323517403613135496633 Inexact Rounded
expx1528 exp 0.00000000000000095616643506527288866235238548440593 -> 1.0000000000000009561664350652733457894781582009094 Inexact Rounded
expx1529 exp 0.00000000000000086449942811678650244459550252743433 -> 1.0000000000000008644994281167868761242261096529986 Inexact Rounded
expx1530 exp 0.06223488355635359965683053157729204988381887621850 -> 1.0642122813392406657789688931838919323826250630831 Inexact Rounded
expx1531 exp 0.00000400710807804429435502657131912308680674057053 -> 1.0000040071161065125925620890019319832127863559260 Inexact Rounded
expx1532 exp 85.522796894744576211573232055494551429297878413017 -> 13870073686404228452757799770251085177.853337368935 Inexact Rounded
expx1533 exp 9.1496720811363678696938036379756663548353399954363 -> 9411.3537122832743386783597629161763057370034495157 Inexact Rounded
expx1534 exp 8.2215705240788294472944382056330516738577785177942 -> 3720.3406813383076953899654701615084425598377758189 Inexact Rounded
expx1535 exp 0.00000000015772064569640613142823203726821076239561 -> 1.0000000001577206457088440324683315788358926129830 Inexact Rounded
expx1536 exp 0.58179346473959531432624153576883440625538017532480 -> 1.7892445018275360163797022372655837188423194863605 Inexact Rounded
expx1537 exp 33.555726197149525061455517784870570470833498096559 -> 374168069896324.62578073148993526626307095854407952 Inexact Rounded
expx1538 exp 9.7898079803906215094140010009583375537259810398659 -> 17850.878119912208888217100998019986634620368538426 Inexact Rounded
expx1539 exp 89.157697327174521542502447953032536541038636966347 -> 525649152320166503771224149330448089550.67293829227 Inexact Rounded
expx1540 exp 25.022947600123328912029051897171319573322888514885 -> 73676343442.952517824345431437683153304645851960524 Inexact Rounded
-- exp(1) at 34
Precision: 34
expx1200 exp 1 -> 2.718281828459045235360287471352662 Inexact Rounded
-- Randoms P=34, within 0-999
Precision: 34
maxExponent: 6144
minExponent: -6143
expx1201 exp 309.5948855821510212996700645087188 -> 2.853319692901387521201738015050724E+134 Inexact Rounded
expx1202 exp 9.936543068706211420422803962680164 -> 20672.15839203171877476511093276022 Inexact Rounded
expx1203 exp 6.307870323881505684429839491707908 -> 548.8747777054637296137277391754665 Inexact Rounded
expx1204 exp 0.0003543281389438420535201308282503 -> 1.000354390920573746164733350843155 Inexact Rounded
expx1205 exp 0.0000037087453363918375598394920229 -> 1.000003708752213796324841920189323 Inexact Rounded
expx1206 exp 0.0020432312687512438040222444116585 -> 1.002045320088164826013561630975308 Inexact Rounded
expx1207 exp 6.856313340032177672550343216129586 -> 949.8587981604144147983589660524396 Inexact Rounded
expx1208 exp 0.0000000000402094928333815643326418 -> 1.000000000040209492834189965989612 Inexact Rounded
expx1209 exp 0.0049610784722412117632647003545839 -> 1.004973404997901987039589029277833 Inexact Rounded
expx1210 exp 0.0000891471883724066909746786702686 -> 1.000089151162101085412780088266699 Inexact Rounded
expx1211 exp 08.59979170376061890684723211112566 -> 5430.528314920905714615339273738097 Inexact Rounded
expx1212 exp 9.473117039341003854872778112752590 -> 13005.36234331224953460055897913917 Inexact Rounded
expx1213 exp 0.0999060724692207648429969999310118 -> 1.105067116975190602296052700726802 Inexact Rounded
expx1214 exp 0.0000000927804533555877884082269247 -> 1.000000092780457659694183954740772 Inexact Rounded
expx1215 exp 0.0376578583872889916298772818265677 -> 1.038375900489771946477857818447556 Inexact Rounded
expx1216 exp 261.6896411697539524911536116712307 -> 4.470613562127465095241600174941460E+113 Inexact Rounded
expx1217 exp 0.0709997423269162980875824213889626 -> 1.073580949235407949417814485533172 Inexact Rounded
expx1218 exp 0.0000000444605583295169895235658731 -> 1.000000044460559317887627657593900 Inexact Rounded
expx1219 exp 0.0000021224072854777512281369815185 -> 1.000002122409537785687390631070906 Inexact Rounded
expx1220 exp 547.5174462574156885473558485475052 -> 6.078629247383807942612114579728672E+237 Inexact Rounded
expx1221 exp 0.0000009067598041615192002339844670 -> 1.000000906760215268314680115374387 Inexact Rounded
expx1222 exp 0.0316476500308065365803455533244603 -> 1.032153761880187977658387961769034 Inexact Rounded
expx1223 exp 84.46160530377645101833996706384473 -> 4.799644995897968383503269871697856E+36 Inexact Rounded
expx1224 exp 0.0000000000520599740290848018904145 -> 1.000000000052059974030439922338393 Inexact Rounded
expx1225 exp 0.0000006748530640093620665651726708 -> 1.000000674853291722742292331812997 Inexact Rounded
expx1226 exp 0.0000000116853119761042020507916169 -> 1.000000011685312044377460306165203 Inexact Rounded
expx1227 exp 0.0022593818094258636727616886693280 -> 1.002261936135876893707094845543461 Inexact Rounded
expx1228 exp 0.0029398857673478912249856509667517 -> 1.002944211469495086813087651287012 Inexact Rounded
expx1229 exp 0.7511480029928802775376270557636963 -> 2.119431734510320169806976569366789 Inexact Rounded
expx1230 exp 174.9431952176750671150886423048447 -> 9.481222305374955011464619468044051E+75 Inexact Rounded
expx1231 exp 0.0000810612451694136129199895164424 -> 1.000081064530720924186615149646920 Inexact Rounded
expx1232 exp 51.06888989702669288180946272499035 -> 15098613888619165073959.89896018749 Inexact Rounded
expx1233 exp 0.0000000005992887599437093651494510 -> 1.000000000599288760123282874082758 Inexact Rounded
expx1234 exp 714.8549046761054856311108828903972 -> 2.867744544891081117381595080480784E+310 Inexact Rounded
expx1235 exp 0.0000000004468247802990643645607110 -> 1.000000000446824780398890556720233 Inexact Rounded
expx1236 exp 831.5818151589890366323551672043709 -> 1.417077409182624969435938062261655E+361 Inexact Rounded
expx1237 exp 0.0000000006868323825179605747108044 -> 1.000000000686832382753829935602454 Inexact Rounded
expx1238 exp 0.0000001306740266408976840228440255 -> 1.000000130674035178748675187648098 Inexact Rounded
expx1239 exp 0.3182210609022267704811502412335163 -> 1.374680115667798185758927247894859 Inexact Rounded
expx1240 exp 0.0147741234179104437440264644295501 -> 1.014883800239950682628277534839222 Inexact Rounded
-- Randoms P=16, within 0-99
Precision: 16
maxExponent: 384
minExponent: -383
expx1101 exp 8.473011527013724 -> 4783.900643969246 Inexact Rounded
expx1102 exp 0.0000055753022764 -> 1.000005575317818 Inexact Rounded
expx1103 exp 0.0000323474114482 -> 1.000032347934631 Inexact Rounded
expx1104 exp 64.54374138544166 -> 1.073966476173531E+28 Inexact Rounded
expx1105 exp 90.47203246416569 -> 1.956610887250643E+39 Inexact Rounded
expx1106 exp 9.299931532342757 -> 10937.27033325227 Inexact Rounded
expx1107 exp 8.759678437852203 -> 6372.062234495381 Inexact Rounded
expx1108 exp 0.0000931755127172 -> 1.000093179853690 Inexact Rounded
expx1109 exp 0.0000028101158373 -> 1.000002810119786 Inexact Rounded
expx1110 exp 0.0000008008130919 -> 1.000000800813413 Inexact Rounded
expx1111 exp 8.339771722299049 -> 4187.133803081878 Inexact Rounded
expx1112 exp 0.0026140497995474 -> 1.002617469406750 Inexact Rounded
expx1113 exp 0.7478033356261771 -> 2.112354781975418 Inexact Rounded
expx1114 exp 51.77663761827966 -> 3.064135801120365E+22 Inexact Rounded
expx1115 exp 0.1524989783061012 -> 1.164741272084955 Inexact Rounded
expx1116 exp 0.0066298798669219 -> 1.006651906170791 Inexact Rounded
expx1117 exp 9.955141865534960 -> 21060.23334287038 Inexact Rounded
expx1118 exp 92.34503059198483 -> 1.273318993481226E+40 Inexact Rounded
expx1119 exp 0.0000709388677346 -> 1.000070941383956 Inexact Rounded
expx1120 exp 79.12883036433204 -> 2.318538899389243E+34 Inexact Rounded
expx1121 exp 0.0000090881548873 -> 1.000009088196185 Inexact Rounded
expx1122 exp 0.0424828809603411 -> 1.043398194245720 Inexact Rounded
expx1123 exp 0.8009035891427416 -> 2.227552811933310 Inexact Rounded
expx1124 exp 8.825786167283102 -> 6807.540455289995 Inexact Rounded
expx1125 exp 1.535457249746275 -> 4.643448260146849 Inexact Rounded
expx1126 exp 69.02254254355800 -> 9.464754500670653E+29 Inexact Rounded
expx1127 exp 0.0007050554368713 -> 1.000705304046880 Inexact Rounded
expx1128 exp 0.0000081206549504 -> 1.000008120687923 Inexact Rounded
expx1129 exp 0.621774854641137 -> 1.862230298554903 Inexact Rounded
expx1130 exp 3.847629031404354 -> 46.88177613568203 Inexact Rounded
expx1131 exp 24.81250184697732 -> 59694268456.19966 Inexact Rounded
expx1132 exp 5.107546500516044 -> 165.2643809755670 Inexact Rounded
expx1133 exp 79.17810943951986 -> 2.435656372541360E+34 Inexact Rounded
expx1134 exp 0.0051394695667015 -> 1.005152699295301 Inexact Rounded
expx1135 exp 57.44504488501725 -> 8.872908566929688E+24 Inexact Rounded
expx1136 exp 0.0000508388968036 -> 1.000050840189122 Inexact Rounded
expx1137 exp 69.71309932148997 -> 1.888053740693541E+30 Inexact Rounded
expx1138 exp 0.0064183412981502 -> 1.006438982988835 Inexact Rounded
expx1139 exp 9.346991220814677 -> 11464.27802035082 Inexact Rounded
expx1140 exp 33.09087139999152 -> 235062229168763.5 Inexact Rounded
-- Randoms P=7, within 0-9
Precision: 7
maxExponent: 96
minExponent: -95
expx1001 exp 2.395441 -> 10.97304 Inexact Rounded
expx1002 exp 0.6406779 -> 1.897767 Inexact Rounded
expx1003 exp 0.5618218 -> 1.753865 Inexact Rounded
expx1004 exp 3.055120 -> 21.22373 Inexact Rounded
expx1005 exp 1.536792 -> 4.649650 Inexact Rounded
expx1006 exp 0.0801591 -> 1.083459 Inexact Rounded
expx1007 exp 0.0966875 -> 1.101516 Inexact Rounded
expx1008 exp 0.0646761 -> 1.066813 Inexact Rounded
expx1009 exp 0.0095670 -> 1.009613 Inexact Rounded
expx1010 exp 2.956859 -> 19.23745 Inexact Rounded
expx1011 exp 7.504679 -> 1816.522 Inexact Rounded
expx1012 exp 0.0045259 -> 1.004536 Inexact Rounded
expx1013 exp 3.810071 -> 45.15364 Inexact Rounded
expx1014 exp 1.502390 -> 4.492413 Inexact Rounded
expx1015 exp 0.0321523 -> 1.032675 Inexact Rounded
expx1016 exp 0.0057214 -> 1.005738 Inexact Rounded
expx1017 exp 9.811445 -> 18241.33 Inexact Rounded
expx1018 exp 3.245249 -> 25.66810 Inexact Rounded
expx1019 exp 0.3189742 -> 1.375716 Inexact Rounded
expx1020 exp 0.8621610 -> 2.368273 Inexact Rounded
expx1021 exp 0.0122511 -> 1.012326 Inexact Rounded
expx1022 exp 2.202088 -> 9.043877 Inexact Rounded
expx1023 exp 8.778203 -> 6491.202 Inexact Rounded
expx1024 exp 0.1896279 -> 1.208800 Inexact Rounded
expx1025 exp 0.4510947 -> 1.570030 Inexact Rounded
expx1026 exp 0.276413 -> 1.318392 Inexact Rounded
expx1027 exp 4.490067 -> 89.12742 Inexact Rounded
expx1028 exp 0.0439786 -> 1.044960 Inexact Rounded
expx1029 exp 0.8168245 -> 2.263301 Inexact Rounded
expx1030 exp 0.0391658 -> 1.039943 Inexact Rounded
expx1031 exp 9.261816 -> 10528.24 Inexact Rounded
expx1032 exp 9.611186 -> 14930.87 Inexact Rounded
expx1033 exp 9.118125 -> 9119.087 Inexact Rounded
expx1034 exp 9.469083 -> 12953.00 Inexact Rounded
expx1035 exp 0.0499983 -> 1.051269 Inexact Rounded
expx1036 exp 0.0050746 -> 1.005087 Inexact Rounded
expx1037 exp 0.0014696 -> 1.001471 Inexact Rounded
expx1038 exp 9.138494 -> 9306.739 Inexact Rounded
expx1039 exp 0.0065436 -> 1.006565 Inexact Rounded
expx1040 exp 0.7284803 -> 2.071930 Inexact Rounded

View File

@@ -0,0 +1,215 @@
------------------------------------------------------------------------
-- inexact.decTest -- decimal inexact and rounded edge cases --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
precision: 9
rounding: half_up
maxExponent: 999
minexponent: -999
inx001 add 1 1 -> 2
inx002 add 123456789 0 -> 123456789
inx003 add 123456789 0.0 -> 123456789 Rounded
inx004 add 123456789 0.00 -> 123456789 Rounded
inx005 add 123456789 1 -> 123456790
inx006 add 123456789 0.1 -> 123456789 Inexact Rounded
inx007 add 123456789 0.01 -> 123456789 Inexact Rounded
inx008 add 123456789 0.001 -> 123456789 Inexact Rounded
inx009 add 123456789 0.000001 -> 123456789 Inexact Rounded
inx010 add 123456789 0.000000001 -> 123456789 Inexact Rounded
inx011 add 123456789 0.000000000001 -> 123456789 Inexact Rounded
inx012 add 123456789 0.9 -> 123456790 Inexact Rounded
inx013 add 123456789 0.09 -> 123456789 Inexact Rounded
inx014 add 123456789 0.009 -> 123456789 Inexact Rounded
inx015 add 123456789 0.000009 -> 123456789 Inexact Rounded
inx016 add 123456789 0.000000009 -> 123456789 Inexact Rounded
inx017 add 123456789 0.000000000009 -> 123456789 Inexact Rounded
inx021 add 1 -1 -> 0
inx022 add 123456789 -0 -> 123456789
inx023 add 123456789 -0.0 -> 123456789 Rounded
inx024 add 123456789 -0.00 -> 123456789 Rounded
inx025 add 123456789 -1 -> 123456788
inx026 add 123456789 -0.1 -> 123456789 Inexact Rounded
inx027 add 123456789 -0.01 -> 123456789 Inexact Rounded
inx028 add 123456789 -0.001 -> 123456789 Inexact Rounded
inx029 add 123456789 -0.000001 -> 123456789 Inexact Rounded
inx030 add 123456789 -0.000000001 -> 123456789 Inexact Rounded
inx031 add 123456789 -0.000000000001 -> 123456789 Inexact Rounded
inx032 add 123456789 -0.9 -> 123456788 Inexact Rounded
inx033 add 123456789 -0.09 -> 123456789 Inexact Rounded
inx034 add 123456789 -0.009 -> 123456789 Inexact Rounded
inx035 add 123456789 -0.000009 -> 123456789 Inexact Rounded
inx036 add 123456789 -0.000000009 -> 123456789 Inexact Rounded
inx037 add 123456789 -0.000000000009 -> 123456789 Inexact Rounded
inx042 add 0 123456789 -> 123456789
inx043 add 0.0 123456789 -> 123456789 Rounded
inx044 add 0.00 123456789 -> 123456789 Rounded
inx045 add 1 123456789 -> 123456790
inx046 add 0.1 123456789 -> 123456789 Inexact Rounded
inx047 add 0.01 123456789 -> 123456789 Inexact Rounded
inx048 add 0.001 123456789 -> 123456789 Inexact Rounded
inx049 add 0.000001 123456789 -> 123456789 Inexact Rounded
inx050 add 0.000000001 123456789 -> 123456789 Inexact Rounded
inx051 add 0.000000000001 123456789 -> 123456789 Inexact Rounded
inx052 add 0.9 123456789 -> 123456790 Inexact Rounded
inx053 add 0.09 123456789 -> 123456789 Inexact Rounded
inx054 add 0.009 123456789 -> 123456789 Inexact Rounded
inx055 add 0.000009 123456789 -> 123456789 Inexact Rounded
inx056 add 0.000000009 123456789 -> 123456789 Inexact Rounded
inx057 add 0.000000000009 123456789 -> 123456789 Inexact Rounded
inx062 add -0 123456789 -> 123456789
inx063 add -0.0 123456789 -> 123456789 Rounded
inx064 add -0.00 123456789 -> 123456789 Rounded
inx065 add -1 123456789 -> 123456788
inx066 add -0.1 123456789 -> 123456789 Inexact Rounded
inx067 add -0.01 123456789 -> 123456789 Inexact Rounded
inx068 add -0.001 123456789 -> 123456789 Inexact Rounded
inx069 add -0.000001 123456789 -> 123456789 Inexact Rounded
inx070 add -0.000000001 123456789 -> 123456789 Inexact Rounded
inx071 add -0.000000000001 123456789 -> 123456789 Inexact Rounded
inx072 add -0.9 123456789 -> 123456788 Inexact Rounded
inx073 add -0.09 123456789 -> 123456789 Inexact Rounded
inx074 add -0.009 123456789 -> 123456789 Inexact Rounded
inx075 add -0.000009 123456789 -> 123456789 Inexact Rounded
inx076 add -0.000000009 123456789 -> 123456789 Inexact Rounded
inx077 add -0.000000000009 123456789 -> 123456789 Inexact Rounded
-- some boundaries
inx081 add 999999999 0 -> 999999999
inx082 add 0.999999999 0.000000000 -> 0.999999999
inx083 add 999999999 1 -> 1.00000000E+9 Rounded
inx084 add 0.999999999 0.000000001 -> 1.00000000 Rounded
inx085 add 999999999 2 -> 1.00000000E+9 Inexact Rounded
inx086 add 0.999999999 0.000000002 -> 1.00000000 Inexact Rounded
inx087 add 999999999 3 -> 1.00000000E+9 Inexact Rounded
inx089 add 0.999999999 0.000000003 -> 1.00000000 Inexact Rounded
-- minus, plus, and subtract all assumed to work like add.
-- multiply
precision: 8
inx101 multiply 1000 1000 -> 1000000
inx102 multiply 9000 9000 -> 81000000
inx103 multiply 9999 9999 -> 99980001
inx104 multiply 1000 10000 -> 10000000
inx105 multiply 10000 10000 -> 1.0000000E+8 Rounded
inx106 multiply 10001 10000 -> 1.0001000E+8 Rounded
inx107 multiply 10001 10001 -> 1.0002000E+8 Inexact Rounded
inx108 multiply 10101 10001 -> 1.0102010E+8 Inexact Rounded
inx109 multiply 10001 10101 -> 1.0102010E+8 Inexact Rounded
-- divide
precision: 4
inx201 divide 1000 1000 -> 1
inx202 divide 1000 1 -> 1000
inx203 divide 1000 2 -> 500
inx204 divide 1000 3 -> 333.3 Inexact Rounded
inx205 divide 1000 4 -> 250
inx206 divide 1000 5 -> 200
inx207 divide 1000 6 -> 166.7 Inexact Rounded
inx208 divide 1000 7 -> 142.9 Inexact Rounded
inx209 divide 1000 8 -> 125
inx210 divide 1000 9 -> 111.1 Inexact Rounded
inx211 divide 1000 10 -> 100
inx220 divide 1 1 -> 1
inx221 divide 1 2 -> 0.5
inx222 divide 1 4 -> 0.25
inx223 divide 1 8 -> 0.125
inx224 divide 1 16 -> 0.0625
inx225 divide 1 32 -> 0.03125
inx226 divide 1 64 -> 0.01563 Inexact Rounded
inx227 divide 1 128 -> 0.007813 Inexact Rounded
precision: 5
inx230 divide 1 1 -> 1
inx231 divide 1 2 -> 0.5
inx232 divide 1 4 -> 0.25
inx233 divide 1 8 -> 0.125
inx234 divide 1 16 -> 0.0625
inx235 divide 1 32 -> 0.03125
inx236 divide 1 64 -> 0.015625
inx237 divide 1 128 -> 0.0078125
precision: 3
inx240 divide 1 1 -> 1
inx241 divide 1 2 -> 0.5
inx242 divide 1 4 -> 0.25
inx243 divide 1 8 -> 0.125
inx244 divide 1 16 -> 0.0625
inx245 divide 1 32 -> 0.0313 Inexact Rounded
inx246 divide 1 64 -> 0.0156 Inexact Rounded
inx247 divide 1 128 -> 0.00781 Inexact Rounded
precision: 2
inx250 divide 1 1 -> 1
inx251 divide 1 2 -> 0.5
inx252 divide 1 4 -> 0.25
inx253 divide 1 8 -> 0.13 Inexact Rounded
inx254 divide 1 16 -> 0.063 Inexact Rounded
inx255 divide 1 32 -> 0.031 Inexact Rounded
inx256 divide 1 64 -> 0.016 Inexact Rounded
inx257 divide 1 128 -> 0.0078 Inexact Rounded
precision: 1
inx260 divide 1 1 -> 1
inx261 divide 1 2 -> 0.5
inx262 divide 1 4 -> 0.3 Inexact Rounded
inx263 divide 1 8 -> 0.1 Inexact Rounded
inx264 divide 1 16 -> 0.06 Inexact Rounded
inx265 divide 1 32 -> 0.03 Inexact Rounded
inx266 divide 1 64 -> 0.02 Inexact Rounded
inx267 divide 1 128 -> 0.008 Inexact Rounded
-- power
precision: 4
inx301 power 0.5 2 -> 0.25
inx302 power 0.5 4 -> 0.0625
inx303 power 0.5 8 -> 0.003906 Inexact Rounded
inx304 power 0.5 16 -> 0.00001526 Inexact Rounded
inx305 power 0.5 32 -> 2.328E-10 Inexact Rounded
-- compare, divideInteger, and remainder are always exact
-- rescale
precision: 4
inx401 rescale 0 0 -> 0
inx402 rescale 1 0 -> 1
inx403 rescale 0.1 +2 -> 0E+2 Inexact Rounded
inx404 rescale 0.1 +1 -> 0E+1 Inexact Rounded
inx405 rescale 0.1 0 -> 0 Inexact Rounded
inx406 rescale 0.1 -1 -> 0.1
inx407 rescale 0.1 -2 -> 0.10
-- long operands cause rounding too
precision: 9
inx801 plus 123456789 -> 123456789
inx802 plus 1234567890 -> 1.23456789E+9 Rounded
inx803 plus 1234567891 -> 1.23456789E+9 Inexact Rounded
inx804 plus 1234567892 -> 1.23456789E+9 Inexact Rounded
inx805 plus 1234567899 -> 1.23456790E+9 Inexact Rounded
inx806 plus 1234567900 -> 1.23456790E+9 Rounded

View File

@@ -0,0 +1,611 @@
------------------------------------------------------------------------
-- ln.decTest -- decimal natural logarithm --
-- Copyright (c) IBM Corporation, 2005, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
precision: 16
rounding: half_even
maxExponent: 384
minexponent: -383
-- basics (examples in specification)
precision: 9
lnxs001 ln 0 -> -Infinity
lnxs002 ln 1.000 -> 0
lnxs003 ln 2.71828183 -> 1.00000000 Inexact Rounded
lnxs004 ln 10 -> 2.30258509 Inexact Rounded
lnxs005 ln +Infinity -> Infinity
-- basics
precision: 16
lnx0001 ln 0 -> -Infinity
lnx0002 ln 1E-9 -> -20.72326583694641 Inexact Rounded
lnx0003 ln 0.0007 -> -7.264430222920869 Inexact Rounded
lnx0004 ln 0.1 -> -2.302585092994046 Inexact Rounded
lnx0005 ln 0.7 -> -0.3566749439387324 Inexact Rounded
lnx0006 ln 1 -> 0
lnx0007 ln 1.000 -> 0
lnx0008 ln 1.5 -> 0.4054651081081644 Inexact Rounded
lnx0009 ln 2 -> 0.6931471805599453 Inexact Rounded
lnx0010 ln 2.718281828459045 -> 0.9999999999999999 Inexact Rounded
lnx0011 ln 2.718281828459046 -> 1.000000000000000 Inexact Rounded
lnx0012 ln 2.718281828459047 -> 1.000000000000001 Inexact Rounded
lnx0013 ln 10 -> 2.302585092994046 Inexact Rounded
lnx0014 ln 10.5 -> 2.351375257163478 Inexact Rounded
lnx0015 ln 9999 -> 9.210240366975849 Inexact Rounded
lnx0016 ln 1E6 -> 13.81551055796427 Inexact Rounded
lnx0017 ln 1E+9 -> 20.72326583694641 Inexact Rounded
lnx0018 ln +Infinity -> Infinity
-- notable cases
-- negatives
lnx0021 ln -1E-9 -> NaN Invalid_operation
lnx0022 ln -0.0007 -> NaN Invalid_operation
lnx0023 ln -0.1 -> NaN Invalid_operation
lnx0024 ln -0.7 -> NaN Invalid_operation
lnx0025 ln -1 -> NaN Invalid_operation
lnx0026 ln -1.5 -> NaN Invalid_operation
lnx0027 ln -2 -> NaN Invalid_operation
lnx0029 ln -10.5 -> NaN Invalid_operation
lnx0028 ln -9999 -> NaN Invalid_operation
lnx0030 ln -2.718281828459045 -> NaN Invalid_operation
lnx0031 ln -2.718281828459046 -> NaN Invalid_operation
lnx0032 ln -0 -> -Infinity
lnx0033 ln -0E+17 -> -Infinity
lnx0034 ln -0E-17 -> -Infinity
-- other zeros
lnx0041 ln 0 -> -Infinity
lnx0042 ln 0E+17 -> -Infinity
lnx0043 ln 0E-17 -> -Infinity
-- infinities
lnx0045 ln -Infinity -> NaN Invalid_operation
lnx0046 ln +Infinity -> Infinity
-- ones
lnx0050 ln 1 -> 0
lnx0051 ln 1.0 -> 0
lnx0052 ln 1.000000000000000 -> 0
lnx0053 ln 1.000000000000000000 -> 0
-- lower precision basics
Precision: 7
lnx0101 ln 0 -> -Infinity
lnx0102 ln 1E-9 -> -20.72327 Inexact Rounded
lnx0103 ln 0.0007 -> -7.264430 Inexact Rounded
lnx0104 ln 0.1 -> -2.302585 Inexact Rounded
lnx0105 ln 0.7 -> -0.3566749 Inexact Rounded
lnx0106 ln 1 -> 0
lnx0107 ln 1.5 -> 0.4054651 Inexact Rounded
lnx0108 ln 2 -> 0.6931472 Inexact Rounded
lnx0109 ln 2.718281828459045 -> 1.000000 Inexact Rounded
lnx0110 ln 2.718281828459046 -> 1.000000 Inexact Rounded
lnx0111 ln 2.718281828459047 -> 1.000000 Inexact Rounded
lnx0112 ln 10 -> 2.302585 Inexact Rounded
lnx0113 ln 10.5 -> 2.351375 Inexact Rounded
lnx0114 ln 9999 -> 9.210240 Inexact Rounded
lnx0115 ln 1E6 -> 13.81551 Inexact Rounded
lnx0116 ln 1E+9 -> 20.72327 Inexact Rounded
lnx0117 ln +Infinity -> Infinity
Precision: 2
lnx0121 ln 0 -> -Infinity
lnx0122 ln 1E-9 -> -21 Inexact Rounded
lnx0123 ln 0.0007 -> -7.3 Inexact Rounded
lnx0124 ln 0.1 -> -2.3 Inexact Rounded
lnx0125 ln 0.7 -> -0.36 Inexact Rounded
lnx0126 ln 1 -> 0
lnx0127 ln 1.5 -> 0.41 Inexact Rounded
lnx0128 ln 2 -> 0.69 Inexact Rounded
lnx0129 ln 2.718281828459045 -> 1.0 Inexact Rounded
lnx0130 ln 2.718281828459046 -> 1.0 Inexact Rounded
lnx0131 ln 2.718281828459047 -> 1.0 Inexact Rounded
lnx0132 ln 10 -> 2.3 Inexact Rounded
lnx0133 ln 10.5 -> 2.4 Inexact Rounded
lnx0134 ln 9999 -> 9.2 Inexact Rounded
lnx0135 ln 1E6 -> 14 Inexact Rounded
lnx0136 ln 1E+9 -> 21 Inexact Rounded
lnx0137 ln +Infinity -> Infinity
Precision: 1
lnx0141 ln 0 -> -Infinity
lnx0142 ln 1E-9 -> -2E+1 Inexact Rounded
lnx0143 ln 0.0007 -> -7 Inexact Rounded
lnx0144 ln 0.1 -> -2 Inexact Rounded
lnx0145 ln 0.7 -> -0.4 Inexact Rounded
lnx0146 ln 1 -> 0
lnx0147 ln 1.5 -> 0.4 Inexact Rounded
lnx0148 ln 2 -> 0.7 Inexact Rounded
lnx0149 ln 2.718281828459045 -> 1 Inexact Rounded
lnx0150 ln 2.718281828459046 -> 1 Inexact Rounded
lnx0151 ln 2.718281828459047 -> 1 Inexact Rounded
lnx0152 ln 10 -> 2 Inexact Rounded
lnx0153 ln 10.5 -> 2 Inexact Rounded
lnx0154 ln 9999 -> 9 Inexact Rounded
lnx0155 ln 1E6 -> 1E+1 Inexact Rounded
lnx0156 ln 1E+9 -> 2E+1 Inexact Rounded
lnx0157 ln +Infinity -> Infinity
-- group low-precision ln(1)s:
precision: 1
lnx0161 ln 1 -> 0
precision: 2
lnx0162 ln 1 -> 0
precision: 3
lnx0163 ln 1 -> 0
precision: 4
lnx0164 ln 1 -> 0
precision: 5
lnx0165 ln 1 -> 0
precision: 6
lnx0166 ln 1 -> 0
precision: 7
lnx0167 ln 1 -> 0
precision: 8
lnx0168 ln 1 -> 0
-- edge-test ln(2) and ln(10) in case of lookasides
precision: 45
lnx201 ln 2 -> 0.693147180559945309417232121458176568075500134 Inexact Rounded
lnx202 ln 10 -> 2.30258509299404568401799145468436420760110149 Inexact Rounded
precision: 44
lnx203 ln 2 -> 0.69314718055994530941723212145817656807550013 Inexact Rounded
lnx204 ln 10 -> 2.3025850929940456840179914546843642076011015 Inexact Rounded
precision: 43
lnx205 ln 2 -> 0.6931471805599453094172321214581765680755001 Inexact Rounded
lnx206 ln 10 -> 2.302585092994045684017991454684364207601101 Inexact Rounded
precision: 42
lnx207 ln 2 -> 0.693147180559945309417232121458176568075500 Inexact Rounded
lnx208 ln 10 -> 2.30258509299404568401799145468436420760110 Inexact Rounded
precision: 41
lnx209 ln 2 -> 0.69314718055994530941723212145817656807550 Inexact Rounded
lnx210 ln 10 -> 2.3025850929940456840179914546843642076011 Inexact Rounded
precision: 40
lnx211 ln 2 -> 0.6931471805599453094172321214581765680755 Inexact Rounded
lnx212 ln 10 -> 2.302585092994045684017991454684364207601 Inexact Rounded
precision: 39
lnx213 ln 2 -> 0.693147180559945309417232121458176568076 Inexact Rounded
lnx214 ln 10 -> 2.30258509299404568401799145468436420760 Inexact Rounded
precision: 38
lnx215 ln 2 -> 0.69314718055994530941723212145817656808 Inexact Rounded
lnx216 ln 10 -> 2.3025850929940456840179914546843642076 Inexact Rounded
precision: 37
lnx217 ln 2 -> 0.6931471805599453094172321214581765681 Inexact Rounded
lnx218 ln 10 -> 2.302585092994045684017991454684364208 Inexact Rounded
precision: 36
lnx219 ln 2 -> 0.693147180559945309417232121458176568 Inexact Rounded
lnx220 ln 10 -> 2.30258509299404568401799145468436421 Inexact Rounded
precision: 35
lnx221 ln 2 -> 0.69314718055994530941723212145817657 Inexact Rounded
lnx222 ln 10 -> 2.3025850929940456840179914546843642 Inexact Rounded
precision: 34
lnx223 ln 2 -> 0.6931471805599453094172321214581766 Inexact Rounded
lnx224 ln 10 -> 2.302585092994045684017991454684364 Inexact Rounded
precision: 33
lnx225 ln 2 -> 0.693147180559945309417232121458177 Inexact Rounded
lnx226 ln 10 -> 2.30258509299404568401799145468436 Inexact Rounded
precision: 32
lnx227 ln 2 -> 0.69314718055994530941723212145818 Inexact Rounded
lnx228 ln 10 -> 2.3025850929940456840179914546844 Inexact Rounded
precision: 31
lnx229 ln 2 -> 0.6931471805599453094172321214582 Inexact Rounded
lnx230 ln 10 -> 2.302585092994045684017991454684 Inexact Rounded
precision: 30
lnx231 ln 2 -> 0.693147180559945309417232121458 Inexact Rounded
lnx232 ln 10 -> 2.30258509299404568401799145468 Inexact Rounded
-- extreme input range values
maxExponent: 384
minExponent: -383
Precision: 16
lnx0901 ln 1e-400 -> -921.0340371976183 Inexact Rounded
lnx0902 ln 1e+400 -> 921.0340371976183 Inexact Rounded
lnx0903 ln 1e-999999 -> -2302582.790408953 Inexact Rounded
lnx0904 ln 1e+999999 -> 2302582.790408953 Inexact Rounded
lnx0905 ln 1e-1000013 -> -2302615.026600255 Inexact Rounded
lnx0906 ln 2e-1000013 -> -2302614.333453074 Inexact Rounded
lnx0910 ln 9.999999e+999999 -> 2302585.092993946 Inexact Rounded
lnx0911 ln 9.9999999e+999999 -> 2302585.092994036 Inexact Rounded
lnx0912 ln 9.99999999e+999999 -> 2302585.092994045 Inexact Rounded
lnx0913 ln 9.999999999e+999999 -> 2302585.092994046 Inexact Rounded
lnx0914 ln 9.999999999999e+999999 -> 2302585.092994046 Inexact Rounded
lnx0915 ln 9.999999999999999e+999999 -> 2302585.092994046 Inexact Rounded
lnx0916 ln 9.999999999999999999999999e+999999 -> 2302585.092994046 Inexact Rounded
-- randoms
-- P=50, within 0-999
Precision: 50
maxExponent: 384
minExponent: -383
lnx1501 ln 0.00098800906574486388604608477869812518857023768951 -> -6.9198186844033787995945147836955586009548513043689 Inexact Rounded
lnx1502 ln 158.15866624664623070184595045304145949900714987827 -> 5.0635987458895647454907806507503825602758392287684 Inexact Rounded
lnx1503 ln 0.00565661412059571925040285814021799775249288309321 -> -5.1749297776760632102047540300491550931651318975237 Inexact Rounded
lnx1504 ln 0.00000006914232532620489602008402091666547903180607 -> -16.487098770877825308138976818688771638172333034347 Inexact Rounded
lnx1505 ln 0.00025380374621297657504661540749355251231770070723 -> -8.2789492423005003205242162741569033124260321954589 Inexact Rounded
lnx1506 ln 83.033654063877426261108592599182418953442677554806 -> 4.4192459962647137976949249810815698465031609843669 Inexact Rounded
lnx1507 ln 0.00000000416863228092481651627734668440663678118729 -> -19.295677845122141772791294599714950175284915666430 Inexact Rounded
lnx1508 ln 0.00000140847873187820570181214271960511080523457669 -> -13.473000349581967189668305314384952251556809480339 Inexact Rounded
lnx1509 ln 66.176106555181527101630351127583944689752069132522 -> 4.1923194696232505883666171116966137694013431504252 Inexact Rounded
lnx1510 ln 0.00000000000009899043487403590900111602024562297908 -> -29.943753166877840985821508112917991506656545174163 Inexact Rounded
lnx1511 ln 0.00000000000324618296721747097510453388683912733569 -> -26.453541281444586819009546418577507163362590139422 Inexact Rounded
lnx1512 ln 72.646968818463546449499147579023555008392860423385 -> 4.2856116660689646882852128853423566276718230426479 Inexact Rounded
lnx1513 ln 0.00000000000000066755483124635612574263153825990523 -> -34.942910142802769319262875080398852491588707172483 Inexact Rounded
lnx1514 ln 61.002910447202398204114909451851111424657671911002 -> 4.1109215752843377323363182051446177066434038096529 Inexact Rounded
lnx1515 ln 917.06917611331980999227893584010544542312239174774 -> 6.8211829068303114128752453661946446979787826282907 Inexact Rounded
lnx1516 ln 0.00000000170823794883673083358549749078972003965194 -> -20.187803436976150477297246666771626827057191023004 Inexact Rounded
lnx1517 ln 0.53731767845358224445809761315159249898566542910649 -> -0.62116577939968409211736413628236285160048357000961 Inexact Rounded
lnx1518 ln 0.00000000000000008965291392882804161299758708033373 -> -36.950585970980857376081265073276303670820056916206 Inexact Rounded
lnx1519 ln 0.00000000006990244916026429904498278982530170295668 -> -23.383920429244457578373523508427783144589480420753 Inexact Rounded
lnx1520 ln 4.0312542977070300070506064666536478373801988540614 -> 1.3940775676592451945795752796421391871302024763305 Inexact Rounded
lnx1521 ln 271.84991311551875601432518819562391699324632396423 -> 5.6052501239873862517916679747146539808077431873478 Inexact Rounded
lnx1522 ln 7.4118671629373864667229445746862314443895404818689 -> 2.0030823863706344628239147639318289961917060121141 Inexact Rounded
lnx1523 ln 0.00000000000002026311452625364905357321664186034258 -> -31.529974180054438792043856877314043794320951134754 Inexact Rounded
lnx1524 ln 0.00000000000009563398651261756952398250624737809347 -> -29.978248130576972953141284136962670021368834792579 Inexact Rounded
lnx1525 ln 0.00000000009556772669409858653026558223465197808991 -> -23.071185939748285541228206161472956661196956741186 Inexact Rounded
lnx1526 ln 6.8441648298027301292342057248737326152250794026761 -> 1.9233964395801946597272589473417948024361005082908 Inexact Rounded
lnx1527 ln 0.00000000000073059699884439979394945822035704264577 -> -27.944914388353724718836101828677771967128509603158 Inexact Rounded
lnx1528 ln 0.00000000000000002610078280419082263138064745416787 -> -38.184566367516207885573773320135965798717120735115 Inexact Rounded
lnx1529 ln 0.00000000000000000150259517166294243088546806083283 -> -41.039337946266676108538170837580051699618334928421 Inexact Rounded
lnx1530 ln 0.00000000000000087919160541714580707181969708502091 -> -34.667528818827671507514319744047440696187358676848 Inexact Rounded
lnx1531 ln 0.00000000000395726725120787763271849577708068584598 -> -26.255467416961357741818735787226671938678424748431 Inexact Rounded
lnx1532 ln 0.00000000002014334901669366218018377213150715938355 -> -24.628146955635359035289123027319969201693737159108 Inexact Rounded
lnx1533 ln 0.00000008097927101101093117753938766241442896030637 -> -16.329072628469715178637178365710373398203190937454 Inexact Rounded
lnx1534 ln 0.00000000000017115834162632864392039668116243984176 -> -29.396187292434898225453626794459285157263177528034 Inexact Rounded
lnx1535 ln 0.39168317593866334087305459933723864294857086105035 -> -0.93730199062757240485836637306785037368746737693029 Inexact Rounded
lnx1536 ln 79.335036798971515026519630103325369729637514127617 -> 4.3736798570287828823772149735170431010616961976965 Inexact Rounded
lnx1537 ln 0.00000000000000056004952129926137413602116591493625 -> -35.118506463181870020730685884333000241039028127213 Inexact Rounded
lnx1538 ln 0.00000006006035907843890918832481099660639553666078 -> -16.627915795747112566532705974853114454405010472043 Inexact Rounded
lnx1539 ln 0.00000000085242024937414906371333826574632450587590 -> -20.882941460268101080186482230657774997273494107221 Inexact Rounded
lnx1540 ln 0.00000000000043671099499262350316173246550771951561 -> -28.459504757285639221776305968469058854558726593945 Inexact Rounded
-- P=34, within 0-999
Precision: 34
lnx1201 ln 0.0086732880815927182997566810334394 -> -4.747507311920844752486938187973721 Inexact Rounded
lnx1202 ln 0.0007104103693460260609792222569854 -> -7.249667769903503023005549250347695 Inexact Rounded
lnx1203 ln 786.8398945385105190697541493392742 -> 6.668024790031836340471824147010546 Inexact Rounded
lnx1204 ln 0.7723073620282687656895190171967399 -> -0.2583726708506850868786816238217326 Inexact Rounded
lnx1205 ln 0.0061057951517197631287183938412200 -> -5.098516933918797347064454103742635 Inexact Rounded
lnx1206 ln 0.6181379708184393730103917562498745 -> -0.4810435926903365087463387760350021 Inexact Rounded
lnx1207 ln 09.13888261229039989110753389096760 -> 2.212538125507975574509563027696021 Inexact Rounded
lnx1208 ln 802.0105417063143696497292158147174 -> 6.687121752052341737234832203350214 Inexact Rounded
lnx1209 ln 778.7749710387773713523028497333058 -> 6.657722135126935472086625031413031 Inexact Rounded
lnx1210 ln 0.0024457295895346502513567679390616 -> -6.013411799940245345321348290398517 Inexact Rounded
lnx1211 ln 0.0000511296947872828310338864217860 -> -9.881145118237281798081573131711636 Inexact Rounded
lnx1212 ln 0.0000246803508602554924938685155658 -> -10.60950314264825661825360971430218 Inexact Rounded
lnx1213 ln 9.027898199253511668242977766616082 -> 2.200319582778899029786017830557293 Inexact Rounded
lnx1214 ln 0.0991812396542505631850692800904188 -> -2.310806398964672258823043180400384 Inexact Rounded
lnx1215 ln 0.0000000000070238810143028811223924 -> -25.68170519961636647174714538290075 Inexact Rounded
lnx1216 ln 2.630101665342826494730394729313167 -> 0.9670225014664367465128243039749559 Inexact Rounded
lnx1217 ln 0.0056878928594359587691526063254683 -> -5.169415422904037819736637399445096 Inexact Rounded
lnx1218 ln 567.3436047121057843908106573095590 -> 6.340965124964258486463444360787970 Inexact Rounded
lnx1219 ln 1.199291248124655996614605745649725 -> 0.1817307557425911805765087755675657 Inexact Rounded
lnx1220 ln 25.02050448582031098696267479135557 -> 3.219695668137659139544178905459317 Inexact Rounded
lnx1221 ln 0.0000000000009939597023558756961300 -> -27.63707972996537636504396558259058 Inexact Rounded
lnx1222 ln 0.0000007988551670159429716506430403 -> -14.04008617542597230988198612376415 Inexact Rounded
lnx1223 ln 4.681515800176129184873770605589795 -> 1.543621946415383338972124445445748 Inexact Rounded
lnx1224 ln 15.95126669161103011206658749345781 -> 2.769538242479483539275986395443539 Inexact Rounded
lnx1225 ln 0.0301626783922211213675457279076066 -> -3.501149933677283341023932281826341 Inexact Rounded
lnx1226 ln 000.0040544064881821770528475185674 -> -5.507950967557021671647165889608324 Inexact Rounded
lnx1227 ln 29.01617095935593792095913785100360 -> 3.367853293862745651888450004473297 Inexact Rounded
lnx1228 ln 78.01836167344736733024804243195323 -> 4.356944205055768575987781375003992 Inexact Rounded
lnx1229 ln 0.0000000096545319316965321158634893 -> -18.45583840160965814462095477365013 Inexact Rounded
lnx1230 ln 97.95475237720579752770587185074428 -> 4.584505661612812742208619358214729 Inexact Rounded
lnx1231 ln 528.0609262050423246402564228432371 -> 6.269211667589138113396583894315956 Inexact Rounded
lnx1232 ln 0.0000002250064349732969696660452972 -> -15.30713683526963996712167701738724 Inexact Rounded
lnx1233 ln 47.97063637767998658567199049725754 -> 3.870589081585660692195989854842372 Inexact Rounded
lnx1234 ln 0.0005394311344541432318853513414361 -> -7.524995428393925934087126702974121 Inexact Rounded
lnx1235 ln 0.0000000090973385649567471674972633 -> -18.51528393158931783447035004125791 Inexact Rounded
lnx1236 ln 0.0000000000238776490227576197317977 -> -24.45807828188389561331158879207262 Inexact Rounded
lnx1237 ln 0.0000236587000231921532145326218758 -> -10.65177964499823314952429277979034 Inexact Rounded
lnx1238 ln 499.1277448846130709827154556125942 -> 6.212862064761427967461188083514774 Inexact Rounded
lnx1239 ln 0.0000003960192300284787663712417647 -> -14.74180306619298548093697608293284 Inexact Rounded
lnx1240 ln 41.08268350829477451667228892495136 -> 3.715586706887278039173584859218960 Inexact Rounded
-- P=16, within 0-99
Precision: 16
lnx1101 ln 7.964875261033948 -> 2.075041282352241 Inexact Rounded
lnx1102 ln 13.54527396845394 -> 2.606037701870263 Inexact Rounded
lnx1103 ln 0.0008026554341331 -> -7.127585034321814 Inexact Rounded
lnx1104 ln 0.0000030582233261 -> -12.69767642300625 Inexact Rounded
lnx1105 ln 0.0004477497509672 -> -7.711276073210766 Inexact Rounded
lnx1106 ln 7.616268622474371 -> 2.030286567675148 Inexact Rounded
lnx1107 ln 51.58329925806381 -> 3.943197962309569 Inexact Rounded
lnx1108 ln 0.0018197497951263 -> -6.309056262549345 Inexact Rounded
lnx1109 ln 2.956282457072984 -> 1.083932552334575 Inexact Rounded
lnx1110 ln 0.3843325579189906 -> -0.9562470649400558 Inexact Rounded
lnx1111 ln 0.0074466329265663 -> -4.899993304919237 Inexact Rounded
lnx1112 ln 0.0003372478532993 -> -7.994692428206378 Inexact Rounded
lnx1113 ln 0.0084792263167809 -> -4.770136069569271 Inexact Rounded
lnx1114 ln 5.926756998151102 -> 1.779477182834305 Inexact Rounded
lnx1115 ln 9.025699152180897 -> 2.200075969604119 Inexact Rounded
lnx1116 ln 1.910124643533526 -> 0.6471684983238183 Inexact Rounded
lnx1117 ln 0.8158922711411020 -> -0.2034729533939387 Inexact Rounded
lnx1118 ln 0.0067080016475322 -> -5.004454189414139 Inexact Rounded
lnx1119 ln 0.0047583242092716 -> -5.347859729601094 Inexact Rounded
lnx1120 ln 0.0386647411641339 -> -3.252827175263113 Inexact Rounded
lnx1121 ln 0.0050226427841761 -> -5.293799032774131 Inexact Rounded
lnx1122 ln 6.927937541637261 -> 1.935562155866906 Inexact Rounded
lnx1123 ln 0.0000095745343513 -> -11.55640365579814 Inexact Rounded
lnx1124 ln 1.602465492956538 -> 0.4715433763243936 Inexact Rounded
lnx1125 ln 38.98415625087535 -> 3.663155313610213 Inexact Rounded
lnx1126 ln 5.343182042276734 -> 1.675821363568112 Inexact Rounded
lnx1127 ln 55.89763703245816 -> 4.023522107934110 Inexact Rounded
lnx1128 ln 0.7445257810280847 -> -0.2950077988101030 Inexact Rounded
lnx1129 ln 1.631407314946094 -> 0.4894430257201248 Inexact Rounded
lnx1130 ln 0.0005462451932602 -> -7.512442611116852 Inexact Rounded
lnx1131 ln 0.0000864173269362 -> -9.356322359017317 Inexact Rounded
lnx1132 ln 5.227161719132849 -> 1.653868438439637 Inexact Rounded
lnx1133 ln 60.57078466941998 -> 4.103812675662452 Inexact Rounded
lnx1134 ln 0.0992864325333160 -> -2.309746348350318 Inexact Rounded
lnx1135 ln 09.48564268447325 -> 2.249779359074983 Inexact Rounded
lnx1136 ln 0.0036106089355634 -> -5.623878840650787 Inexact Rounded
lnx1137 ln 1.805176865587172 -> 0.5906585734593707 Inexact Rounded
lnx1138 ln 62.59363259642255 -> 4.136663557220559 Inexact Rounded
lnx1139 ln 4.373828261137201 -> 1.475638657912000 Inexact Rounded
lnx1140 ln 0.994483524148738 -> -0.005531747794938690 Inexact Rounded
-- P=7, within 0-9
Precision: 7
lnx1001 ln 0.0912025 -> -2.394673 Inexact Rounded
lnx1002 ln 0.9728626 -> -0.02751242 Inexact Rounded
lnx1003 ln 0.3886032 -> -0.9451965 Inexact Rounded
lnx1004 ln 8.798639 -> 2.174597 Inexact Rounded
lnx1005 ln 2.459121 -> 0.8998040 Inexact Rounded
lnx1006 ln 2.013193 -> 0.6997220 Inexact Rounded
lnx1007 ln 9.064857 -> 2.204405 Inexact Rounded
lnx1008 ln 5.796417 -> 1.757240 Inexact Rounded
lnx1009 ln 0.1143471 -> -2.168517 Inexact Rounded
lnx1010 ln 0.5341542 -> -0.6270707 Inexact Rounded
lnx1011 ln 6.693781 -> 1.901179 Inexact Rounded
lnx1012 ln 0.0081779 -> -4.806320 Inexact Rounded
lnx1013 ln 8.313616 -> 2.117895 Inexact Rounded
lnx1014 ln 3.486925 -> 1.249020 Inexact Rounded
lnx1015 ln 0.1801401 -> -1.714020 Inexact Rounded
lnx1016 ln 0.5227148 -> -0.6487193 Inexact Rounded
lnx1017 ln 7.818111 -> 2.056443 Inexact Rounded
lnx1018 ln 0.0870671 -> -2.441076 Inexact Rounded
lnx1019 ln 8.153966 -> 2.098504 Inexact Rounded
lnx1020 ln 2.040975 -> 0.7134276 Inexact Rounded
lnx1021 ln 1.481642 -> 0.3931509 Inexact Rounded
lnx1022 ln 0.2610123 -> -1.343188 Inexact Rounded
lnx1023 ln 0.466723 -> -0.7620193 Inexact Rounded
lnx1024 ln 0.0518756 -> -2.958907 Inexact Rounded
lnx1025 ln 2.056410 -> 0.7209617 Inexact Rounded
lnx1026 ln 0.181522 -> -1.706378 Inexact Rounded
lnx1027 ln 0.515551 -> -0.6625190 Inexact Rounded
lnx1028 ln 8.425089 -> 2.131214 Inexact Rounded
lnx1029 ln 2.077091 -> 0.7309684 Inexact Rounded
lnx1030 ln 6.212705 -> 1.826596 Inexact Rounded
lnx1031 ln 5.729343 -> 1.745601 Inexact Rounded
lnx1032 ln 4.831251 -> 1.575105 Inexact Rounded
lnx1033 ln 2.029760 -> 0.7079176 Inexact Rounded
lnx1034 ln 8.615060 -> 2.153512 Inexact Rounded
lnx1035 ln 0.0611511 -> -2.794407 Inexact Rounded
lnx1036 ln 5.195269 -> 1.647748 Inexact Rounded
lnx1037 ln 9.617686 -> 2.263604 Inexact Rounded
lnx1038 ln 0.0049382 -> -5.310754 Inexact Rounded
lnx1039 ln 2.786840 -> 1.024908 Inexact Rounded
lnx1040 ln 0.0091073 -> -4.698679 Inexact Rounded
-- from here 3-digit tests are based on reverse exp tests
precision: 9
rounding: half_even
maxExponent: 384
minexponent: -383
lnx001 ln 0 -> -Infinity
lnx002 ln 0.367879441 -> -1.00000000 Inexact Rounded
lnx003 ln 1 -> 0
lnx005 ln 2.71828183 -> 1.00000000 Inexact Rounded
lnx006 ln 2.00000000 -> 0.693147181 Inexact Rounded
lnx007 ln +Infinity -> Infinity
-- tiny edge cases
precision: 7
lnx011 ln 1.105171 -> 0.1000001 Inexact Rounded
lnx012 ln 1.010050 -> 0.009999835 Inexact Rounded
lnx013 ln 1.000010 -> 0.000009999950 Inexact Rounded
lnx014 ln 1.000001 -> 9.999995E-7 Inexact Rounded
lnx015 ln 1.000000 -> 0
-- basic e=0, e=1, e=2, e=4, e>=8 cases
precision: 7
lnx041 ln 2.718282 -> 1.000000 Inexact Rounded
lnx042 ln 0.3678794 -> -1.000000 Inexact Rounded
lnx043 ln 22026.47 -> 10.00000 Inexact Rounded
lnx044 ln 0.00004539993 -> -10.00000 Inexact Rounded
lnx045 ln 2.688117E+43 -> 100.0000 Inexact Rounded
lnx046 ln 3.720076E-44 -> -100.0000 Inexact Rounded
lnx047 ln Infinity -> Infinity
lnx048 ln 0E-389 -> -Infinity
-- miscellanea
precision: 16
lnx055 ln 2.717658486884572E-236 -> -542.4103112874415 Inexact Rounded
precision: 17
lnx056 ln 2.7176584868845721E-236 -> -542.41031128744146 Inexact Rounded
precision: 18
lnx057 ln 2.71765848688457211E-236 -> -542.410311287441459 Inexact Rounded
precision: 19
lnx058 ln 2.717658486884572112E-236 -> -542.4103112874414592 Inexact Rounded
precision: 20
lnx059 ln 2.7176584868845721118E-236 -> -542.41031128744145917 Inexact Rounded
-- inputs ending in ..500.., ..499.., ..100.., ..999.. sequences
precision: 50
lnx102 ln 0.9999999100000040499998785000027 -> -9.0000000000000000000000033749953829996446124861750E-8 Inexact Rounded
precision: 30
lnx103 ln 0.999999910000004049999878500003 -> -8.99999999999999999999997337499E-8 Inexact Rounded
precision: 29
lnx104 ln 0.99999991000000404999987850000 -> -9.0000000000000000000002733750E-8 Inexact Rounded
precision: 28
lnx105 ln 0.9999999100000040499998785000 -> -9.000000000000000000000273375E-8 Inexact Rounded
precision: 27
lnx106 ln 0.999999910000004049999878500 -> -9.00000000000000000000027338E-8 Inexact Rounded
precision: 26
lnx107 ln 0.99999991000000404999987850 -> -9.0000000000000000000002734E-8 Inexact Rounded
precision: 25
lnx108 ln 0.9999999100000040499998785 -> -9.000000000000000000000273E-8 Inexact Rounded
precision: 24
lnx109 ln 0.999999910000004049999879 -> -8.99999999999999995000027E-8 Inexact Rounded
precision: 23
lnx110 ln 0.99999991000000404999988 -> -8.9999999999999998500003E-8 Inexact Rounded
precision: 22
lnx111 ln 0.9999999100000040499999 -> -8.999999999999997850000E-8 Inexact Rounded
precision: 21
lnx112 ln 0.999999910000004050000 -> -8.99999999999998785000E-8 Inexact Rounded
precision: 20
lnx113 ln 0.99999991000000405000 -> -8.9999999999999878500E-8 Inexact Rounded
precision: 19
lnx114 ln 0.9999999100000040500 -> -8.999999999999987850E-8 Inexact Rounded
precision: 18
lnx115 ln 0.999999910000004050 -> -8.99999999999998785E-8 Inexact Rounded
-- next may be a > 0.5ulp case; a more precise answer is:
-- -8.99999999999998784999918E-8
precision: 17
lnx116 ln 0.99999991000000405 -> -8.9999999999999878E-8 Inexact Rounded
precision: 16
lnx117 ln 0.9999999100000040 -> -9.000000004999988E-8 Inexact Rounded
precision: 15
lnx118 ln 0.999999910000004 -> -9.00000000499999E-8 Inexact Rounded
precision: 14
lnx119 ln 0.99999991000000 -> -9.0000004050000E-8 Inexact Rounded
precision: 13
lnx120 ln 0.9999999100000 -> -9.000000405000E-8 Inexact Rounded
precision: 12
lnx121 ln 0.999999910000 -> -9.00000040500E-8 Inexact Rounded
precision: 11
lnx122 ln 0.99999991000 -> -9.0000004050E-8 Inexact Rounded
precision: 10
lnx123 ln 0.9999999100 -> -9.000000405E-8 Inexact Rounded
precision: 9
lnx124 ln 0.999999910 -> -9.00000041E-8 Inexact Rounded
precision: 8
lnx125 ln 0.99999991 -> -9.0000004E-8 Inexact Rounded
precision: 7
lnx126 ln 0.9999999 -> -1.000000E-7 Inexact Rounded
precision: 16
lnx126b ln 0.9999999 -> -1.000000050000003E-7 Inexact Rounded
precision: 6
lnx127 ln 0.999999 -> -0.00000100000 Inexact Rounded
precision: 5
lnx128 ln 0.99999 -> -0.000010000 Inexact Rounded
precision: 4
lnx129 ln 0.9999 -> -0.0001000 Inexact Rounded
precision: 3
lnx130 ln 0.999 -> -0.00100 Inexact Rounded
precision: 2
lnx131 ln 0.99 -> -0.010 Inexact Rounded
precision: 1
lnx132 ln 0.9 -> -0.1 Inexact Rounded
-- cases near 1 -- 1 2345678901234567890
precision: 20
lnx401 ln 2.7182818284589365041 -> 0.99999999999996000000 Inexact Rounded
lnx402 ln 2.7182818284589636869 -> 0.99999999999997000000 Inexact Rounded
lnx403 ln 2.7182818284589908697 -> 0.99999999999997999999 Inexact Rounded
lnx404 ln 2.7182818284590180525 -> 0.99999999999998999998 Inexact Rounded
lnx405 ln 2.7182818284590452354 -> 1.0000000000000000000 Inexact Rounded
lnx406 ln 2.7182818284593170635 -> 1.0000000000001000000 Inexact Rounded
lnx407 ln 2.7182818284595888917 -> 1.0000000000002000000 Inexact Rounded
precision: 14
lnx411 ln 2.7182818284589 -> 0.99999999999995 Inexact Rounded
lnx413 ln 2.7182818284590 -> 0.99999999999998 Inexact Rounded
lnx416 ln 2.7182818284591 -> 1.0000000000000 Inexact Rounded
lnx417 ln 2.7182818284592 -> 1.0000000000001 Inexact Rounded
-- overflows, including some exp overprecise borderlines
precision: 7
maxExponent: 384
minExponent: -383
lnx709 ln 9.999999E+384 -> 886.4953 Inexact Rounded
lnx711 ln 9.999992E+384 -> 886.4953 Inexact Rounded
precision: 16
lnx722 ln 9.999999999999999E+384 -> 886.4952608027076 Inexact Rounded
lnx724 ln 9.999999999999917E+384 -> 886.4952608027076 Inexact Rounded
lnx726 ln 9.999999999999117E+384 -> 886.4952608027075 Inexact Rounded
-- and more...
precision: 15
maxExponent: 999
minExponent: -999
lnx731 ln 9.99999999999999E+999 -> 2302.58509299405 Inexact Rounded
-- next may be a > 0.5ulp case; a more precise answer is:
-- 2302.58509299404495001799145442
lnx732 ln 9.99999999999266E+999 -> 2302.58509299404 Inexact Rounded
lnx733 ln 9.99999999999265E+999 -> 2302.58509299404 Inexact Rounded
lnx734 ln 9.99999999999264E+999 -> 2302.58509299404 Inexact Rounded
-- subnormals and underflows for exp, including underflow-to-zero edge point
precision: 7
maxExponent: 384
minExponent: -383
lnx751 ln 0E-389 -> -Infinity
lnx758 ln 1.000001E-383 -> -881.8901 Inexact Rounded
lnx759 ln 9.99991E-384 -> -881.8901 Inexact Rounded
lnx760 ln 4.4605E-385 -> -885.0000 Inexact Rounded
lnx761 ln 2.221E-386 -> -887.9999 Inexact Rounded
lnx762 ln 3.01E-387 -> -889.9985 Inexact Rounded
lnx763 ln 1.7E-388 -> -892.8724 Inexact Rounded
lnx764 ln 1.5E-388 -> -892.9976 Inexact Rounded
lnx765 ln 9E-389 -> -893.5084 Inexact Rounded
lnx766 ln 1E-389 -> -895.7056 Inexact Rounded
lnx774 ln 0E-389 -> -Infinity
-- special values
lnx820 ln Infinity -> Infinity
lnx821 ln 0 -> -Infinity
lnx822 ln NaN -> NaN
lnx823 ln sNaN -> NaN Invalid_operation
-- propagating NaNs
lnx824 ln sNaN123 -> NaN123 Invalid_operation
lnx825 ln -sNaN321 -> -NaN321 Invalid_operation
lnx826 ln NaN456 -> NaN456
lnx827 ln -NaN654 -> -NaN654
lnx828 ln NaN1 -> NaN1
-- Invalid operations due to restrictions
-- [next two probably skipped by most test harnesses]
precision: 100000000
lnx901 ln 1 -> NaN Invalid_context
precision: 99999999
lnx902 ln 0 -> NaN Invalid_context
precision: 9
maxExponent: 1000000
minExponent: -999999
lnx903 ln 1 -> NaN Invalid_context
maxExponent: 999999
minExponent: -999999
lnx904 ln 0 -> -Infinity
maxExponent: 999999
minExponent: -1000000
lnx905 ln 1 -> NaN Invalid_context
maxExponent: 999999
minExponent: -999998
lnx906 ln 0 -> -Infinity
-- payload decapitate
precision: 5
lnx910 ln -sNaN1234567890 -> -NaN67890 Invalid_operation
-- Null test
lnx900 ln # -> NaN Invalid_operation

View File

@@ -0,0 +1,551 @@
------------------------------------------------------------------------
-- log10.decTest -- decimal logarithm in base 10 --
-- Copyright (c) IBM Corporation, 2005, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- This emphasises the testing of notable cases, as they will often
-- have unusual paths (especially the 10**n results).
extended: 1
precision: 16
rounding: half_even
maxExponent: 384
minexponent: -383
-- examples in specification
precision: 9
logxs000 log10 0 -> -Infinity
logxs001 log10 0.001 -> -3
logxs002 log10 1 -> 0
logxs003 log10 2 -> 0.301029996 Inexact Rounded
logxs004 log10 10 -> 1
logxs005 log10 70 -> 1.84509804 Inexact Rounded
logxs006 log10 +Infinity -> Infinity
-- basics (examples in specification, etc.)
precision: 16
logx0000 log10 0 -> -Infinity
logx0001 log10 7E-1000 -> -999.1549019599857 Inexact Rounded
logx0002 log10 1.1E-9 -> -8.958607314841775 Inexact Rounded
logx0003 log10 0.0007 -> -3.154901959985743 Inexact Rounded
logx0004 log10 0.11 -> -0.9586073148417750 Inexact Rounded
logx0005 log10 0.7 -> -0.1549019599857432 Inexact Rounded
logx0006 log10 1 -> 0
logx0007 log10 1.5 -> 0.1760912590556812 Inexact Rounded
logx0008 log10 2 -> 0.3010299956639812 Inexact Rounded
logx0009 log10 2.718281828459045 -> 0.4342944819032518 Inexact Rounded
logx0010 log10 2.718281828459046 -> 0.4342944819032519 Inexact Rounded
logx0011 log10 2.718281828459047 -> 0.4342944819032521 Inexact Rounded
logx0012 log10 7 -> 0.8450980400142568 Inexact Rounded
logx0013 log10 10 -> 1
logx0014 log10 10.5 -> 1.021189299069938 Inexact Rounded
logx0015 log10 11 -> 1.041392685158225 Inexact Rounded
logx0016 log10 70 -> 1.845098040014257 Inexact Rounded
logx0017 log10 9999 -> 3.999956568380192 Inexact Rounded
logx0018 log10 1.21E6 -> 6.082785370316450 Inexact Rounded
logx0019 log10 1.1E+9 -> 9.041392685158225 Inexact Rounded
logx0020 log10 7E+1000 -> 1000.845098040014 Inexact Rounded
logx0021 log10 +Infinity -> Infinity
-- notable cases
-- negatives
logx0031 log10 -1E-9 -> NaN Invalid_operation
logx0032 log10 -0.0007 -> NaN Invalid_operation
logx0033 log10 -0.1 -> NaN Invalid_operation
logx0034 log10 -0.7 -> NaN Invalid_operation
logx0035 log10 -1 -> NaN Invalid_operation
logx0036 log10 -1.5 -> NaN Invalid_operation
logx0037 log10 -2 -> NaN Invalid_operation
logx0038 log10 -10.5 -> NaN Invalid_operation
logx0039 log10 -10.5 -> NaN Invalid_operation
logx0040 log10 -9999 -> NaN Invalid_operation
logx0041 log10 -10 -> NaN Invalid_operation
logx0042 log10 -0 -> -Infinity
logx0043 log10 -0E+17 -> -Infinity
logx0044 log10 -0E-17 -> -Infinity
-- other zeros
logx0051 log10 0 -> -Infinity
logx0052 log10 0E+17 -> -Infinity
logx0053 log10 0E-17 -> -Infinity
-- infinities
logx0055 log10 -Infinity -> NaN Invalid_operation
logx0056 log10 +Infinity -> Infinity
-- ones
logx0061 log10 1 -> 0
logx0062 log10 1.0 -> 0
logx0063 log10 1.000000000000000 -> 0
logx0064 log10 1.000000000000000000 -> 0
-- notable cases -- exact powers of 10
logx1100 log10 1 -> 0
logx1101 log10 10 -> 1
logx1102 log10 100 -> 2
logx1103 log10 1000 -> 3
logx1104 log10 10000 -> 4
logx1105 log10 100000 -> 5
logx1106 log10 1000000 -> 6
logx1107 log10 10000000 -> 7
logx1108 log10 100000000 -> 8
logx1109 log10 1000000000 -> 9
logx1110 log10 10000000000 -> 10
logx1111 log10 100000000000 -> 11
logx1112 log10 1000000000000 -> 12
logx1113 log10 0.00000000001 -> -11
logx1114 log10 0.0000000001 -> -10
logx1115 log10 0.000000001 -> -9
logx1116 log10 0.00000001 -> -8
logx1117 log10 0.0000001 -> -7
logx1118 log10 0.000001 -> -6
logx1119 log10 0.00001 -> -5
logx1120 log10 0.0001 -> -4
logx1121 log10 0.001 -> -3
logx1122 log10 0.01 -> -2
logx1123 log10 0.1 -> -1
logx1124 log10 1E-99 -> -99
logx1125 log10 1E-100 -> -100
logx1126 log10 1E-383 -> -383
-- check normally exact cases round properly
precision: 1
logx1141 log10 10000000000 -> 1E+1 Rounded
logx1142 log10 1000000000000 -> 1E+1 Inexact Rounded
logx1143 log10 1E+100 -> 1E+2 Rounded
logx1144 log10 1E+123 -> 1E+2 Inexact Rounded
logx1145 log10 1E+126 -> 1E+2 Inexact Rounded
logx1146 log10 1E+916 -> 9E+2 Inexact Rounded
logx1147 log10 1E+999 -> 1E+3 Inexact Rounded
precision: 2
logx1151 log10 10000000000 -> 10
logx1152 log10 1000000000000 -> 12
logx1153 log10 1E+100 -> 1.0E+2 Rounded
logx1154 log10 1E+123 -> 1.2E+2 Inexact Rounded
logx1155 log10 1E+126 -> 1.3E+2 Inexact Rounded
logx1156 log10 1E+916 -> 9.2E+2 Inexact Rounded
logx1157 log10 1E+999 -> 1.0E+3 Inexact Rounded
-- some half-way point rounds, other cases, and negatives
logx1158 log10 1E+125 -> 1.2E+2 Inexact Rounded
logx1159 log10 1E+135 -> 1.4E+2 Inexact Rounded
logx1160 log10 1E+129 -> 1.3E+2 Inexact Rounded
logx1161 log10 1E+131 -> 1.3E+2 Inexact Rounded
logx1162 log10 1E-123 -> -1.2E+2 Inexact Rounded
logx1163 log10 1E-126 -> -1.3E+2 Inexact Rounded
logx1164 log10 1E-916 -> -9.2E+2 Inexact Rounded
logx1165 log10 1E-999 -> -1.0E+3 Inexact Rounded
logx1166 log10 1E-125 -> -1.2E+2 Inexact Rounded
logx1167 log10 1E-135 -> -1.4E+2 Inexact Rounded
logx1168 log10 1E-129 -> -1.3E+2 Inexact Rounded
logx1169 log10 1E-131 -> -1.3E+2 Inexact Rounded
precision: 3
logx1171 log10 10000000000 -> 10
logx1172 log10 1000000000000 -> 12
logx1173 log10 1E+100 -> 100
logx1174 log10 1E+123 -> 123
logx1175 log10 1E+126 -> 126
logx1176 log10 1E+916 -> 916
logx1177 log10 1E+999 -> 999
-- log10(2) .. tests both ln(2) and ln(10) constants, too
precision: 50
logx1201 log10 2 -> 0.30102999566398119521373889472449302676818988146211 Inexact Rounded
logx1202 log10 2.000 -> 0.30102999566398119521373889472449302676818988146211 Inexact Rounded
logx1203 log10 0.2E1 -> 0.30102999566398119521373889472449302676818988146211 Inexact Rounded
precision: 49
logx1204 log10 2 -> 0.3010299956639811952137388947244930267681898814621 Inexact Rounded
precision: 48
logx1205 log10 2 -> 0.301029995663981195213738894724493026768189881462 Inexact Rounded
precision: 47
logx1206 log10 2 -> 0.30102999566398119521373889472449302676818988146 Inexact Rounded
precision: 46
logx1207 log10 2 -> 0.3010299956639811952137388947244930267681898815 Inexact Rounded
precision: 45
logx1208 log10 2 -> 0.301029995663981195213738894724493026768189881 Inexact Rounded
precision: 44
logx1209 log10 2 -> 0.30102999566398119521373889472449302676818988 Inexact Rounded
precision: 43
logx1210 log10 2 -> 0.3010299956639811952137388947244930267681899 Inexact Rounded
precision: 42
logx1211 log10 2 -> 0.301029995663981195213738894724493026768190 Inexact Rounded
precision: 41
logx1212 log10 2 -> 0.30102999566398119521373889472449302676819 Inexact Rounded
precision: 40
logx1213 log10 2 -> 0.3010299956639811952137388947244930267682 Inexact Rounded
precision: 39
logx1214 log10 2 -> 0.301029995663981195213738894724493026768 Inexact Rounded
precision: 38
logx1215 log10 2 -> 0.30102999566398119521373889472449302677 Inexact Rounded
precision: 37
logx1216 log10 2 -> 0.3010299956639811952137388947244930268 Inexact Rounded
precision: 36
logx1217 log10 2 -> 0.301029995663981195213738894724493027 Inexact Rounded
precision: 35
logx1218 log10 2 -> 0.30102999566398119521373889472449303 Inexact Rounded
precision: 34
logx1219 log10 2 -> 0.3010299956639811952137388947244930 Inexact Rounded
precision: 33
logx1220 log10 2 -> 0.301029995663981195213738894724493 Inexact Rounded
precision: 32
logx1221 log10 2 -> 0.30102999566398119521373889472449 Inexact Rounded
precision: 31
logx1222 log10 2 -> 0.3010299956639811952137388947245 Inexact Rounded
precision: 30
logx1223 log10 2 -> 0.301029995663981195213738894724 Inexact Rounded
precision: 29
logx1224 log10 2 -> 0.30102999566398119521373889472 Inexact Rounded
precision: 28
logx1225 log10 2 -> 0.3010299956639811952137388947 Inexact Rounded
precision: 27
logx1226 log10 2 -> 0.301029995663981195213738895 Inexact Rounded
precision: 26
logx1227 log10 2 -> 0.30102999566398119521373889 Inexact Rounded
precision: 25
logx1228 log10 2 -> 0.3010299956639811952137389 Inexact Rounded
precision: 24
logx1229 log10 2 -> 0.301029995663981195213739 Inexact Rounded
precision: 23
logx1230 log10 2 -> 0.30102999566398119521374 Inexact Rounded
precision: 22
logx1231 log10 2 -> 0.3010299956639811952137 Inexact Rounded
precision: 21
logx1232 log10 2 -> 0.301029995663981195214 Inexact Rounded
precision: 20
logx1233 log10 2 -> 0.30102999566398119521 Inexact Rounded
precision: 19
logx1234 log10 2 -> 0.3010299956639811952 Inexact Rounded
precision: 18
logx1235 log10 2 -> 0.301029995663981195 Inexact Rounded
precision: 17
logx1236 log10 2 -> 0.30102999566398120 Inexact Rounded
precision: 16
logx1237 log10 2 -> 0.3010299956639812 Inexact Rounded
precision: 15
logx1238 log10 2 -> 0.301029995663981 Inexact Rounded
precision: 14
logx1239 log10 2 -> 0.30102999566398 Inexact Rounded
precision: 13
logx1240 log10 2 -> 0.3010299956640 Inexact Rounded
precision: 12
logx1241 log10 2 -> 0.301029995664 Inexact Rounded
precision: 11
logx1242 log10 2 -> 0.30102999566 Inexact Rounded
precision: 10
logx1243 log10 2 -> 0.3010299957 Inexact Rounded
precision: 9
logx1244 log10 2 -> 0.301029996 Inexact Rounded
precision: 8
logx1245 log10 2 -> 0.30103000 Inexact Rounded
precision: 7
logx1246 log10 2 -> 0.3010300 Inexact Rounded
precision: 6
logx1247 log10 2 -> 0.301030 Inexact Rounded
precision: 5
logx1248 log10 2 -> 0.30103 Inexact Rounded
precision: 4
logx1249 log10 2 -> 0.3010 Inexact Rounded
precision: 3
logx1250 log10 2 -> 0.301 Inexact Rounded
precision: 2
logx1251 log10 2 -> 0.30 Inexact Rounded
precision: 1
logx1252 log10 2 -> 0.3 Inexact Rounded
maxExponent: 384
minExponent: -383
precision: 16
rounding: half_even
-- More close-to-e, etc., tests
precision: 34
logx1301 log10 2.718281828459045235360287471352661 -> 0.4342944819032518276511289189166048 Inexact Rounded
logx1302 log10 2.718281828459045235360287471352662 -> 0.4342944819032518276511289189166050 Inexact Rounded
logx1303 log10 2.718281828459045235360287471352663 -> 0.4342944819032518276511289189166052 Inexact Rounded
logx1304 log10 0.99999999999999999999999999999999 -> -4.342944819032518276511289189166073E-33 Inexact Rounded
logx1305 log10 0.999999999999999999999999999999999 -> -4.342944819032518276511289189166053E-34 Inexact Rounded
logx1306 log10 0.9999999999999999999999999999999999 -> -4.342944819032518276511289189166051E-35 Inexact Rounded
logx1307 log10 1.000000000000000000000000000000000 -> 0
logx1308 log10 1.0000000000000000000000000000000001 -> 4.342944819032518276511289189166051E-35 Inexact Rounded
logx1309 log10 1.000000000000000000000000000000001 -> 4.342944819032518276511289189166049E-34 Inexact Rounded
logx1310 log10 1.00000000000000000000000000000001 -> 4.342944819032518276511289189166029E-33 Inexact Rounded
-- lower p
precision: 7
logx1320 log10 0.999999 -> -4.342947E-7 Inexact Rounded
logx1321 log10 0.9999999 -> -4.342945E-8 Inexact Rounded
logx1322 log10 0.99999999 -> -4.342945E-9 Inexact Rounded
logx1323 log10 0.999999999 -> -4.342945E-10 Inexact Rounded
logx1324 log10 1.00000000 -> 0
logx1325 log10 1.00000001 -> 4.342945E-9 Inexact Rounded
logx1326 log10 1.0000001 -> 4.342945E-8 Inexact Rounded
logx1327 log10 1.000001 -> 4.342943E-7 Inexact Rounded
-- near 10^3
precision: 9
logx1331 log10 999.9999998 -> 3.00000000 Inexact Rounded
logx1332 log10 999.9999999 -> 3.00000000 Inexact Rounded
logx1333 log10 1000.000000 -> 3
logx1334 log10 1000.000001 -> 3.00000000 Inexact Rounded
logx1335 log10 1000.000002 -> 3.00000000 Inexact Rounded
precision: 16
logx1341 log10 999.9999998 -> 2.999999999913141 Inexact Rounded
logx1342 log10 999.9999999 -> 2.999999999956571 Inexact Rounded
logx1343 log10 1000.000000 -> 3
logx1344 log10 1000.000001 -> 3.000000000434294 Inexact Rounded
logx1345 log10 1000.000002 -> 3.000000000868589 Inexact Rounded
-- suggestions from Ilan Nehama
logx1400 log10 10E-3 -> -2
logx1401 log10 10E-2 -> -1
logx1402 log10 100E-2 -> 0
logx1403 log10 1000E-2 -> 1
logx1404 log10 10000E-2 -> 2
logx1405 log10 10E-1 -> 0
logx1406 log10 100E-1 -> 1
logx1407 log10 1000E-1 -> 2
logx1408 log10 10000E-1 -> 3
logx1409 log10 10E0 -> 1
logx1410 log10 100E0 -> 2
logx1411 log10 1000E0 -> 3
logx1412 log10 10000E0 -> 4
logx1413 log10 10E1 -> 2
logx1414 log10 100E1 -> 3
logx1415 log10 1000E1 -> 4
logx1416 log10 10000E1 -> 5
logx1417 log10 10E2 -> 3
logx1418 log10 100E2 -> 4
logx1419 log10 1000E2 -> 5
logx1420 log10 10000E2 -> 6
-- Randoms
-- P=50, within 0-9999
Precision: 50
logx2501 log10 0.00035448001667968141775891246991912655961163345904 -> -3.4504082425411775290864053318247274944685586188505 Inexact Rounded
logx2502 log10 70.636455726424311228255338637935330826995136597644 -> 1.8490288998408492045793070255302335558140975719247 Inexact Rounded
logx2503 log10 0.00000000000000233550362473821889060812804063040169 -> -14.631619454343834858023578299142866557717904223667 Inexact Rounded
logx2504 log10 97.783628621523244679901260358286898958832135433764 -> 1.9902661493224219517897657964362571690592734407330 Inexact Rounded
logx2505 log10 0062.2377135315858392802612812022807838599572017342 -> 1.7940536293085066199287632725026837018486533544141 Inexact Rounded
logx2506 log10 6.3767634652071053619977602804724129652981747879532 -> 0.80460030789825961615100163576080761326857374098644 Inexact Rounded
logx2507 log10 63.297088981313278529306533814195068850532666658798 -> 1.8013837373724427092417170149098614410849353839673 Inexact Rounded
logx2508 log10 0.00000077239693316881797717820110898167721602299187 -> -6.1121594592718550613773886241951966264826760310047 Inexact Rounded
logx2509 log10 0.00000003953580359780185534830572461922527831395002 -> -7.4030094293833847136252547069905477213541787177561 Inexact Rounded
logx2510 log10 754.62905817369989169188998111527272688791544577204 -> 2.8777335243761300047758534304371912099958057545416 Inexact Rounded
logx2511 log10 0.00000048360378410241428936607147056283282849158312 -> -6.3155103095309353457604038397980091650760346334512 Inexact Rounded
logx2512 log10 0.00007509037583645612577196104591672080542932166089 -> -4.1244157219700166314012344705538088030592896111026 Inexact Rounded
logx2513 log10 0.00000000000705475944638915053419839063567898092064 -> -11.151517790256466048553810002525868198178167950377 Inexact Rounded
logx2514 log10 9.6210300460497657917445410947099633479609165120661 -> 0.98322157093260978206633922877716078683518617768411 Inexact Rounded
logx2515 log10 0.00000000050150361386555527496607245976120864985611 -> -9.2997259330798261040411086835563234390934934629340 Inexact Rounded
logx2516 log10 098.24754029731994125797723545333677604490074810751 -> 1.9923216862874337077795278629351060819105679670633 Inexact Rounded
logx2517 log10 7.5091998150046994320441463854301624742491015752980 -> 0.87559366078005924080766469158763499725414024128781 Inexact Rounded
logx2518 log10 0.00000000000079540571273330075193668596942268542425 -> -12.099411294165176028817305108475326325006250936963 Inexact Rounded
logx2519 log10 0.00000042395034799555215782907515074134154915491701 -> -6.3726850039125381134069450802108893075604464135297 Inexact Rounded
logx2520 log10 56.683376304674355481905023145238799909301732694982 -> 1.7534557107853480435703421826077606250636580091754 Inexact Rounded
logx2521 log10 48.734033811444195070807606721517169810438049581227 -> 1.6878323602741065190942654710049433808208291564049 Inexact Rounded
logx2522 log10 0.00074830310930046865009851706989430228561880221063 -> -3.1259224502209974082223667712016445572431791920618 Inexact Rounded
logx2523 log10 36.677348885111593384020836720396262497122708598359 -> 1.5643979364260796086754530282302605477567469395425 Inexact Rounded
logx2524 log10 0.00000000000000004495678560480432858812419145833744 -> -16.347204748239740510014320630363244015916029619561 Inexact Rounded
logx2525 log10 9509.5854013650642799374159131940108748594774307104 -> 3.9781615829916326741100166519726824430945406302661 Inexact Rounded
logx2526 log10 0.07834891268689177014044454793608715276615743819097 -> -1.1059670262197643147805517398621288897669876996348 Inexact Rounded
logx2527 log10 0.00000029584529880706128444454688454999032801904794 -> -6.5289353275814043710076526920566721570375026917206 Inexact Rounded
logx2528 log10 3.0713496544497618098794332787772186176981011904294 -> 0.48732926103896828546424341029492468100431414072994 Inexact Rounded
logx2529 log10 352.66392670788816474407442785460803833927136413943 -> 2.5473610388199562714709836398243933320284077008314 Inexact Rounded
logx2530 log10 0.00304743125181876267210516527361742185617091801650 -> -2.5160660830163981967774124745311497447050056400207 Inexact Rounded
logx2531 log10 0.00000076120535894952136499250364604538117729437183 -> -6.1184981629047051532448413863950776496652483019415 Inexact Rounded
logx2532 log10 769.88795978534353052965286195053735007473187735815 -> 2.8864275277862652709986498581064117950288798222100 Inexact Rounded
logx2533 log10 0.00000000000000041297494808612226304619570016336188 -> -15.384076292745415917510668454361868659468669804710 Inexact Rounded
logx2534 log10 860.88864595714426940247940960258558876903741966974 -> 2.9349469800554277915920278090647283233440859155176 Inexact Rounded
logx2535 log10 5839.0328812994787235900178587371051096898683972444 -> 3.7663409208972392569269125539438874737147906238543 Inexact Rounded
logx2536 log10 0.00000028532710151284840471670497112821201598377841 -> -6.5446569753514027675878879843238065488490618159490 Inexact Rounded
logx2537 log10 0.00000000000000009734490059931638483445631835651581 -> -16.011686794011271135978633880864278692254243106931 Inexact Rounded
logx2538 log10 5.8610949526439529489252302463450302981511714144330 -> 0.76797875722452549281028552067645732490929361952278 Inexact Rounded
logx2539 log10 6.6282432221115923372151148990137179611977576327206 -> 0.82139843639227213211012044000785757267155736071361 Inexact Rounded
logx2540 log10 0.00000000001994071862386846626954819923923344413454 -> -10.700259194632339980266559224447212260115021637626 Inexact Rounded
-- P=34, within 0-9999
Precision: 34
logx2201 log10 1.522513203889714179088327328864183 -> 0.1825610677098896250496651330492109 Inexact Rounded
logx2202 log10 0.171123774769717316154080888930404 -> -0.7666896483548462582461898092764408 Inexact Rounded
logx2203 log10 0.0000000997467236251714283104963838 -> -7.001101360652518274271569010312115 Inexact Rounded
logx2204 log10 0.0008856103624122479769647543468633 -> -3.052757310476070891830490327138190 Inexact Rounded
logx2205 log10 1.938274868738032930709498221236758 -> 0.2874153648259449520201536171714594 Inexact Rounded
logx2206 log10 479.5667847823826713082613445010097 -> 2.680849095850361068709165157286435 Inexact Rounded
logx2207 log10 8856.136599178820202141823157336804 -> 3.947244306584767101480454261950559 Inexact Rounded
logx2208 log10 0.0000911026318801903982642871344858 -> -4.040469076434979398438617464033826 Inexact Rounded
logx2209 log10 0.0000000000017271112650427414732630 -> -11.76267968314038748995178212654921 Inexact Rounded
logx2210 log10 6.962605370078885647639503548229695 -> 0.8427717807200322352686396925992250 Inexact Rounded
logx2211 log10 0.3354804428992793132855923541692781 -> -0.4743327923012159170967636070844834 Inexact Rounded
logx2212 log10 2.079864257474859008252165836663504 -> 0.3180349916198059046812506741388856 Inexact Rounded
logx2213 log10 2805.479529292939499220276986621988 -> 3.448007104139974344565978780624744 Inexact Rounded
logx2214 log10 66.45731133034187374557028537213949 -> 1.822542767005644041661520936223086 Inexact Rounded
logx2215 log10 0.0000001206521261762681738274822835 -> -6.918465020390216969561494755767318 Inexact Rounded
logx2216 log10 0.0000000001884891916264401160472381 -> -9.724713548119065386091933007528633 Inexact Rounded
logx2217 log10 0.0000015467279551726326581314582759 -> -5.810586065070435383755759514608738 Inexact Rounded
logx2218 log10 0.0090776316728068586744633914135952 -> -2.042027442843745884503280954390114 Inexact Rounded
logx2219 log10 0.0000000000024541106528713393740030 -> -11.61010585935635713090119156069479 Inexact Rounded
logx2220 log10 14.12936879385863410081087750645856 -> 1.150122760895466989841057385742662 Inexact Rounded
logx2221 log10 0.0000036912481831392922922647231392 -> -5.432826753789892283556211380824203 Inexact Rounded
logx2222 log10 0.0000000004067477525420424270138734 -> -9.390674838050073122857868012475060 Inexact Rounded
logx2223 log10 7080.122562705399744969319589806194 -> 3.850040775747103318724330047546916 Inexact Rounded
logx2224 log10 261.3491411363679209175524790255725 -> 2.417221077227536319655699517530855 Inexact Rounded
logx2225 log10 003.9945581449915240094728380041494 -> 0.6014687471531988260823066997845691 Inexact Rounded
logx2226 log10 0.0000000000583549164588495206767840 -> -10.23392254834182677023231713519341 Inexact Rounded
logx2227 log10 9567.961832607240278342761088487484 -> 3.980819434211107631569386147016368 Inexact Rounded
logx2228 log10 06.26592979160342972777219828867033 -> 0.7969855243966221408595024012574729 Inexact Rounded
logx2229 log10 0.0000000000589847046598067273287319 -> -10.22926059078206218717755253582907 Inexact Rounded
logx2230 log10 567.9388648235589204769442863724997 -> 2.754301589058313576472380262907638 Inexact Rounded
logx2231 log10 039.7790325480037778918162264883415 -> 1.599654216592019199639285308997886 Inexact Rounded
logx2232 log10 0.0000000005123951921894162149817207 -> -9.290394953898862694847327137242690 Inexact Rounded
logx2233 log10 0.0000000000038500999723636904276723 -> -11.41452799337924056186867324854691 Inexact Rounded
logx2234 log10 0.0006726500658977759825616537935864 -> -3.172210810922768725687671849421792 Inexact Rounded
logx2235 log10 260.2400250475967528429943779126507 -> 2.415374092073799204236801383070064 Inexact Rounded
logx2236 log10 0.0000000006101942339385102585042548 -> -9.214531900562046557191261226632509 Inexact Rounded
logx2237 log10 0.0000000010846867501382746760066557 -> -8.964695664883282406359874242387236 Inexact Rounded
logx2238 log10 60.24078375568814769010333711509928 -> 1.779890613567084253168373266648922 Inexact Rounded
logx2239 log10 0.0012058738711757669337600252986093 -> -2.918698115012605915753728220896010 Inexact Rounded
logx2240 log10 230.9450930197841600611503095185600 -> 2.363508739056822846742942599628966 Inexact Rounded
-- P=16, within 0-999
Precision: 16
logx2101 log10 0.0072067119605184 -> -2.142262835573038 Inexact Rounded
logx2102 log10 503.6828482226624 -> 2.702157162195652 Inexact Rounded
logx2103 log10 64.96074447821815 -> 1.812650993464174 Inexact Rounded
logx2104 log10 48.75408597467246 -> 1.688011018842600 Inexact Rounded
logx2105 log10 0.0329009839269587 -> -1.482791113975280 Inexact Rounded
logx2106 log10 223.5320415060633 -> 2.349339784523410 Inexact Rounded
logx2107 log10 73.12765002292194 -> 1.864081617476268 Inexact Rounded
logx2108 log10 487.3749378358509 -> 2.687863192802252 Inexact Rounded
logx2109 log10 0.0000019671987621 -> -5.706151757557926 Inexact Rounded
logx2110 log10 0.0570680660609784 -> -1.243606844697873 Inexact Rounded
logx2111 log10 33.10311638788998 -> 1.519868880976773 Inexact Rounded
logx2112 log10 0.0687382699187077 -> -1.162801402868185 Inexact Rounded
logx2113 log10 258.9416193626484 -> 2.413201859654145 Inexact Rounded
logx2114 log10 0.0005306100136736 -> -3.275224558269725 Inexact Rounded
logx2115 log10 65.78490393408572 -> 1.818126244825109 Inexact Rounded
logx2116 log10 504.2328842073510 -> 2.702631165346958 Inexact Rounded
logx2117 log10 9.417432755815027 -> 0.9739325278524503 Inexact Rounded
logx2118 log10 006.7054835355498 -> 0.8264301004947640 Inexact Rounded
logx2119 log10 0.0917012272363915 -> -1.037624852133399 Inexact Rounded
logx2120 log10 5.959404385244921 -> 0.7752028561953401 Inexact Rounded
logx2121 log10 0.0001209759148486 -> -3.917301084968903 Inexact Rounded
logx2122 log10 0.0004706112139838 -> -3.327337728428039 Inexact Rounded
logx2123 log10 0.0069700457377046 -> -2.156764372035771 Inexact Rounded
logx2124 log10 0.5155584569852619 -> -0.2877220847805025 Inexact Rounded
logx2125 log10 88.06005885607414 -> 1.944778971389913 Inexact Rounded
logx2126 log10 0.0448240038219866 -> -1.348489353509709 Inexact Rounded
logx2127 log10 3.419622484059565 -> 0.5339781639101145 Inexact Rounded
logx2128 log10 5.171123353858721 -> 0.7135848977142854 Inexact Rounded
logx2129 log10 0.0002133188319807 -> -3.670970802945872 Inexact Rounded
logx2130 log10 46.21086703136966 -> 1.664744117045149 Inexact Rounded
logx2131 log10 0.0000631053714415 -> -4.199933672639880 Inexact Rounded
logx2132 log10 78.66019196870698 -> 1.895755001962469 Inexact Rounded
logx2133 log10 0.0007152278351188 -> -3.145555592082297 Inexact Rounded
logx2134 log10 45.52509819928536 -> 1.658250891256892 Inexact Rounded
logx2135 log10 0.0000703227795740 -> -4.152903971697183 Inexact Rounded
logx2136 log10 26.24438641426669 -> 1.419036423550599 Inexact Rounded
logx2137 log10 0.0000044654829535 -> -5.350131564166817 Inexact Rounded
logx2138 log10 0.7360702733062529 -> -0.1330807211893611 Inexact Rounded
logx2139 log10 8.417059176469655 -> 0.9251603805112778 Inexact Rounded
logx2140 log10 0.0002926570767968 -> -3.533640969664818 Inexact Rounded
-- P=7, within 0-99
Precision: 7
logx2001 log10 57.26089 -> 1.757858 Inexact Rounded
logx2002 log10 0.0575421 -> -1.240014 Inexact Rounded
logx2003 log10 0.5918465 -> -0.2277909 Inexact Rounded
logx2004 log10 0.0068776 -> -2.162563 Inexact Rounded
logx2005 log10 0.0066833 -> -2.175009 Inexact Rounded
logx2006 log10 9.926963 -> 0.9968164 Inexact Rounded
logx2007 log10 0.0041852 -> -2.378284 Inexact Rounded
logx2008 log10 84.15412 -> 1.925075 Inexact Rounded
logx2009 log10 2.466856 -> 0.3921438 Inexact Rounded
logx2010 log10 0.0058047 -> -2.236220 Inexact Rounded
logx2011 log10 9.885154 -> 0.9949834 Inexact Rounded
logx2012 log10 0.6667654 -> -0.1760269 Inexact Rounded
logx2013 log10 34.65736 -> 1.539795 Inexact Rounded
logx2014 log10 0.0026884 -> -2.570506 Inexact Rounded
logx2015 log10 0.0432767 -> -1.363746 Inexact Rounded
logx2016 log10 66.01407 -> 1.819637 Inexact Rounded
logx2017 log10 0.0070572 -> -2.151368 Inexact Rounded
logx2018 log10 0.0731613 -> -1.135719 Inexact Rounded
logx2019 log10 9.838983 -> 0.9929502 Inexact Rounded
logx2020 log10 15.89696 -> 1.201314 Inexact Rounded
logx2021 log10 8.459247 -> 0.9273317 Inexact Rounded
logx2022 log10 0.0010873 -> -2.963651 Inexact Rounded
logx2023 log10 0.6498619 -> -0.1871789 Inexact Rounded
logx2024 log10 0.0847008 -> -1.072112 Inexact Rounded
logx2025 log10 0.0075489 -> -2.122116 Inexact Rounded
logx2026 log10 51.11152 -> 1.708519 Inexact Rounded
logx2027 log10 0.7233866 -> -0.1406295 Inexact Rounded
logx2028 log10 2.254721 -> 0.3530928 Inexact Rounded
logx2029 log10 6.568444 -> 0.8174625 Inexact Rounded
logx2030 log10 83.72639 -> 1.922862 Inexact Rounded
logx2031 log10 6.720585 -> 0.8274071 Inexact Rounded
logx2032 log10 87.90366 -> 1.944007 Inexact Rounded
logx2033 log10 0.0433324 -> -1.363187 Inexact Rounded
logx2034 log10 34.63912 -> 1.539567 Inexact Rounded
logx2035 log10 0.8089059 -> -0.09210200 Inexact Rounded
logx2036 log10 7.793405 -> 0.8917272 Inexact Rounded
logx2037 log10 0.0041757 -> -2.379271 Inexact Rounded
logx2038 log10 7.135417 -> 0.8534194 Inexact Rounded
logx2039 log10 12.49570 -> 1.096761 Inexact Rounded
logx2040 log10 6.356276 -> 0.8032027 Inexact Rounded
--------
maxExponent: 384
minExponent: -383
precision: 16
rounding: half_even
-- special values
logx820 log10 Infinity -> Infinity
logx821 log10 0 -> -Infinity
logx822 log10 NaN -> NaN
logx823 log10 sNaN -> NaN Invalid_operation
-- propagating NaNs
logx824 log10 sNaN123 -> NaN123 Invalid_operation
logx825 log10 -sNaN321 -> -NaN321 Invalid_operation
logx826 log10 NaN456 -> NaN456
logx827 log10 -NaN654 -> -NaN654
logx828 log10 NaN1 -> NaN1
-- Invalid operations due to restrictions
-- [next two probably skipped by most test harnesses]
precision: 100000000
logx901 log10 1 -> NaN Invalid_context
precision: 99999999
logx902 log10 0 -> NaN Invalid_context
precision: 9
maxExponent: 1000000
minExponent: -999999
logx903 log10 1 -> NaN Invalid_context
maxExponent: 999999
minExponent: -999999
logx904 log10 0 -> -Infinity
maxExponent: 999999
minExponent: -1000000
logx905 log10 1 -> NaN Invalid_context
maxExponent: 999999
minExponent: -999998
logx906 log10 0 -> -Infinity
-- Null test
logx900 log10 # -> NaN Invalid_operation

View File

@@ -0,0 +1,188 @@
------------------------------------------------------------------------
-- logb.decTest -- return integral adjusted exponent as per 754r --
-- Copyright (c) IBM Corporation, 2005, 2009. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- This emphasises the testing of notable cases, as they will often
-- have unusual paths (especially the 10**n results).
extended: 1
rounding: half_even
maxExponent: 999
minexponent: -999
-- basics & examples
precision: 9
logbx001 logb 0 -> -Infinity Division_by_zero
logbx002 logb 1E-999 -> -999
logbx003 logb 9E-999 -> -999
logbx004 logb 0.001 -> -3
logbx005 logb 0.03 -> -2
logbx006 logb 1 -> 0
logbx007 logb 2 -> 0
logbx008 logb 2.5 -> 0
logbx009 logb 2.50 -> 0
logbx010 logb 10 -> 1
logbx011 logb 70 -> 1
logbx012 logb 100 -> 2
logbx013 logb 250 -> 2
logbx014 logb +Infinity -> Infinity
-- negatives are treated as positives
logbx021 logb -0 -> -Infinity Division_by_zero
logbx022 logb -1E-999 -> -999
logbx023 logb -9E-999 -> -999
logbx024 logb -0.001 -> -3
logbx025 logb -1 -> 0
logbx026 logb -2 -> 0
logbx027 logb -10 -> 1
logbx028 logb -70 -> 1
logbx029 logb -100 -> 2
logbx030 logb -100000000 -> 8
logbx031 logb -Infinity -> Infinity
-- zeros
logbx111 logb 0 -> -Infinity Division_by_zero
logbx112 logb -0 -> -Infinity Division_by_zero
logbx113 logb 0E+4 -> -Infinity Division_by_zero
logbx114 logb -0E+4 -> -Infinity Division_by_zero
logbx115 logb 0.0000 -> -Infinity Division_by_zero
logbx116 logb -0.0000 -> -Infinity Division_by_zero
logbx117 logb 0E-141 -> -Infinity Division_by_zero
logbx118 logb -0E-141 -> -Infinity Division_by_zero
-- full coefficients, alternating bits
logbx121 logb 268268268 -> 8
logbx122 logb -268268268 -> 8
logbx123 logb 134134134 -> 8
logbx124 logb -134134134 -> 8
-- Nmax, Nmin, Ntiny
logbx131 logb 9.99999999E+999 -> 999
logbx132 logb 1E-999 -> -999
logbx133 logb 1.00000000E-999 -> -999
logbx134 logb 1E-1007 -> -1007
logbx135 logb -1E-1007 -> -1007
logbx136 logb -1.00000000E-999 -> -999
logbx137 logb -1E-999 -> -999
logbx138 logb -9.99999999E+999 -> 999
-- ones
logbx0061 logb 1 -> 0
logbx0062 logb 1.0 -> 0
logbx0063 logb 1.000000000000000 -> 0
logbx0064 logb 1.000000000000000000 -> 0
-- notable cases -- exact powers of 10
logbx1100 logb 1 -> 0
logbx1101 logb 10 -> 1
logbx1102 logb 100 -> 2
logbx1103 logb 1000 -> 3
logbx1104 logb 10000 -> 4
logbx1105 logb 100000 -> 5
logbx1106 logb 1000000 -> 6
logbx1107 logb 10000000 -> 7
logbx1108 logb 100000000 -> 8
logbx1109 logb 1000000000 -> 9
logbx1110 logb 10000000000 -> 10
logbx1111 logb 100000000000 -> 11
logbx1112 logb 1000000000000 -> 12
logbx1113 logb 0.00000000001 -> -11
logbx1114 logb 0.0000000001 -> -10
logbx1115 logb 0.000000001 -> -9
logbx1116 logb 0.00000001 -> -8
logbx1117 logb 0.0000001 -> -7
logbx1118 logb 0.000001 -> -6
logbx1119 logb 0.00001 -> -5
logbx1120 logb 0.0001 -> -4
logbx1121 logb 0.001 -> -3
logbx1122 logb 0.01 -> -2
logbx1123 logb 0.1 -> -1
logbx1124 logb 1E-99 -> -99
logbx1125 logb 1E-100 -> -100
logbx1126 logb 1E-383 -> -383
logbx1127 logb 1E-999 -> -999
-- suggestions from Ilan Nehama
logbx1400 logb 10E-3 -> -2
logbx1401 logb 10E-2 -> -1
logbx1402 logb 100E-2 -> 0
logbx1403 logb 1000E-2 -> 1
logbx1404 logb 10000E-2 -> 2
logbx1405 logb 10E-1 -> 0
logbx1406 logb 100E-1 -> 1
logbx1407 logb 1000E-1 -> 2
logbx1408 logb 10000E-1 -> 3
logbx1409 logb 10E0 -> 1
logbx1410 logb 100E0 -> 2
logbx1411 logb 1000E0 -> 3
logbx1412 logb 10000E0 -> 4
logbx1413 logb 10E1 -> 2
logbx1414 logb 100E1 -> 3
logbx1415 logb 1000E1 -> 4
logbx1416 logb 10000E1 -> 5
logbx1417 logb 10E2 -> 3
logbx1418 logb 100E2 -> 4
logbx1419 logb 1000E2 -> 5
logbx1420 logb 10000E2 -> 6
-- inexacts
precision: 2
logbx1500 logb 10000E2 -> 6
logbx1501 logb 1E+99 -> 99
logbx1502 logb 1E-99 -> -99
logbx1503 logb 1E+100 -> 1.0E+2 Rounded
logbx1504 logb 1E+999 -> 1.0E+3 Inexact Rounded
logbx1505 logb 1E-100 -> -1.0E+2 Rounded
logbx1506 logb 1E-999 -> -1.0E+3 Inexact Rounded
logbx1507 logb 1E-1111 -> -1.1E+3 Inexact Rounded
logbx1508 logb 1E-3333 -> -3.3E+3 Inexact Rounded
logbx1509 logb 1E-6666 -> -6.7E+3 Inexact Rounded
logbx1510 logb 1E+999999999 -> 1.0E+9 Inexact Rounded
logbx1511 logb 1E-999999999 -> -1.0E+9 Inexact Rounded
precision: 1
logbx1517 logb 1E-1111 -> -1E+3 Inexact Rounded
logbx1518 logb 1E-3333 -> -3E+3 Inexact Rounded
logbx1519 logb 1E-6666 -> -7E+3 Inexact Rounded
precision: 8
logbx1520 logb 1E+999999999 -> 1.0000000E+9 Inexact Rounded
logbx1521 logb 1E-999999999 -> -1.0000000E+9 Inexact Rounded
precision: 9
logbx1523 logb 1E+999999999 -> 999999999
logbx1524 logb 1E-999999999 -> -999999999
-- special values
precision: 9
logbx820 logb Infinity -> Infinity
logbx821 logb -Infinity -> Infinity
logbx822 logb 0 -> -Infinity Division_by_zero
logbx823 logb NaN -> NaN
logbx824 logb sNaN -> NaN Invalid_operation
-- propagating NaNs
logbx825 logb sNaN123 -> NaN123 Invalid_operation
logbx826 logb -sNaN321 -> -NaN321 Invalid_operation
logbx827 logb NaN456 -> NaN456
logbx828 logb -NaN654 -> -NaN654
logbx829 logb NaN1 -> NaN1
-- Null test
logbx900 logb # -> NaN Invalid_operation

View File

@@ -0,0 +1,424 @@
------------------------------------------------------------------------
-- max.decTest -- decimal maximum --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- we assume that base comparison is tested in compare.decTest, so
-- these mainly cover special cases and rounding
extended: 1
precision: 9
rounding: half_up
maxExponent: 384
minexponent: -383
-- sanity checks
maxx001 max -2 -2 -> -2
maxx002 max -2 -1 -> -1
maxx003 max -2 0 -> 0
maxx004 max -2 1 -> 1
maxx005 max -2 2 -> 2
maxx006 max -1 -2 -> -1
maxx007 max -1 -1 -> -1
maxx008 max -1 0 -> 0
maxx009 max -1 1 -> 1
maxx010 max -1 2 -> 2
maxx011 max 0 -2 -> 0
maxx012 max 0 -1 -> 0
maxx013 max 0 0 -> 0
maxx014 max 0 1 -> 1
maxx015 max 0 2 -> 2
maxx016 max 1 -2 -> 1
maxx017 max 1 -1 -> 1
maxx018 max 1 0 -> 1
maxx019 max 1 1 -> 1
maxx020 max 1 2 -> 2
maxx021 max 2 -2 -> 2
maxx022 max 2 -1 -> 2
maxx023 max 2 0 -> 2
maxx025 max 2 1 -> 2
maxx026 max 2 2 -> 2
-- extended zeros
maxx030 max 0 0 -> 0
maxx031 max 0 -0 -> 0
maxx032 max 0 -0.0 -> 0
maxx033 max 0 0.0 -> 0
maxx034 max -0 0 -> 0 -- note: -0 = 0, but 0 chosen
maxx035 max -0 -0 -> -0
maxx036 max -0 -0.0 -> -0.0
maxx037 max -0 0.0 -> 0.0
maxx038 max 0.0 0 -> 0
maxx039 max 0.0 -0 -> 0.0
maxx040 max 0.0 -0.0 -> 0.0
maxx041 max 0.0 0.0 -> 0.0
maxx042 max -0.0 0 -> 0
maxx043 max -0.0 -0 -> -0.0
maxx044 max -0.0 -0.0 -> -0.0
maxx045 max -0.0 0.0 -> 0.0
maxx050 max -0E1 0E1 -> 0E+1
maxx051 max -0E2 0E2 -> 0E+2
maxx052 max -0E2 0E1 -> 0E+1
maxx053 max -0E1 0E2 -> 0E+2
maxx054 max 0E1 -0E1 -> 0E+1
maxx055 max 0E2 -0E2 -> 0E+2
maxx056 max 0E2 -0E1 -> 0E+2
maxx057 max 0E1 -0E2 -> 0E+1
maxx058 max 0E1 0E1 -> 0E+1
maxx059 max 0E2 0E2 -> 0E+2
maxx060 max 0E2 0E1 -> 0E+2
maxx061 max 0E1 0E2 -> 0E+2
maxx062 max -0E1 -0E1 -> -0E+1
maxx063 max -0E2 -0E2 -> -0E+2
maxx064 max -0E2 -0E1 -> -0E+1
maxx065 max -0E1 -0E2 -> -0E+1
-- Specials
precision: 9
maxx090 max Inf -Inf -> Infinity
maxx091 max Inf -1000 -> Infinity
maxx092 max Inf -1 -> Infinity
maxx093 max Inf -0 -> Infinity
maxx094 max Inf 0 -> Infinity
maxx095 max Inf 1 -> Infinity
maxx096 max Inf 1000 -> Infinity
maxx097 max Inf Inf -> Infinity
maxx098 max -1000 Inf -> Infinity
maxx099 max -Inf Inf -> Infinity
maxx100 max -1 Inf -> Infinity
maxx101 max -0 Inf -> Infinity
maxx102 max 0 Inf -> Infinity
maxx103 max 1 Inf -> Infinity
maxx104 max 1000 Inf -> Infinity
maxx105 max Inf Inf -> Infinity
maxx120 max -Inf -Inf -> -Infinity
maxx121 max -Inf -1000 -> -1000
maxx122 max -Inf -1 -> -1
maxx123 max -Inf -0 -> -0
maxx124 max -Inf 0 -> 0
maxx125 max -Inf 1 -> 1
maxx126 max -Inf 1000 -> 1000
maxx127 max -Inf Inf -> Infinity
maxx128 max -Inf -Inf -> -Infinity
maxx129 max -1000 -Inf -> -1000
maxx130 max -1 -Inf -> -1
maxx131 max -0 -Inf -> -0
maxx132 max 0 -Inf -> 0
maxx133 max 1 -Inf -> 1
maxx134 max 1000 -Inf -> 1000
maxx135 max Inf -Inf -> Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
maxx141 max NaN -Inf -> -Infinity
maxx142 max NaN -1000 -> -1000
maxx143 max NaN -1 -> -1
maxx144 max NaN -0 -> -0
maxx145 max NaN 0 -> 0
maxx146 max NaN 1 -> 1
maxx147 max NaN 1000 -> 1000
maxx148 max NaN Inf -> Infinity
maxx149 max NaN NaN -> NaN
maxx150 max -Inf NaN -> -Infinity
maxx151 max -1000 NaN -> -1000
maxx152 max -1 NaN -> -1
maxx153 max -0 NaN -> -0
maxx154 max 0 NaN -> 0
maxx155 max 1 NaN -> 1
maxx156 max 1000 NaN -> 1000
maxx157 max Inf NaN -> Infinity
maxx161 max sNaN -Inf -> NaN Invalid_operation
maxx162 max sNaN -1000 -> NaN Invalid_operation
maxx163 max sNaN -1 -> NaN Invalid_operation
maxx164 max sNaN -0 -> NaN Invalid_operation
maxx165 max sNaN 0 -> NaN Invalid_operation
maxx166 max sNaN 1 -> NaN Invalid_operation
maxx167 max sNaN 1000 -> NaN Invalid_operation
maxx168 max sNaN NaN -> NaN Invalid_operation
maxx169 max sNaN sNaN -> NaN Invalid_operation
maxx170 max NaN sNaN -> NaN Invalid_operation
maxx171 max -Inf sNaN -> NaN Invalid_operation
maxx172 max -1000 sNaN -> NaN Invalid_operation
maxx173 max -1 sNaN -> NaN Invalid_operation
maxx174 max -0 sNaN -> NaN Invalid_operation
maxx175 max 0 sNaN -> NaN Invalid_operation
maxx176 max 1 sNaN -> NaN Invalid_operation
maxx177 max 1000 sNaN -> NaN Invalid_operation
maxx178 max Inf sNaN -> NaN Invalid_operation
maxx179 max NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
maxx181 max NaN9 -Inf -> -Infinity
maxx182 max NaN8 9 -> 9
maxx183 max -NaN7 Inf -> Infinity
maxx184 max -NaN1 NaN11 -> -NaN1
maxx185 max NaN2 NaN12 -> NaN2
maxx186 max -NaN13 -NaN7 -> -NaN13
maxx187 max NaN14 -NaN5 -> NaN14
maxx188 max -Inf NaN4 -> -Infinity
maxx189 max -9 -NaN3 -> -9
maxx190 max Inf NaN2 -> Infinity
maxx191 max sNaN99 -Inf -> NaN99 Invalid_operation
maxx192 max sNaN98 -1 -> NaN98 Invalid_operation
maxx193 max -sNaN97 NaN -> -NaN97 Invalid_operation
maxx194 max sNaN96 sNaN94 -> NaN96 Invalid_operation
maxx195 max NaN95 sNaN93 -> NaN93 Invalid_operation
maxx196 max -Inf sNaN92 -> NaN92 Invalid_operation
maxx197 max 0 sNaN91 -> NaN91 Invalid_operation
maxx198 max Inf -sNaN90 -> -NaN90 Invalid_operation
maxx199 max NaN sNaN89 -> NaN89 Invalid_operation
-- rounding checks
maxexponent: 999
minexponent: -999
precision: 9
maxx201 max 12345678000 1 -> 1.23456780E+10 Rounded
maxx202 max 1 12345678000 -> 1.23456780E+10 Rounded
maxx203 max 1234567800 1 -> 1.23456780E+9 Rounded
maxx204 max 1 1234567800 -> 1.23456780E+9 Rounded
maxx205 max 1234567890 1 -> 1.23456789E+9 Rounded
maxx206 max 1 1234567890 -> 1.23456789E+9 Rounded
maxx207 max 1234567891 1 -> 1.23456789E+9 Inexact Rounded
maxx208 max 1 1234567891 -> 1.23456789E+9 Inexact Rounded
maxx209 max 12345678901 1 -> 1.23456789E+10 Inexact Rounded
maxx210 max 1 12345678901 -> 1.23456789E+10 Inexact Rounded
maxx211 max 1234567896 1 -> 1.23456790E+9 Inexact Rounded
maxx212 max 1 1234567896 -> 1.23456790E+9 Inexact Rounded
maxx213 max -1234567891 1 -> 1
maxx214 max 1 -1234567891 -> 1
maxx215 max -12345678901 1 -> 1
maxx216 max 1 -12345678901 -> 1
maxx217 max -1234567896 1 -> 1
maxx218 max 1 -1234567896 -> 1
precision: 15
maxx221 max 12345678000 1 -> 12345678000
maxx222 max 1 12345678000 -> 12345678000
maxx223 max 1234567800 1 -> 1234567800
maxx224 max 1 1234567800 -> 1234567800
maxx225 max 1234567890 1 -> 1234567890
maxx226 max 1 1234567890 -> 1234567890
maxx227 max 1234567891 1 -> 1234567891
maxx228 max 1 1234567891 -> 1234567891
maxx229 max 12345678901 1 -> 12345678901
maxx230 max 1 12345678901 -> 12345678901
maxx231 max 1234567896 1 -> 1234567896
maxx232 max 1 1234567896 -> 1234567896
maxx233 max -1234567891 1 -> 1
maxx234 max 1 -1234567891 -> 1
maxx235 max -12345678901 1 -> 1
maxx236 max 1 -12345678901 -> 1
maxx237 max -1234567896 1 -> 1
maxx238 max 1 -1234567896 -> 1
-- from examples
maxx280 max '3' '2' -> '3'
maxx281 max '-10' '3' -> '3'
maxx282 max '1.0' '1' -> '1'
maxx283 max '1' '1.0' -> '1'
maxx284 max '7' 'NaN' -> '7'
-- overflow and underflow tests ...
maxExponent: 999999999
minexponent: -999999999
maxx330 max +1.23456789012345E-0 9E+999999999 -> 9E+999999999
maxx331 max 9E+999999999 +1.23456789012345E-0 -> 9E+999999999
maxx332 max +0.100 9E-999999999 -> 0.100
maxx333 max 9E-999999999 +0.100 -> 0.100
maxx335 max -1.23456789012345E-0 9E+999999999 -> 9E+999999999
maxx336 max 9E+999999999 -1.23456789012345E-0 -> 9E+999999999
maxx337 max -0.100 9E-999999999 -> 9E-999999999
maxx338 max 9E-999999999 -0.100 -> 9E-999999999
maxx339 max 1e-599999999 1e-400000001 -> 1E-400000001
maxx340 max 1e-599999999 1e-400000000 -> 1E-400000000
maxx341 max 1e-600000000 1e-400000000 -> 1E-400000000
maxx342 max 9e-999999998 0.01 -> 0.01
maxx343 max 9e-999999998 0.1 -> 0.1
maxx344 max 0.01 9e-999999998 -> 0.01
maxx345 max 1e599999999 1e400000001 -> 1E+599999999
maxx346 max 1e599999999 1e400000000 -> 1E+599999999
maxx347 max 1e600000000 1e400000000 -> 1E+600000000
maxx348 max 9e999999998 100 -> 9E+999999998
maxx349 max 9e999999998 10 -> 9E+999999998
maxx350 max 100 9e999999998 -> 9E+999999998
-- signs
maxx351 max 1e+777777777 1e+411111111 -> 1E+777777777
maxx352 max 1e+777777777 -1e+411111111 -> 1E+777777777
maxx353 max -1e+777777777 1e+411111111 -> 1E+411111111
maxx354 max -1e+777777777 -1e+411111111 -> -1E+411111111
maxx355 max 1e-777777777 1e-411111111 -> 1E-411111111
maxx356 max 1e-777777777 -1e-411111111 -> 1E-777777777
maxx357 max -1e-777777777 1e-411111111 -> 1E-411111111
maxx358 max -1e-777777777 -1e-411111111 -> -1E-777777777
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
maxx401 max Inf 1.1 -> Infinity
maxx402 max 1.1 1 -> 1.1
maxx403 max 1 1.0 -> 1
maxx404 max 1.0 0.1 -> 1.0
maxx405 max 0.1 0.10 -> 0.1
maxx406 max 0.10 0.100 -> 0.10
maxx407 max 0.10 0 -> 0.10
maxx408 max 0 0.0 -> 0
maxx409 max 0.0 -0 -> 0.0
maxx410 max 0.0 -0.0 -> 0.0
maxx411 max 0.00 -0.0 -> 0.00
maxx412 max 0.0 -0.00 -> 0.0
maxx413 max 0 -0.0 -> 0
maxx414 max 0 -0 -> 0
maxx415 max -0.0 -0 -> -0.0
maxx416 max -0 -0.100 -> -0
maxx417 max -0.100 -0.10 -> -0.100
maxx418 max -0.10 -0.1 -> -0.10
maxx419 max -0.1 -1.0 -> -0.1
maxx420 max -1.0 -1 -> -1.0
maxx421 max -1 -1.1 -> -1
maxx423 max -1.1 -Inf -> -1.1
-- same with operands reversed
maxx431 max 1.1 Inf -> Infinity
maxx432 max 1 1.1 -> 1.1
maxx433 max 1.0 1 -> 1
maxx434 max 0.1 1.0 -> 1.0
maxx435 max 0.10 0.1 -> 0.1
maxx436 max 0.100 0.10 -> 0.10
maxx437 max 0 0.10 -> 0.10
maxx438 max 0.0 0 -> 0
maxx439 max -0 0.0 -> 0.0
maxx440 max -0.0 0.0 -> 0.0
maxx441 max -0.0 0.00 -> 0.00
maxx442 max -0.00 0.0 -> 0.0
maxx443 max -0.0 0 -> 0
maxx444 max -0 0 -> 0
maxx445 max -0 -0.0 -> -0.0
maxx446 max -0.100 -0 -> -0
maxx447 max -0.10 -0.100 -> -0.100
maxx448 max -0.1 -0.10 -> -0.10
maxx449 max -1.0 -0.1 -> -0.1
maxx450 max -1 -1.0 -> -1.0
maxx451 max -1.1 -1 -> -1
maxx453 max -Inf -1.1 -> -1.1
-- largies
maxx460 max 1000 1E+3 -> 1E+3
maxx461 max 1E+3 1000 -> 1E+3
maxx462 max 1000 -1E+3 -> 1000
maxx463 max 1E+3 -1000 -> 1E+3
maxx464 max -1000 1E+3 -> 1E+3
maxx465 max -1E+3 1000 -> 1000
maxx466 max -1000 -1E+3 -> -1000
maxx467 max -1E+3 -1000 -> -1000
-- rounding (results treated as though plus)
maxexponent: 999999999
minexponent: -999999999
precision: 3
maxx470 max 1 .5 -> 1
maxx471 max 10 5 -> 10
maxx472 max 100 50 -> 100
maxx473 max 1000 500 -> 1.00E+3 Rounded
maxx474 max 10000 5000 -> 1.00E+4 Rounded
maxx475 max 6 .5 -> 6
maxx476 max 66 5 -> 66
maxx477 max 666 50 -> 666
maxx478 max 6666 500 -> 6.67E+3 Rounded Inexact
maxx479 max 66666 5000 -> 6.67E+4 Rounded Inexact
maxx480 max 33333 5000 -> 3.33E+4 Rounded Inexact
maxx481 max .5 1 -> 1
maxx482 max .5 10 -> 10
maxx483 max .5 100 -> 100
maxx484 max .5 1000 -> 1.00E+3 Rounded
maxx485 max .5 10000 -> 1.00E+4 Rounded
maxx486 max .5 6 -> 6
maxx487 max .5 66 -> 66
maxx488 max .5 666 -> 666
maxx489 max .5 6666 -> 6.67E+3 Rounded Inexact
maxx490 max .5 66666 -> 6.67E+4 Rounded Inexact
maxx491 max .5 33333 -> 3.33E+4 Rounded Inexact
-- overflow tests
maxexponent: 999999999
minexponent: -999999999
precision: 3
maxx500 max 9.999E+999999999 0 -> Infinity Inexact Overflow Rounded
maxx501 max -9.999E+999999999 0 -> 0
-- subnormals and underflow
precision: 3
maxexponent: 999
minexponent: -999
maxx510 max 1.00E-999 0 -> 1.00E-999
maxx511 max 0.1E-999 0 -> 1E-1000 Subnormal
maxx512 max 0.10E-999 0 -> 1.0E-1000 Subnormal
maxx513 max 0.100E-999 0 -> 1.0E-1000 Subnormal Rounded
maxx514 max 0.01E-999 0 -> 1E-1001 Subnormal
-- next is rounded to Nmin
maxx515 max 0.999E-999 0 -> 1.00E-999 Inexact Rounded Subnormal Underflow
maxx516 max 0.099E-999 0 -> 1.0E-1000 Inexact Rounded Subnormal Underflow
maxx517 max 0.009E-999 0 -> 1E-1001 Inexact Rounded Subnormal Underflow
maxx518 max 0.001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
maxx519 max 0.0009E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
maxx520 max 0.0001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
maxx530 max -1.00E-999 0 -> 0
maxx531 max -0.1E-999 0 -> 0
maxx532 max -0.10E-999 0 -> 0
maxx533 max -0.100E-999 0 -> 0
maxx534 max -0.01E-999 0 -> 0
maxx535 max -0.999E-999 0 -> 0
maxx536 max -0.099E-999 0 -> 0
maxx537 max -0.009E-999 0 -> 0
maxx538 max -0.001E-999 0 -> 0
maxx539 max -0.0009E-999 0 -> 0
maxx540 max -0.0001E-999 0 -> 0
-- misalignment traps for little-endian
precision: 9
maxx551 max 1.0 0.1 -> 1.0
maxx552 max 0.1 1.0 -> 1.0
maxx553 max 10.0 0.1 -> 10.0
maxx554 max 0.1 10.0 -> 10.0
maxx555 max 100 1.0 -> 100
maxx556 max 1.0 100 -> 100
maxx557 max 1000 10.0 -> 1000
maxx558 max 10.0 1000 -> 1000
maxx559 max 10000 100.0 -> 10000
maxx560 max 100.0 10000 -> 10000
maxx661 max 100000 1000.0 -> 100000
maxx662 max 1000.0 100000 -> 100000
maxx663 max 1000000 10000.0 -> 1000000
maxx664 max 10000.0 1000000 -> 1000000
-- payload decapitate
precision: 5
maxx670 max 11 -sNaN12345678901 -> -NaN78901 Invalid_operation
-- Null tests
maxx900 max 10 # -> NaN Invalid_operation
maxx901 max # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,404 @@
------------------------------------------------------------------------
-- maxmag.decTest -- decimal maximum by magnitude --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- we assume that base comparison is tested in compare.decTest, so
-- these mainly cover special cases and rounding
extended: 1
precision: 9
rounding: half_up
maxExponent: 384
minexponent: -383
-- sanity checks
mxgx001 maxmag -2 -2 -> -2
mxgx002 maxmag -2 -1 -> -2
mxgx003 maxmag -2 0 -> -2
mxgx004 maxmag -2 1 -> -2
mxgx005 maxmag -2 2 -> 2
mxgx006 maxmag -1 -2 -> -2
mxgx007 maxmag -1 -1 -> -1
mxgx008 maxmag -1 0 -> -1
mxgx009 maxmag -1 1 -> 1
mxgx010 maxmag -1 2 -> 2
mxgx011 maxmag 0 -2 -> -2
mxgx012 maxmag 0 -1 -> -1
mxgx013 maxmag 0 0 -> 0
mxgx014 maxmag 0 1 -> 1
mxgx015 maxmag 0 2 -> 2
mxgx016 maxmag 1 -2 -> -2
mxgx017 maxmag 1 -1 -> 1
mxgx018 maxmag 1 0 -> 1
mxgx019 maxmag 1 1 -> 1
mxgx020 maxmag 1 2 -> 2
mxgx021 maxmag 2 -2 -> 2
mxgx022 maxmag 2 -1 -> 2
mxgx023 maxmag 2 0 -> 2
mxgx025 maxmag 2 1 -> 2
mxgx026 maxmag 2 2 -> 2
-- extended zeros
mxgx030 maxmag 0 0 -> 0
mxgx031 maxmag 0 -0 -> 0
mxgx032 maxmag 0 -0.0 -> 0
mxgx033 maxmag 0 0.0 -> 0
mxgx034 maxmag -0 0 -> 0 -- note: -0 = 0, but 0 chosen
mxgx035 maxmag -0 -0 -> -0
mxgx036 maxmag -0 -0.0 -> -0.0
mxgx037 maxmag -0 0.0 -> 0.0
mxgx038 maxmag 0.0 0 -> 0
mxgx039 maxmag 0.0 -0 -> 0.0
mxgx040 maxmag 0.0 -0.0 -> 0.0
mxgx041 maxmag 0.0 0.0 -> 0.0
mxgx042 maxmag -0.0 0 -> 0
mxgx043 maxmag -0.0 -0 -> -0.0
mxgx044 maxmag -0.0 -0.0 -> -0.0
mxgx045 maxmag -0.0 0.0 -> 0.0
mxgx050 maxmag -0E1 0E1 -> 0E+1
mxgx051 maxmag -0E2 0E2 -> 0E+2
mxgx052 maxmag -0E2 0E1 -> 0E+1
mxgx053 maxmag -0E1 0E2 -> 0E+2
mxgx054 maxmag 0E1 -0E1 -> 0E+1
mxgx055 maxmag 0E2 -0E2 -> 0E+2
mxgx056 maxmag 0E2 -0E1 -> 0E+2
mxgx057 maxmag 0E1 -0E2 -> 0E+1
mxgx058 maxmag 0E1 0E1 -> 0E+1
mxgx059 maxmag 0E2 0E2 -> 0E+2
mxgx060 maxmag 0E2 0E1 -> 0E+2
mxgx061 maxmag 0E1 0E2 -> 0E+2
mxgx062 maxmag -0E1 -0E1 -> -0E+1
mxgx063 maxmag -0E2 -0E2 -> -0E+2
mxgx064 maxmag -0E2 -0E1 -> -0E+1
mxgx065 maxmag -0E1 -0E2 -> -0E+1
-- Specials
precision: 9
mxgx090 maxmag Inf -Inf -> Infinity
mxgx091 maxmag Inf -1000 -> Infinity
mxgx092 maxmag Inf -1 -> Infinity
mxgx093 maxmag Inf -0 -> Infinity
mxgx094 maxmag Inf 0 -> Infinity
mxgx095 maxmag Inf 1 -> Infinity
mxgx096 maxmag Inf 1000 -> Infinity
mxgx097 maxmag Inf Inf -> Infinity
mxgx098 maxmag -1000 Inf -> Infinity
mxgx099 maxmag -Inf Inf -> Infinity
mxgx100 maxmag -1 Inf -> Infinity
mxgx101 maxmag -0 Inf -> Infinity
mxgx102 maxmag 0 Inf -> Infinity
mxgx103 maxmag 1 Inf -> Infinity
mxgx104 maxmag 1000 Inf -> Infinity
mxgx105 maxmag Inf Inf -> Infinity
mxgx120 maxmag -Inf -Inf -> -Infinity
mxgx121 maxmag -Inf -1000 -> -Infinity
mxgx122 maxmag -Inf -1 -> -Infinity
mxgx123 maxmag -Inf -0 -> -Infinity
mxgx124 maxmag -Inf 0 -> -Infinity
mxgx125 maxmag -Inf 1 -> -Infinity
mxgx126 maxmag -Inf 1000 -> -Infinity
mxgx127 maxmag -Inf Inf -> Infinity
mxgx128 maxmag -Inf -Inf -> -Infinity
mxgx129 maxmag -1000 -Inf -> -Infinity
mxgx130 maxmag -1 -Inf -> -Infinity
mxgx131 maxmag -0 -Inf -> -Infinity
mxgx132 maxmag 0 -Inf -> -Infinity
mxgx133 maxmag 1 -Inf -> -Infinity
mxgx134 maxmag 1000 -Inf -> -Infinity
mxgx135 maxmag Inf -Inf -> Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
mxgx141 maxmag NaN -Inf -> -Infinity
mxgx142 maxmag NaN -1000 -> -1000
mxgx143 maxmag NaN -1 -> -1
mxgx144 maxmag NaN -0 -> -0
mxgx145 maxmag NaN 0 -> 0
mxgx146 maxmag NaN 1 -> 1
mxgx147 maxmag NaN 1000 -> 1000
mxgx148 maxmag NaN Inf -> Infinity
mxgx149 maxmag NaN NaN -> NaN
mxgx150 maxmag -Inf NaN -> -Infinity
mxgx151 maxmag -1000 NaN -> -1000
mxgx152 maxmag -1 NaN -> -1
mxgx153 maxmag -0 NaN -> -0
mxgx154 maxmag 0 NaN -> 0
mxgx155 maxmag 1 NaN -> 1
mxgx156 maxmag 1000 NaN -> 1000
mxgx157 maxmag Inf NaN -> Infinity
mxgx161 maxmag sNaN -Inf -> NaN Invalid_operation
mxgx162 maxmag sNaN -1000 -> NaN Invalid_operation
mxgx163 maxmag sNaN -1 -> NaN Invalid_operation
mxgx164 maxmag sNaN -0 -> NaN Invalid_operation
mxgx165 maxmag sNaN 0 -> NaN Invalid_operation
mxgx166 maxmag sNaN 1 -> NaN Invalid_operation
mxgx167 maxmag sNaN 1000 -> NaN Invalid_operation
mxgx168 maxmag sNaN NaN -> NaN Invalid_operation
mxgx169 maxmag sNaN sNaN -> NaN Invalid_operation
mxgx170 maxmag NaN sNaN -> NaN Invalid_operation
mxgx171 maxmag -Inf sNaN -> NaN Invalid_operation
mxgx172 maxmag -1000 sNaN -> NaN Invalid_operation
mxgx173 maxmag -1 sNaN -> NaN Invalid_operation
mxgx174 maxmag -0 sNaN -> NaN Invalid_operation
mxgx175 maxmag 0 sNaN -> NaN Invalid_operation
mxgx176 maxmag 1 sNaN -> NaN Invalid_operation
mxgx177 maxmag 1000 sNaN -> NaN Invalid_operation
mxgx178 maxmag Inf sNaN -> NaN Invalid_operation
mxgx179 maxmag NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
mxgx181 maxmag NaN9 -Inf -> -Infinity
mxgx182 maxmag NaN8 9 -> 9
mxgx183 maxmag -NaN7 Inf -> Infinity
mxgx184 maxmag -NaN1 NaN11 -> -NaN1
mxgx185 maxmag NaN2 NaN12 -> NaN2
mxgx186 maxmag -NaN13 -NaN7 -> -NaN13
mxgx187 maxmag NaN14 -NaN5 -> NaN14
mxgx188 maxmag -Inf NaN4 -> -Infinity
mxgx189 maxmag -9 -NaN3 -> -9
mxgx190 maxmag Inf NaN2 -> Infinity
mxgx191 maxmag sNaN99 -Inf -> NaN99 Invalid_operation
mxgx192 maxmag sNaN98 -1 -> NaN98 Invalid_operation
mxgx193 maxmag -sNaN97 NaN -> -NaN97 Invalid_operation
mxgx194 maxmag sNaN96 sNaN94 -> NaN96 Invalid_operation
mxgx195 maxmag NaN95 sNaN93 -> NaN93 Invalid_operation
mxgx196 maxmag -Inf sNaN92 -> NaN92 Invalid_operation
mxgx197 maxmag 0 sNaN91 -> NaN91 Invalid_operation
mxgx198 maxmag Inf -sNaN90 -> -NaN90 Invalid_operation
mxgx199 maxmag NaN sNaN89 -> NaN89 Invalid_operation
-- rounding checks
maxexponent: 999
minexponent: -999
precision: 9
mxgx201 maxmag 12345678000 1 -> 1.23456780E+10 Rounded
mxgx202 maxmag 1 12345678000 -> 1.23456780E+10 Rounded
mxgx203 maxmag 1234567800 1 -> 1.23456780E+9 Rounded
mxgx204 maxmag 1 1234567800 -> 1.23456780E+9 Rounded
mxgx205 maxmag 1234567890 1 -> 1.23456789E+9 Rounded
mxgx206 maxmag 1 1234567890 -> 1.23456789E+9 Rounded
mxgx207 maxmag 1234567891 1 -> 1.23456789E+9 Inexact Rounded
mxgx208 maxmag 1 1234567891 -> 1.23456789E+9 Inexact Rounded
mxgx209 maxmag 12345678901 1 -> 1.23456789E+10 Inexact Rounded
mxgx210 maxmag 1 12345678901 -> 1.23456789E+10 Inexact Rounded
mxgx211 maxmag 1234567896 1 -> 1.23456790E+9 Inexact Rounded
mxgx212 maxmag 1 1234567896 -> 1.23456790E+9 Inexact Rounded
mxgx213 maxmag -1234567891 1 -> -1.23456789E+9 Inexact Rounded
mxgx214 maxmag 1 -1234567891 -> -1.23456789E+9 Inexact Rounded
mxgx215 maxmag -12345678901 1 -> -1.23456789E+10 Inexact Rounded
mxgx216 maxmag 1 -12345678901 -> -1.23456789E+10 Inexact Rounded
mxgx217 maxmag -1234567896 1 -> -1.23456790E+9 Inexact Rounded
mxgx218 maxmag 1 -1234567896 -> -1.23456790E+9 Inexact Rounded
precision: 15
mxgx221 maxmag 12345678000 1 -> 12345678000
mxgx222 maxmag 1 12345678000 -> 12345678000
mxgx223 maxmag 1234567800 1 -> 1234567800
mxgx224 maxmag 1 1234567800 -> 1234567800
mxgx225 maxmag 1234567890 1 -> 1234567890
mxgx226 maxmag 1 1234567890 -> 1234567890
mxgx227 maxmag 1234567891 1 -> 1234567891
mxgx228 maxmag 1 1234567891 -> 1234567891
mxgx229 maxmag 12345678901 1 -> 12345678901
mxgx230 maxmag 1 12345678901 -> 12345678901
mxgx231 maxmag 1234567896 1 -> 1234567896
mxgx232 maxmag 1 1234567896 -> 1234567896
mxgx233 maxmag -1234567891 1 -> -1234567891
mxgx234 maxmag 1 -1234567891 -> -1234567891
mxgx235 maxmag -12345678901 1 -> -12345678901
mxgx236 maxmag 1 -12345678901 -> -12345678901
mxgx237 maxmag -1234567896 1 -> -1234567896
mxgx238 maxmag 1 -1234567896 -> -1234567896
-- from examples
mxgx280 maxmag '3' '2' -> '3'
mxgx281 maxmag '-10' '3' -> '-10'
mxgx282 maxmag '1.0' '1' -> '1'
mxgx283 maxmag '1' '1.0' -> '1'
mxgx284 maxmag '7' 'NaN' -> '7'
-- overflow and underflow tests ...
maxExponent: 999999999
minexponent: -999999999
mxgx330 maxmag +1.23456789012345E-0 9E+999999999 -> 9E+999999999
mxgx331 maxmag 9E+999999999 +1.23456789012345E-0 -> 9E+999999999
mxgx332 maxmag +0.100 9E-999999999 -> 0.100
mxgx333 maxmag 9E-999999999 +0.100 -> 0.100
mxgx335 maxmag -1.23456789012345E-0 9E+999999999 -> 9E+999999999
mxgx336 maxmag 9E+999999999 -1.23456789012345E-0 -> 9E+999999999
mxgx337 maxmag -0.100 9E-999999999 -> -0.100
mxgx338 maxmag 9E-999999999 -0.100 -> -0.100
mxgx339 maxmag 1e-599999999 1e-400000001 -> 1E-400000001
mxgx340 maxmag 1e-599999999 1e-400000000 -> 1E-400000000
mxgx341 maxmag 1e-600000000 1e-400000000 -> 1E-400000000
mxgx342 maxmag 9e-999999998 0.01 -> 0.01
mxgx343 maxmag 9e-999999998 0.1 -> 0.1
mxgx344 maxmag 0.01 9e-999999998 -> 0.01
mxgx345 maxmag 1e599999999 1e400000001 -> 1E+599999999
mxgx346 maxmag 1e599999999 1e400000000 -> 1E+599999999
mxgx347 maxmag 1e600000000 1e400000000 -> 1E+600000000
mxgx348 maxmag 9e999999998 100 -> 9E+999999998
mxgx349 maxmag 9e999999998 10 -> 9E+999999998
mxgx350 maxmag 100 9e999999998 -> 9E+999999998
-- signs
mxgx351 maxmag 1e+777777777 1e+411111111 -> 1E+777777777
mxgx352 maxmag 1e+777777777 -1e+411111111 -> 1E+777777777
mxgx353 maxmag -1e+777777777 1e+411111111 -> -1E+777777777
mxgx354 maxmag -1e+777777777 -1e+411111111 -> -1E+777777777
mxgx355 maxmag 1e-777777777 1e-411111111 -> 1E-411111111
mxgx356 maxmag 1e-777777777 -1e-411111111 -> -1E-411111111
mxgx357 maxmag -1e-777777777 1e-411111111 -> 1E-411111111
mxgx358 maxmag -1e-777777777 -1e-411111111 -> -1E-411111111
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
mxgx401 maxmag Inf 1.1 -> Infinity
mxgx402 maxmag 1.1 1 -> 1.1
mxgx403 maxmag 1 1.0 -> 1
mxgx404 maxmag 1.0 0.1 -> 1.0
mxgx405 maxmag 0.1 0.10 -> 0.1
mxgx406 maxmag 0.10 0.100 -> 0.10
mxgx407 maxmag 0.10 0 -> 0.10
mxgx408 maxmag 0 0.0 -> 0
mxgx409 maxmag 0.0 -0 -> 0.0
mxgx410 maxmag 0.0 -0.0 -> 0.0
mxgx411 maxmag 0.00 -0.0 -> 0.00
mxgx412 maxmag 0.0 -0.00 -> 0.0
mxgx413 maxmag 0 -0.0 -> 0
mxgx414 maxmag 0 -0 -> 0
mxgx415 maxmag -0.0 -0 -> -0.0
mxgx416 maxmag -0 -0.100 -> -0.100
mxgx417 maxmag -0.100 -0.10 -> -0.100
mxgx418 maxmag -0.10 -0.1 -> -0.10
mxgx419 maxmag -0.1 -1.0 -> -1.0
mxgx420 maxmag -1.0 -1 -> -1.0
mxgx421 maxmag -1 -1.1 -> -1.1
mxgx423 maxmag -1.1 -Inf -> -Infinity
-- same with operands reversed
mxgx431 maxmag 1.1 Inf -> Infinity
mxgx432 maxmag 1 1.1 -> 1.1
mxgx433 maxmag 1.0 1 -> 1
mxgx434 maxmag 0.1 1.0 -> 1.0
mxgx435 maxmag 0.10 0.1 -> 0.1
mxgx436 maxmag 0.100 0.10 -> 0.10
mxgx437 maxmag 0 0.10 -> 0.10
mxgx438 maxmag 0.0 0 -> 0
mxgx439 maxmag -0 0.0 -> 0.0
mxgx440 maxmag -0.0 0.0 -> 0.0
mxgx441 maxmag -0.0 0.00 -> 0.00
mxgx442 maxmag -0.00 0.0 -> 0.0
mxgx443 maxmag -0.0 0 -> 0
mxgx444 maxmag -0 0 -> 0
mxgx445 maxmag -0 -0.0 -> -0.0
mxgx446 maxmag -0.100 -0 -> -0.100
mxgx447 maxmag -0.10 -0.100 -> -0.100
mxgx448 maxmag -0.1 -0.10 -> -0.10
mxgx449 maxmag -1.0 -0.1 -> -1.0
mxgx450 maxmag -1 -1.0 -> -1.0
mxgx451 maxmag -1.1 -1 -> -1.1
mxgx453 maxmag -Inf -1.1 -> -Infinity
-- largies
mxgx460 maxmag 1000 1E+3 -> 1E+3
mxgx461 maxmag 1E+3 1000 -> 1E+3
mxgx462 maxmag 1000 -1E+3 -> 1000
mxgx463 maxmag 1E+3 -1000 -> 1E+3
mxgx464 maxmag -1000 1E+3 -> 1E+3
mxgx465 maxmag -1E+3 1000 -> 1000
mxgx466 maxmag -1000 -1E+3 -> -1000
mxgx467 maxmag -1E+3 -1000 -> -1000
-- rounding (results treated as though plus)
maxexponent: 999999999
minexponent: -999999999
precision: 3
mxgx470 maxmag 1 .5 -> 1
mxgx471 maxmag 10 5 -> 10
mxgx472 maxmag 100 50 -> 100
mxgx473 maxmag 1000 500 -> 1.00E+3 Rounded
mxgx474 maxmag 10000 5000 -> 1.00E+4 Rounded
mxgx475 maxmag 6 .5 -> 6
mxgx476 maxmag 66 5 -> 66
mxgx477 maxmag 666 50 -> 666
mxgx478 maxmag 6666 500 -> 6.67E+3 Rounded Inexact
mxgx479 maxmag 66666 5000 -> 6.67E+4 Rounded Inexact
mxgx480 maxmag 33333 5000 -> 3.33E+4 Rounded Inexact
mxgx481 maxmag .5 1 -> 1
mxgx482 maxmag .5 10 -> 10
mxgx483 maxmag .5 100 -> 100
mxgx484 maxmag .5 1000 -> 1.00E+3 Rounded
mxgx485 maxmag .5 10000 -> 1.00E+4 Rounded
mxgx486 maxmag .5 6 -> 6
mxgx487 maxmag .5 66 -> 66
mxgx488 maxmag .5 666 -> 666
mxgx489 maxmag .5 6666 -> 6.67E+3 Rounded Inexact
mxgx490 maxmag .5 66666 -> 6.67E+4 Rounded Inexact
mxgx491 maxmag .5 33333 -> 3.33E+4 Rounded Inexact
-- overflow tests
maxexponent: 999999999
minexponent: -999999999
precision: 3
mxgx500 maxmag 9.999E+999999999 0 -> Infinity Inexact Overflow Rounded
mxgx501 maxmag -9.999E+999999999 0 -> -Infinity Inexact Overflow Rounded
-- subnormals and underflow
precision: 3
maxexponent: 999
minexponent: -999
mxgx510 maxmag 1.00E-999 0 -> 1.00E-999
mxgx511 maxmag 0.1E-999 0 -> 1E-1000 Subnormal
mxgx512 maxmag 0.10E-999 0 -> 1.0E-1000 Subnormal
mxgx513 maxmag 0.100E-999 0 -> 1.0E-1000 Subnormal Rounded
mxgx514 maxmag 0.01E-999 0 -> 1E-1001 Subnormal
-- next is rounded to Nmin
mxgx515 maxmag 0.999E-999 0 -> 1.00E-999 Inexact Rounded Subnormal Underflow
mxgx516 maxmag 0.099E-999 0 -> 1.0E-1000 Inexact Rounded Subnormal Underflow
mxgx517 maxmag 0.009E-999 0 -> 1E-1001 Inexact Rounded Subnormal Underflow
mxgx518 maxmag 0.001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
mxgx519 maxmag 0.0009E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
mxgx520 maxmag 0.0001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
mxgx530 maxmag -1.00E-999 0 -> -1.00E-999
mxgx531 maxmag -0.1E-999 0 -> -1E-1000 Subnormal
mxgx532 maxmag -0.10E-999 0 -> -1.0E-1000 Subnormal
mxgx533 maxmag -0.100E-999 0 -> -1.0E-1000 Subnormal Rounded
mxgx534 maxmag -0.01E-999 0 -> -1E-1001 Subnormal
-- next is rounded to -Nmin
mxgx535 maxmag -0.999E-999 0 -> -1.00E-999 Inexact Rounded Subnormal Underflow
mxgx536 maxmag -0.099E-999 0 -> -1.0E-1000 Inexact Rounded Subnormal Underflow
mxgx537 maxmag -0.009E-999 0 -> -1E-1001 Inexact Rounded Subnormal Underflow
mxgx538 maxmag -0.001E-999 0 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped
mxgx539 maxmag -0.0009E-999 0 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped
mxgx540 maxmag -0.0001E-999 0 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped
-- Null tests
mxgx900 maxmag 10 # -> NaN Invalid_operation
mxgx901 maxmag # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,390 @@
------------------------------------------------------------------------
-- minmag.decTest -- decimal minimum by magnitude --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- we assume that base comparison is tested in compare.decTest, so
-- these mainly cover special cases and rounding
extended: 1
precision: 9
rounding: half_up
maxExponent: 384
minexponent: -383
-- sanity checks
mngx001 minmag -2 -2 -> -2
mngx002 minmag -2 -1 -> -1
mngx003 minmag -2 0 -> 0
mngx004 minmag -2 1 -> 1
mngx005 minmag -2 2 -> -2
mngx006 minmag -1 -2 -> -1
mngx007 minmag -1 -1 -> -1
mngx008 minmag -1 0 -> 0
mngx009 minmag -1 1 -> -1
mngx010 minmag -1 2 -> -1
mngx011 minmag 0 -2 -> 0
mngx012 minmag 0 -1 -> 0
mngx013 minmag 0 0 -> 0
mngx014 minmag 0 1 -> 0
mngx015 minmag 0 2 -> 0
mngx016 minmag 1 -2 -> 1
mngx017 minmag 1 -1 -> -1
mngx018 minmag 1 0 -> 0
mngx019 minmag 1 1 -> 1
mngx020 minmag 1 2 -> 1
mngx021 minmag 2 -2 -> -2
mngx022 minmag 2 -1 -> -1
mngx023 minmag 2 0 -> 0
mngx025 minmag 2 1 -> 1
mngx026 minmag 2 2 -> 2
-- extended zeros
mngx030 minmag 0 0 -> 0
mngx031 minmag 0 -0 -> -0
mngx032 minmag 0 -0.0 -> -0.0
mngx033 minmag 0 0.0 -> 0.0
mngx034 minmag -0 0 -> -0
mngx035 minmag -0 -0 -> -0
mngx036 minmag -0 -0.0 -> -0
mngx037 minmag -0 0.0 -> -0
mngx038 minmag 0.0 0 -> 0.0
mngx039 minmag 0.0 -0 -> -0
mngx040 minmag 0.0 -0.0 -> -0.0
mngx041 minmag 0.0 0.0 -> 0.0
mngx042 minmag -0.0 0 -> -0.0
mngx043 minmag -0.0 -0 -> -0
mngx044 minmag -0.0 -0.0 -> -0.0
mngx045 minmag -0.0 0.0 -> -0.0
mngx046 minmag 0E1 -0E1 -> -0E+1
mngx047 minmag -0E1 0E2 -> -0E+1
mngx048 minmag 0E2 0E1 -> 0E+1
mngx049 minmag 0E1 0E2 -> 0E+1
mngx050 minmag -0E3 -0E2 -> -0E+3
mngx051 minmag -0E2 -0E3 -> -0E+3
-- Specials
precision: 9
mngx090 minmag Inf -Inf -> -Infinity
mngx091 minmag Inf -1000 -> -1000
mngx092 minmag Inf -1 -> -1
mngx093 minmag Inf -0 -> -0
mngx094 minmag Inf 0 -> 0
mngx095 minmag Inf 1 -> 1
mngx096 minmag Inf 1000 -> 1000
mngx097 minmag Inf Inf -> Infinity
mngx098 minmag -1000 Inf -> -1000
mngx099 minmag -Inf Inf -> -Infinity
mngx100 minmag -1 Inf -> -1
mngx101 minmag -0 Inf -> -0
mngx102 minmag 0 Inf -> 0
mngx103 minmag 1 Inf -> 1
mngx104 minmag 1000 Inf -> 1000
mngx105 minmag Inf Inf -> Infinity
mngx120 minmag -Inf -Inf -> -Infinity
mngx121 minmag -Inf -1000 -> -1000
mngx122 minmag -Inf -1 -> -1
mngx123 minmag -Inf -0 -> -0
mngx124 minmag -Inf 0 -> 0
mngx125 minmag -Inf 1 -> 1
mngx126 minmag -Inf 1000 -> 1000
mngx127 minmag -Inf Inf -> -Infinity
mngx128 minmag -Inf -Inf -> -Infinity
mngx129 minmag -1000 -Inf -> -1000
mngx130 minmag -1 -Inf -> -1
mngx131 minmag -0 -Inf -> -0
mngx132 minmag 0 -Inf -> 0
mngx133 minmag 1 -Inf -> 1
mngx134 minmag 1000 -Inf -> 1000
mngx135 minmag Inf -Inf -> -Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
mngx141 minmag NaN -Inf -> -Infinity
mngx142 minmag NaN -1000 -> -1000
mngx143 minmag NaN -1 -> -1
mngx144 minmag NaN -0 -> -0
mngx145 minmag NaN 0 -> 0
mngx146 minmag NaN 1 -> 1
mngx147 minmag NaN 1000 -> 1000
mngx148 minmag NaN Inf -> Infinity
mngx149 minmag NaN NaN -> NaN
mngx150 minmag -Inf NaN -> -Infinity
mngx151 minmag -1000 NaN -> -1000
mngx152 minmag -1 -NaN -> -1
mngx153 minmag -0 NaN -> -0
mngx154 minmag 0 -NaN -> 0
mngx155 minmag 1 NaN -> 1
mngx156 minmag 1000 NaN -> 1000
mngx157 minmag Inf NaN -> Infinity
mngx161 minmag sNaN -Inf -> NaN Invalid_operation
mngx162 minmag sNaN -1000 -> NaN Invalid_operation
mngx163 minmag sNaN -1 -> NaN Invalid_operation
mngx164 minmag sNaN -0 -> NaN Invalid_operation
mngx165 minmag -sNaN 0 -> -NaN Invalid_operation
mngx166 minmag -sNaN 1 -> -NaN Invalid_operation
mngx167 minmag sNaN 1000 -> NaN Invalid_operation
mngx168 minmag sNaN NaN -> NaN Invalid_operation
mngx169 minmag sNaN sNaN -> NaN Invalid_operation
mngx170 minmag NaN sNaN -> NaN Invalid_operation
mngx171 minmag -Inf sNaN -> NaN Invalid_operation
mngx172 minmag -1000 sNaN -> NaN Invalid_operation
mngx173 minmag -1 sNaN -> NaN Invalid_operation
mngx174 minmag -0 sNaN -> NaN Invalid_operation
mngx175 minmag 0 sNaN -> NaN Invalid_operation
mngx176 minmag 1 sNaN -> NaN Invalid_operation
mngx177 minmag 1000 sNaN -> NaN Invalid_operation
mngx178 minmag Inf sNaN -> NaN Invalid_operation
mngx179 minmag NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
mngx181 minmag NaN9 -Inf -> -Infinity
mngx182 minmag -NaN8 9990 -> 9990
mngx183 minmag NaN71 Inf -> Infinity
mngx184 minmag NaN1 NaN54 -> NaN1
mngx185 minmag NaN22 -NaN53 -> NaN22
mngx186 minmag -NaN3 NaN6 -> -NaN3
mngx187 minmag -NaN44 NaN7 -> -NaN44
mngx188 minmag -Inf NaN41 -> -Infinity
mngx189 minmag -9999 -NaN33 -> -9999
mngx190 minmag Inf NaN2 -> Infinity
mngx191 minmag sNaN99 -Inf -> NaN99 Invalid_operation
mngx192 minmag sNaN98 -11 -> NaN98 Invalid_operation
mngx193 minmag -sNaN97 NaN8 -> -NaN97 Invalid_operation
mngx194 minmag sNaN69 sNaN94 -> NaN69 Invalid_operation
mngx195 minmag NaN95 sNaN93 -> NaN93 Invalid_operation
mngx196 minmag -Inf sNaN92 -> NaN92 Invalid_operation
mngx197 minmag 088 sNaN91 -> NaN91 Invalid_operation
mngx198 minmag Inf -sNaN90 -> -NaN90 Invalid_operation
mngx199 minmag NaN sNaN86 -> NaN86 Invalid_operation
-- rounding checks -- chosen is rounded, or not
maxExponent: 999
minexponent: -999
precision: 9
mngx201 minmag -12345678000 1 -> 1
mngx202 minmag 1 -12345678000 -> 1
mngx203 minmag -1234567800 1 -> 1
mngx204 minmag 1 -1234567800 -> 1
mngx205 minmag -1234567890 1 -> 1
mngx206 minmag 1 -1234567890 -> 1
mngx207 minmag -1234567891 1 -> 1
mngx208 minmag 1 -1234567891 -> 1
mngx209 minmag -12345678901 1 -> 1
mngx210 minmag 1 -12345678901 -> 1
mngx211 minmag -1234567896 1 -> 1
mngx212 minmag 1 -1234567896 -> 1
mngx213 minmag 1234567891 1 -> 1
mngx214 minmag 1 1234567891 -> 1
mngx215 minmag 12345678901 1 -> 1
mngx216 minmag 1 12345678901 -> 1
mngx217 minmag 1234567896 1 -> 1
mngx218 minmag 1 1234567896 -> 1
precision: 15
mngx221 minmag -12345678000 1 -> 1
mngx222 minmag 1 -12345678000 -> 1
mngx223 minmag -1234567800 1 -> 1
mngx224 minmag 1 -1234567800 -> 1
mngx225 minmag -1234567890 1 -> 1
mngx226 minmag 1 -1234567890 -> 1
mngx227 minmag -1234567891 1 -> 1
mngx228 minmag 1 -1234567891 -> 1
mngx229 minmag -12345678901 1 -> 1
mngx230 minmag 1 -12345678901 -> 1
mngx231 minmag -1234567896 1 -> 1
mngx232 minmag 1 -1234567896 -> 1
mngx233 minmag 1234567891 1 -> 1
mngx234 minmag 1 1234567891 -> 1
mngx235 minmag 12345678901 1 -> 1
mngx236 minmag 1 12345678901 -> 1
mngx237 minmag 1234567896 1 -> 1
mngx238 minmag 1 1234567896 -> 1
-- from examples
mngx280 minmag '3' '2' -> '2'
mngx281 minmag '-10' '3' -> '3'
mngx282 minmag '1.0' '1' -> '1.0'
mngx283 minmag '1' '1.0' -> '1.0'
mngx284 minmag '7' 'NaN' -> '7'
-- overflow and underflow tests .. subnormal results [inputs] now allowed
maxExponent: 999999999
minexponent: -999999999
mngx330 minmag -1.23456789012345E-0 -9E+999999999 -> -1.23456789012345
mngx331 minmag -9E+999999999 -1.23456789012345E-0 -> -1.23456789012345
mngx332 minmag -0.100 -9E-999999999 -> -9E-999999999
mngx333 minmag -9E-999999999 -0.100 -> -9E-999999999
mngx335 minmag +1.23456789012345E-0 -9E+999999999 -> 1.23456789012345
mngx336 minmag -9E+999999999 1.23456789012345E-0 -> 1.23456789012345
mngx337 minmag +0.100 -9E-999999999 -> -9E-999999999
mngx338 minmag -9E-999999999 0.100 -> -9E-999999999
mngx339 minmag -1e-599999999 -1e-400000001 -> -1E-599999999
mngx340 minmag -1e-599999999 -1e-400000000 -> -1E-599999999
mngx341 minmag -1e-600000000 -1e-400000000 -> -1E-600000000
mngx342 minmag -9e-999999998 -0.01 -> -9E-999999998
mngx343 minmag -9e-999999998 -0.1 -> -9E-999999998
mngx344 minmag -0.01 -9e-999999998 -> -9E-999999998
mngx345 minmag -1e599999999 -1e400000001 -> -1E+400000001
mngx346 minmag -1e599999999 -1e400000000 -> -1E+400000000
mngx347 minmag -1e600000000 -1e400000000 -> -1E+400000000
mngx348 minmag -9e999999998 -100 -> -100
mngx349 minmag -9e999999998 -10 -> -10
mngx350 minmag -100 -9e999999998 -> -100
-- signs
mngx351 minmag -1e+777777777 -1e+411111111 -> -1E+411111111
mngx352 minmag -1e+777777777 +1e+411111111 -> 1E+411111111
mngx353 minmag +1e+777777777 -1e+411111111 -> -1E+411111111
mngx354 minmag +1e+777777777 +1e+411111111 -> 1E+411111111
mngx355 minmag -1e-777777777 -1e-411111111 -> -1E-777777777
mngx356 minmag -1e-777777777 +1e-411111111 -> -1E-777777777
mngx357 minmag +1e-777777777 -1e-411111111 -> 1E-777777777
mngx358 minmag +1e-777777777 +1e-411111111 -> 1E-777777777
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
mngx401 minmag Inf 1.1 -> 1.1
mngx402 minmag 1.1 1 -> 1
mngx403 minmag 1 1.0 -> 1.0
mngx404 minmag 1.0 0.1 -> 0.1
mngx405 minmag 0.1 0.10 -> 0.10
mngx406 minmag 0.10 0.100 -> 0.100
mngx407 minmag 0.10 0 -> 0
mngx408 minmag 0 0.0 -> 0.0
mngx409 minmag 0.0 -0 -> -0
mngx410 minmag 0.0 -0.0 -> -0.0
mngx411 minmag 0.00 -0.0 -> -0.0
mngx412 minmag 0.0 -0.00 -> -0.00
mngx413 minmag 0 -0.0 -> -0.0
mngx414 minmag 0 -0 -> -0
mngx415 minmag -0.0 -0 -> -0
mngx416 minmag -0 -0.100 -> -0
mngx417 minmag -0.100 -0.10 -> -0.10
mngx418 minmag -0.10 -0.1 -> -0.1
mngx419 minmag -0.1 -1.0 -> -0.1
mngx420 minmag -1.0 -1 -> -1
mngx421 minmag -1 -1.1 -> -1
mngx423 minmag -1.1 -Inf -> -1.1
-- same with operands reversed
mngx431 minmag 1.1 Inf -> 1.1
mngx432 minmag 1 1.1 -> 1
mngx433 minmag 1.0 1 -> 1.0
mngx434 minmag 0.1 1.0 -> 0.1
mngx435 minmag 0.10 0.1 -> 0.10
mngx436 minmag 0.100 0.10 -> 0.100
mngx437 minmag 0 0.10 -> 0
mngx438 minmag 0.0 0 -> 0.0
mngx439 minmag -0 0.0 -> -0
mngx440 minmag -0.0 0.0 -> -0.0
mngx441 minmag -0.0 0.00 -> -0.0
mngx442 minmag -0.00 0.0 -> -0.00
mngx443 minmag -0.0 0 -> -0.0
mngx444 minmag -0 0 -> -0
mngx445 minmag -0 -0.0 -> -0
mngx446 minmag -0.100 -0 -> -0
mngx447 minmag -0.10 -0.100 -> -0.10
mngx448 minmag -0.1 -0.10 -> -0.1
mngx449 minmag -1.0 -0.1 -> -0.1
mngx450 minmag -1 -1.0 -> -1
mngx451 minmag -1.1 -1 -> -1
mngx453 minmag -Inf -1.1 -> -1.1
-- largies
mngx460 minmag 1000 1E+3 -> 1000
mngx461 minmag 1E+3 1000 -> 1000
mngx462 minmag 1000 -1E+3 -> -1E+3
mngx463 minmag 1E+3 -1000 -> -1000
mngx464 minmag -1000 1E+3 -> -1000
mngx465 minmag -1E+3 1000 -> -1E+3
mngx466 minmag -1000 -1E+3 -> -1E+3
mngx467 minmag -1E+3 -1000 -> -1E+3
-- rounding (results treated as though plus)
maxexponent: 999999999
minexponent: -999999999
precision: 3
mngx470 minmag 1 5 -> 1
mngx471 minmag 10 50 -> 10
mngx472 minmag 100 500 -> 100
mngx473 minmag 1000 5000 -> 1.00E+3 Rounded
mngx474 minmag 10000 50000 -> 1.00E+4 Rounded
mngx475 minmag 6 50 -> 6
mngx476 minmag 66 500 -> 66
mngx477 minmag 666 5000 -> 666
mngx478 minmag 6666 50000 -> 6.67E+3 Rounded Inexact
mngx479 minmag 66666 500000 -> 6.67E+4 Rounded Inexact
mngx480 minmag 33333 500000 -> 3.33E+4 Rounded Inexact
mngx481 minmag 75401 1 -> 1
mngx482 minmag 75402 10 -> 10
mngx483 minmag 75403 100 -> 100
mngx484 minmag 75404 1000 -> 1.00E+3 Rounded
mngx485 minmag 75405 10000 -> 1.00E+4 Rounded
mngx486 minmag 75406 6 -> 6
mngx487 minmag 75407 66 -> 66
mngx488 minmag 75408 666 -> 666
mngx489 minmag 75409 6666 -> 6.67E+3 Rounded Inexact
mngx490 minmag 75410 66666 -> 6.67E+4 Rounded Inexact
mngx491 minmag 75411 33333 -> 3.33E+4 Rounded Inexact
-- overflow tests
maxexponent: 999999999
minexponent: -999999999
precision: 3
mngx500 minmag 9.999E+999999999 0 -> 0
mngx501 minmag -9.999E+999999999 0 -> 0
-- subnormals and underflow
precision: 3
maxexponent: 999
minexponent: -999
mngx510 minmag 1.00E-999 0 -> 0
mngx511 minmag 0.1E-999 0 -> 0
mngx512 minmag 0.10E-999 0 -> 0
mngx513 minmag 0.100E-999 0 -> 0
mngx514 minmag 0.01E-999 0 -> 0
mngx515 minmag 0.999E-999 0 -> 0
mngx516 minmag 0.099E-999 0 -> 0
mngx517 minmag 0.009E-999 0 -> 0
mngx518 minmag 0.001E-999 0 -> 0
mngx519 minmag 0.0009E-999 0 -> 0
mngx520 minmag 0.0001E-999 0 -> 0
mngx530 minmag -1.00E-999 0 -> 0
mngx531 minmag -0.1E-999 0 -> 0
mngx532 minmag -0.10E-999 0 -> 0
mngx533 minmag -0.100E-999 0 -> 0
mngx534 minmag -0.01E-999 0 -> 0
mngx535 minmag -0.999E-999 0 -> 0
mngx536 minmag -0.099E-999 0 -> 0
mngx537 minmag -0.009E-999 0 -> 0
mngx538 minmag -0.001E-999 0 -> 0
mngx539 minmag -0.0009E-999 0 -> 0
mngx540 minmag -0.0001E-999 0 -> 0
-- Null tests
mng900 minmag 10 # -> NaN Invalid_operation
mng901 minmag # 10 -> NaN Invalid_operation

View File

@@ -0,0 +1,182 @@
------------------------------------------------------------------------
-- minus.decTest -- decimal negation --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- This set of tests primarily tests the existence of the operator.
-- Subtraction, rounding, and more overflows are tested elsewhere.
extended: 1
precision: 9
rounding: half_up
maxExponent: 384
minexponent: -383
minx001 minus '1' -> '-1'
minx002 minus '-1' -> '1'
minx003 minus '1.00' -> '-1.00'
minx004 minus '-1.00' -> '1.00'
minx005 minus '0' -> '0'
minx006 minus '0.00' -> '0.00'
minx007 minus '00.0' -> '0.0'
minx008 minus '00.00' -> '0.00'
minx009 minus '00' -> '0'
minx010 minus '-2' -> '2'
minx011 minus '2' -> '-2'
minx012 minus '-2.00' -> '2.00'
minx013 minus '2.00' -> '-2.00'
minx014 minus '-0' -> '0'
minx015 minus '-0.00' -> '0.00'
minx016 minus '-00.0' -> '0.0'
minx017 minus '-00.00' -> '0.00'
minx018 minus '-00' -> '0'
-- "lhs" zeros in plus and minus have exponent = operand
minx020 minus '-0E3' -> '0E+3'
minx021 minus '-0E2' -> '0E+2'
minx022 minus '-0E1' -> '0E+1'
minx023 minus '-0E0' -> '0'
minx024 minus '+0E0' -> '0'
minx025 minus '+0E1' -> '0E+1'
minx026 minus '+0E2' -> '0E+2'
minx027 minus '+0E3' -> '0E+3'
minx030 minus '-5E3' -> '5E+3'
minx031 minus '-5E8' -> '5E+8'
minx032 minus '-5E13' -> '5E+13'
minx033 minus '-5E18' -> '5E+18'
minx034 minus '+5E3' -> '-5E+3'
minx035 minus '+5E8' -> '-5E+8'
minx036 minus '+5E13' -> '-5E+13'
minx037 minus '+5E18' -> '-5E+18'
minx050 minus '-2000000' -> '2000000'
minx051 minus '2000000' -> '-2000000'
precision: 7
minx052 minus '-2000000' -> '2000000'
minx053 minus '2000000' -> '-2000000'
precision: 6
minx054 minus '-2000000' -> '2.00000E+6' Rounded
minx055 minus '2000000' -> '-2.00000E+6' Rounded
precision: 3
minx056 minus '-2000000' -> '2.00E+6' Rounded
minx057 minus '2000000' -> '-2.00E+6' Rounded
-- more fixed, potential LHS swaps/overlays if done by 0 subtract x
precision: 9
minx060 minus '56267E-10' -> '-0.0000056267'
minx061 minus '56267E-5' -> '-0.56267'
minx062 minus '56267E-2' -> '-562.67'
minx063 minus '56267E-1' -> '-5626.7'
minx065 minus '56267E-0' -> '-56267'
minx066 minus '56267E+0' -> '-56267'
minx067 minus '56267E+1' -> '-5.6267E+5'
minx068 minus '56267E+2' -> '-5.6267E+6'
minx069 minus '56267E+3' -> '-5.6267E+7'
minx070 minus '56267E+4' -> '-5.6267E+8'
minx071 minus '56267E+5' -> '-5.6267E+9'
minx072 minus '56267E+6' -> '-5.6267E+10'
minx080 minus '-56267E-10' -> '0.0000056267'
minx081 minus '-56267E-5' -> '0.56267'
minx082 minus '-56267E-2' -> '562.67'
minx083 minus '-56267E-1' -> '5626.7'
minx085 minus '-56267E-0' -> '56267'
minx086 minus '-56267E+0' -> '56267'
minx087 minus '-56267E+1' -> '5.6267E+5'
minx088 minus '-56267E+2' -> '5.6267E+6'
minx089 minus '-56267E+3' -> '5.6267E+7'
minx090 minus '-56267E+4' -> '5.6267E+8'
minx091 minus '-56267E+5' -> '5.6267E+9'
minx092 minus '-56267E+6' -> '5.6267E+10'
-- overflow tests
maxexponent: 999999999
minexponent: -999999999
precision: 3
minx100 minus 9.999E+999999999 -> -Infinity Inexact Overflow Rounded
minx101 minus -9.999E+999999999 -> Infinity Inexact Overflow Rounded
-- subnormals and underflow
precision: 3
maxexponent: 999
minexponent: -999
minx110 minus 1.00E-999 -> -1.00E-999
minx111 minus 0.1E-999 -> -1E-1000 Subnormal
minx112 minus 0.10E-999 -> -1.0E-1000 Subnormal
minx113 minus 0.100E-999 -> -1.0E-1000 Subnormal Rounded
minx114 minus 0.01E-999 -> -1E-1001 Subnormal
-- next is rounded to Emin
minx115 minus 0.999E-999 -> -1.00E-999 Inexact Rounded Subnormal Underflow
minx116 minus 0.099E-999 -> -1.0E-1000 Inexact Rounded Subnormal Underflow
minx117 minus 0.009E-999 -> -1E-1001 Inexact Rounded Subnormal Underflow
minx118 minus 0.001E-999 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped
minx119 minus 0.0009E-999 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped
minx120 minus 0.0001E-999 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped
minx130 minus -1.00E-999 -> 1.00E-999
minx131 minus -0.1E-999 -> 1E-1000 Subnormal
minx132 minus -0.10E-999 -> 1.0E-1000 Subnormal
minx133 minus -0.100E-999 -> 1.0E-1000 Subnormal Rounded
minx134 minus -0.01E-999 -> 1E-1001 Subnormal
-- next is rounded to Emin
minx135 minus -0.999E-999 -> 1.00E-999 Inexact Rounded Subnormal Underflow
minx136 minus -0.099E-999 -> 1.0E-1000 Inexact Rounded Subnormal Underflow
minx137 minus -0.009E-999 -> 1E-1001 Inexact Rounded Subnormal Underflow
minx138 minus -0.001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
minx139 minus -0.0009E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
minx140 minus -0.0001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
-- long operand checks
maxexponent: 999
minexponent: -999
precision: 9
minx301 minus 12345678000 -> -1.23456780E+10 Rounded
minx302 minus 1234567800 -> -1.23456780E+9 Rounded
minx303 minus 1234567890 -> -1.23456789E+9 Rounded
minx304 minus 1234567891 -> -1.23456789E+9 Inexact Rounded
minx305 minus 12345678901 -> -1.23456789E+10 Inexact Rounded
minx306 minus 1234567896 -> -1.23456790E+9 Inexact Rounded
precision: 15
-- still checking
minx321 minus 12345678000 -> -12345678000
minx322 minus 1234567800 -> -1234567800
minx323 minus 1234567890 -> -1234567890
minx324 minus 1234567891 -> -1234567891
minx325 minus 12345678901 -> -12345678901
minx326 minus 1234567896 -> -1234567896
-- specials
minx420 minus 'Inf' -> '-Infinity'
minx421 minus '-Inf' -> 'Infinity'
minx422 minus NaN -> NaN
minx423 minus sNaN -> NaN Invalid_operation
minx424 minus NaN255 -> NaN255
minx425 minus sNaN256 -> NaN256 Invalid_operation
minx426 minus -NaN -> -NaN
minx427 minus -sNaN -> -NaN Invalid_operation
minx428 minus -NaN255 -> -NaN255
minx429 minus -sNaN256 -> -NaN256 Invalid_operation
-- Null tests
minx900 minus # -> NaN Invalid_operation

View File

@@ -0,0 +1,148 @@
------------------------------------------------------------------------
-- nextminus.decTest -- decimal next that is less [754r nextdown] --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
precision: 9
rounding: half_up
maxExponent: 384
minexponent: -383
nextm001 nextminus 0.999999995 -> 0.999999994
nextm002 nextminus 0.999999996 -> 0.999999995
nextm003 nextminus 0.999999997 -> 0.999999996
nextm004 nextminus 0.999999998 -> 0.999999997
nextm005 nextminus 0.999999999 -> 0.999999998
nextm006 nextminus 1.00000000 -> 0.999999999
nextm007 nextminus 1.0 -> 0.999999999
nextm008 nextminus 1 -> 0.999999999
nextm009 nextminus 1.00000001 -> 1.00000000
nextm010 nextminus 1.00000002 -> 1.00000001
nextm011 nextminus 1.00000003 -> 1.00000002
nextm012 nextminus 1.00000004 -> 1.00000003
nextm013 nextminus 1.00000005 -> 1.00000004
nextm014 nextminus 1.00000006 -> 1.00000005
nextm015 nextminus 1.00000007 -> 1.00000006
nextm016 nextminus 1.00000008 -> 1.00000007
nextm017 nextminus 1.00000009 -> 1.00000008
nextm018 nextminus 1.00000010 -> 1.00000009
nextm019 nextminus 1.00000011 -> 1.00000010
nextm020 nextminus 1.00000012 -> 1.00000011
nextm021 nextminus -0.999999995 -> -0.999999996
nextm022 nextminus -0.999999996 -> -0.999999997
nextm023 nextminus -0.999999997 -> -0.999999998
nextm024 nextminus -0.999999998 -> -0.999999999
nextm025 nextminus -0.999999999 -> -1.00000000
nextm026 nextminus -1.00000000 -> -1.00000001
nextm027 nextminus -1.0 -> -1.00000001
nextm028 nextminus -1 -> -1.00000001
nextm029 nextminus -1.00000001 -> -1.00000002
nextm030 nextminus -1.00000002 -> -1.00000003
nextm031 nextminus -1.00000003 -> -1.00000004
nextm032 nextminus -1.00000004 -> -1.00000005
nextm033 nextminus -1.00000005 -> -1.00000006
nextm034 nextminus -1.00000006 -> -1.00000007
nextm035 nextminus -1.00000007 -> -1.00000008
nextm036 nextminus -1.00000008 -> -1.00000009
nextm037 nextminus -1.00000009 -> -1.00000010
nextm038 nextminus -1.00000010 -> -1.00000011
nextm039 nextminus -1.00000011 -> -1.00000012
-- input operand is >precision
nextm041 nextminus 1.00000010998 -> 1.00000010
nextm042 nextminus 1.00000010999 -> 1.00000010
nextm043 nextminus 1.00000011000 -> 1.00000010
nextm044 nextminus 1.00000011001 -> 1.00000011
nextm045 nextminus 1.00000011002 -> 1.00000011
nextm046 nextminus 1.00000011002 -> 1.00000011
nextm047 nextminus 1.00000011052 -> 1.00000011
nextm048 nextminus 1.00000011552 -> 1.00000011
nextm049 nextminus -1.00000010998 -> -1.00000011
nextm050 nextminus -1.00000010999 -> -1.00000011
nextm051 nextminus -1.00000011000 -> -1.00000012
nextm052 nextminus -1.00000011001 -> -1.00000012
nextm053 nextminus -1.00000011002 -> -1.00000012
nextm054 nextminus -1.00000011002 -> -1.00000012
nextm055 nextminus -1.00000011052 -> -1.00000012
nextm056 nextminus -1.00000011552 -> -1.00000012
-- ultra-tiny inputs
nextm060 nextminus 1E-99999 -> 0E-391
nextm061 nextminus 1E-999999999 -> 0E-391
nextm062 nextminus 1E-391 -> 0E-391
nextm063 nextminus -1E-99999 -> -1E-391
nextm064 nextminus -1E-999999999 -> -1E-391
nextm065 nextminus -1E-391 -> -2E-391
-- Zeros
nextm100 nextminus -0 -> -1E-391
nextm101 nextminus 0 -> -1E-391
nextm102 nextminus 0.00 -> -1E-391
nextm103 nextminus -0.00 -> -1E-391
nextm104 nextminus 0E-300 -> -1E-391
nextm105 nextminus 0E+300 -> -1E-391
nextm106 nextminus 0E+30000 -> -1E-391
nextm107 nextminus -0E+30000 -> -1E-391
precision: 9
maxExponent: 999
minexponent: -999
-- specials
nextm150 nextminus Inf -> 9.99999999E+999
nextm151 nextminus -Inf -> -Infinity
nextm152 nextminus NaN -> NaN
nextm153 nextminus sNaN -> NaN Invalid_operation
nextm154 nextminus NaN77 -> NaN77
nextm155 nextminus sNaN88 -> NaN88 Invalid_operation
nextm156 nextminus -NaN -> -NaN
nextm157 nextminus -sNaN -> -NaN Invalid_operation
nextm158 nextminus -NaN77 -> -NaN77
nextm159 nextminus -sNaN88 -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
nextm170 nextminus 9.99999999E+999 -> 9.99999998E+999
nextm171 nextminus 9.99999998E+999 -> 9.99999997E+999
nextm172 nextminus 1E-999 -> 9.9999999E-1000
nextm173 nextminus 1.00000000E-999 -> 9.9999999E-1000
nextm174 nextminus 9E-1007 -> 8E-1007
nextm175 nextminus 9.9E-1006 -> 9.8E-1006
nextm176 nextminus 9.9999E-1003 -> 9.9998E-1003
nextm177 nextminus 9.9999999E-1000 -> 9.9999998E-1000
nextm178 nextminus 9.9999998E-1000 -> 9.9999997E-1000
nextm179 nextminus 9.9999997E-1000 -> 9.9999996E-1000
nextm180 nextminus 0E-1007 -> -1E-1007
nextm181 nextminus 1E-1007 -> 0E-1007
nextm182 nextminus 2E-1007 -> 1E-1007
nextm183 nextminus -0E-1007 -> -1E-1007
nextm184 nextminus -1E-1007 -> -2E-1007
nextm185 nextminus -2E-1007 -> -3E-1007
nextm186 nextminus -10E-1007 -> -1.1E-1006
nextm187 nextminus -100E-1007 -> -1.01E-1005
nextm188 nextminus -100000E-1007 -> -1.00001E-1002
nextm189 nextminus -1.0000E-999 -> -1.00000001E-999
nextm190 nextminus -1.00000000E-999 -> -1.00000001E-999
nextm191 nextminus -1E-999 -> -1.00000001E-999
nextm192 nextminus -9.99999998E+999 -> -9.99999999E+999
nextm193 nextminus -9.99999999E+999 -> -Infinity
-- Null tests
nextm900 nextminus # -> NaN Invalid_operation

View File

@@ -0,0 +1,150 @@
------------------------------------------------------------------------
-- nextplus.decTest -- decimal next that is greater [754r nextup] --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
precision: 9
rounding: half_up
maxExponent: 384
minexponent: -383
nextp001 nextplus 0.999999995 -> 0.999999996
nextp002 nextplus 0.999999996 -> 0.999999997
nextp003 nextplus 0.999999997 -> 0.999999998
nextp004 nextplus 0.999999998 -> 0.999999999
nextp005 nextplus 0.999999999 -> 1.00000000
nextp006 nextplus 1.00000000 -> 1.00000001
nextp007 nextplus 1.0 -> 1.00000001
nextp008 nextplus 1 -> 1.00000001
nextp009 nextplus 1.00000001 -> 1.00000002
nextp010 nextplus 1.00000002 -> 1.00000003
nextp011 nextplus 1.00000003 -> 1.00000004
nextp012 nextplus 1.00000004 -> 1.00000005
nextp013 nextplus 1.00000005 -> 1.00000006
nextp014 nextplus 1.00000006 -> 1.00000007
nextp015 nextplus 1.00000007 -> 1.00000008
nextp016 nextplus 1.00000008 -> 1.00000009
nextp017 nextplus 1.00000009 -> 1.00000010
nextp018 nextplus 1.00000010 -> 1.00000011
nextp019 nextplus 1.00000011 -> 1.00000012
nextp021 nextplus -0.999999995 -> -0.999999994
nextp022 nextplus -0.999999996 -> -0.999999995
nextp023 nextplus -0.999999997 -> -0.999999996
nextp024 nextplus -0.999999998 -> -0.999999997
nextp025 nextplus -0.999999999 -> -0.999999998
nextp026 nextplus -1.00000000 -> -0.999999999
nextp027 nextplus -1.0 -> -0.999999999
nextp028 nextplus -1 -> -0.999999999
nextp029 nextplus -1.00000001 -> -1.00000000
nextp030 nextplus -1.00000002 -> -1.00000001
nextp031 nextplus -1.00000003 -> -1.00000002
nextp032 nextplus -1.00000004 -> -1.00000003
nextp033 nextplus -1.00000005 -> -1.00000004
nextp034 nextplus -1.00000006 -> -1.00000005
nextp035 nextplus -1.00000007 -> -1.00000006
nextp036 nextplus -1.00000008 -> -1.00000007
nextp037 nextplus -1.00000009 -> -1.00000008
nextp038 nextplus -1.00000010 -> -1.00000009
nextp039 nextplus -1.00000011 -> -1.00000010
nextp040 nextplus -1.00000012 -> -1.00000011
-- input operand is >precision
nextp041 nextplus 1.00000010998 -> 1.00000011
nextp042 nextplus 1.00000010999 -> 1.00000011
nextp043 nextplus 1.00000011000 -> 1.00000012
nextp044 nextplus 1.00000011001 -> 1.00000012
nextp045 nextplus 1.00000011002 -> 1.00000012
nextp046 nextplus 1.00000011002 -> 1.00000012
nextp047 nextplus 1.00000011052 -> 1.00000012
nextp048 nextplus 1.00000011552 -> 1.00000012
nextp049 nextplus -1.00000010998 -> -1.00000010
nextp050 nextplus -1.00000010999 -> -1.00000010
nextp051 nextplus -1.00000011000 -> -1.00000010
nextp052 nextplus -1.00000011001 -> -1.00000011
nextp053 nextplus -1.00000011002 -> -1.00000011
nextp054 nextplus -1.00000011002 -> -1.00000011
nextp055 nextplus -1.00000011052 -> -1.00000011
nextp056 nextplus -1.00000011552 -> -1.00000011
-- ultra-tiny inputs
nextp060 nextplus 1E-99999 -> 1E-391
nextp061 nextplus 1E-999999999 -> 1E-391
nextp062 nextplus 1E-391 -> 2E-391
nextp063 nextplus -1E-99999 -> -0E-391
nextp064 nextplus -1E-999999999 -> -0E-391
nextp065 nextplus -1E-391 -> -0E-391
-- Zeros
nextp100 nextplus 0 -> 1E-391
nextp101 nextplus 0.00 -> 1E-391
nextp102 nextplus 0E-300 -> 1E-391
nextp103 nextplus 0E+300 -> 1E-391
nextp104 nextplus 0E+30000 -> 1E-391
nextp105 nextplus -0 -> 1E-391
nextp106 nextplus -0.00 -> 1E-391
nextp107 nextplus -0E-300 -> 1E-391
nextp108 nextplus -0E+300 -> 1E-391
nextp109 nextplus -0E+30000 -> 1E-391
maxExponent: 999
minexponent: -999
precision: 9
-- specials
nextp150 nextplus Inf -> Infinity
nextp151 nextplus -Inf -> -9.99999999E+999
nextp152 nextplus NaN -> NaN
nextp153 nextplus sNaN -> NaN Invalid_operation
nextp154 nextplus NaN77 -> NaN77
nextp155 nextplus sNaN88 -> NaN88 Invalid_operation
nextp156 nextplus -NaN -> -NaN
nextp157 nextplus -sNaN -> -NaN Invalid_operation
nextp158 nextplus -NaN77 -> -NaN77
nextp159 nextplus -sNaN88 -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
nextp170 nextplus 9.99999999E+999 -> Infinity
nextp171 nextplus 9.99999998E+999 -> 9.99999999E+999
nextp172 nextplus 1E-999 -> 1.00000001E-999
nextp173 nextplus 1.00000000E-999 -> 1.00000001E-999
nextp174 nextplus 9E-1007 -> 1.0E-1006
nextp175 nextplus 9.9E-1006 -> 1.00E-1005
nextp176 nextplus 9.9999E-1003 -> 1.00000E-1002
nextp177 nextplus 9.9999999E-1000 -> 1.00000000E-999
nextp178 nextplus 9.9999998E-1000 -> 9.9999999E-1000
nextp179 nextplus 9.9999997E-1000 -> 9.9999998E-1000
nextp180 nextplus 0E-1007 -> 1E-1007
nextp181 nextplus 1E-1007 -> 2E-1007
nextp182 nextplus 2E-1007 -> 3E-1007
nextp183 nextplus -0E-1007 -> 1E-1007
nextp184 nextplus -1E-1007 -> -0E-1007
nextp185 nextplus -2E-1007 -> -1E-1007
nextp186 nextplus -10E-1007 -> -9E-1007
nextp187 nextplus -100E-1007 -> -9.9E-1006
nextp188 nextplus -100000E-1007 -> -9.9999E-1003
nextp189 nextplus -1.0000E-999 -> -9.9999999E-1000
nextp190 nextplus -1.00000000E-999 -> -9.9999999E-1000
nextp191 nextplus -1E-999 -> -9.9999999E-1000
nextp192 nextplus -9.99999998E+999 -> -9.99999997E+999
nextp193 nextplus -9.99999999E+999 -> -9.99999998E+999
-- Null tests
nextp900 nextplus # -> NaN Invalid_operation

View File

@@ -0,0 +1,334 @@
------------------------------------------------------------------------
-- or.decTest -- digitwise logical OR --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
precision: 9
rounding: half_up
maxExponent: 999
minExponent: -999
-- Sanity check (truth table)
orx001 or 0 0 -> 0
orx002 or 0 1 -> 1
orx003 or 1 0 -> 1
orx004 or 1 1 -> 1
orx005 or 1100 1010 -> 1110
-- and at msd and msd-1
orx006 or 000000000 000000000 -> 0
orx007 or 000000000 100000000 -> 100000000
orx008 or 100000000 000000000 -> 100000000
orx009 or 100000000 100000000 -> 100000000
orx010 or 000000000 000000000 -> 0
orx011 or 000000000 010000000 -> 10000000
orx012 or 010000000 000000000 -> 10000000
orx013 or 010000000 010000000 -> 10000000
-- Various lengths
-- 123456789 123456789 123456789
orx021 or 111111111 111111111 -> 111111111
orx022 or 111111111111 111111111 -> 111111111
orx023 or 11111111 11111111 -> 11111111
orx025 or 1111111 1111111 -> 1111111
orx026 or 111111 111111 -> 111111
orx027 or 11111 11111 -> 11111
orx028 or 1111 1111 -> 1111
orx029 or 111 111 -> 111
orx031 or 11 11 -> 11
orx032 or 1 1 -> 1
orx033 or 111111111111 1111111111 -> 111111111
orx034 or 11111111111 11111111111 -> 111111111
orx035 or 1111111111 111111111111 -> 111111111
orx036 or 111111111 1111111111111 -> 111111111
orx040 or 111111111 111111111111 -> 111111111
orx041 or 11111111 111111111111 -> 111111111
orx042 or 11111111 111111111 -> 111111111
orx043 or 1111111 100000010 -> 101111111
orx044 or 111111 100000100 -> 100111111
orx045 or 11111 100001000 -> 100011111
orx046 or 1111 100010000 -> 100011111
orx047 or 111 100100000 -> 100100111
orx048 or 11 101000000 -> 101000011
orx049 or 1 110000000 -> 110000001
orx050 or 1111111111 1 -> 111111111
orx051 or 111111111 1 -> 111111111
orx052 or 11111111 1 -> 11111111
orx053 or 1111111 1 -> 1111111
orx054 or 111111 1 -> 111111
orx055 or 11111 1 -> 11111
orx056 or 1111 1 -> 1111
orx057 or 111 1 -> 111
orx058 or 11 1 -> 11
orx059 or 1 1 -> 1
orx060 or 1111111111 0 -> 111111111
orx061 or 111111111 0 -> 111111111
orx062 or 11111111 0 -> 11111111
orx063 or 1111111 0 -> 1111111
orx064 or 111111 0 -> 111111
orx065 or 11111 0 -> 11111
orx066 or 1111 0 -> 1111
orx067 or 111 0 -> 111
orx068 or 11 0 -> 11
orx069 or 1 0 -> 1
orx070 or 1 1111111111 -> 111111111
orx071 or 1 111111111 -> 111111111
orx072 or 1 11111111 -> 11111111
orx073 or 1 1111111 -> 1111111
orx074 or 1 111111 -> 111111
orx075 or 1 11111 -> 11111
orx076 or 1 1111 -> 1111
orx077 or 1 111 -> 111
orx078 or 1 11 -> 11
orx079 or 1 1 -> 1
orx080 or 0 1111111111 -> 111111111
orx081 or 0 111111111 -> 111111111
orx082 or 0 11111111 -> 11111111
orx083 or 0 1111111 -> 1111111
orx084 or 0 111111 -> 111111
orx085 or 0 11111 -> 11111
orx086 or 0 1111 -> 1111
orx087 or 0 111 -> 111
orx088 or 0 11 -> 11
orx089 or 0 1 -> 1
orx090 or 011111111 111101111 -> 111111111
orx091 or 101111111 111101111 -> 111111111
orx092 or 110111111 111101111 -> 111111111
orx093 or 111011111 111101111 -> 111111111
orx094 or 111101111 111101111 -> 111101111
orx095 or 111110111 111101111 -> 111111111
orx096 or 111111011 111101111 -> 111111111
orx097 or 111111101 111101111 -> 111111111
orx098 or 111111110 111101111 -> 111111111
orx100 or 111101111 011111111 -> 111111111
orx101 or 111101111 101111111 -> 111111111
orx102 or 111101111 110111111 -> 111111111
orx103 or 111101111 111011111 -> 111111111
orx104 or 111101111 111101111 -> 111101111
orx105 or 111101111 111110111 -> 111111111
orx106 or 111101111 111111011 -> 111111111
orx107 or 111101111 111111101 -> 111111111
orx108 or 111101111 111111110 -> 111111111
-- non-0/1 should not be accepted, nor should signs
orx220 or 111111112 111111111 -> NaN Invalid_operation
orx221 or 333333333 333333333 -> NaN Invalid_operation
orx222 or 555555555 555555555 -> NaN Invalid_operation
orx223 or 777777777 777777777 -> NaN Invalid_operation
orx224 or 999999999 999999999 -> NaN Invalid_operation
orx225 or 222222222 999999999 -> NaN Invalid_operation
orx226 or 444444444 999999999 -> NaN Invalid_operation
orx227 or 666666666 999999999 -> NaN Invalid_operation
orx228 or 888888888 999999999 -> NaN Invalid_operation
orx229 or 999999999 222222222 -> NaN Invalid_operation
orx230 or 999999999 444444444 -> NaN Invalid_operation
orx231 or 999999999 666666666 -> NaN Invalid_operation
orx232 or 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
orx240 or 567468689 -934981942 -> NaN Invalid_operation
orx241 or 567367689 934981942 -> NaN Invalid_operation
orx242 or -631917772 -706014634 -> NaN Invalid_operation
orx243 or -756253257 138579234 -> NaN Invalid_operation
orx244 or 835590149 567435400 -> NaN Invalid_operation
-- test MSD
orx250 or 200000000 100000000 -> NaN Invalid_operation
orx251 or 700000000 100000000 -> NaN Invalid_operation
orx252 or 800000000 100000000 -> NaN Invalid_operation
orx253 or 900000000 100000000 -> NaN Invalid_operation
orx254 or 200000000 000000000 -> NaN Invalid_operation
orx255 or 700000000 000000000 -> NaN Invalid_operation
orx256 or 800000000 000000000 -> NaN Invalid_operation
orx257 or 900000000 000000000 -> NaN Invalid_operation
orx258 or 100000000 200000000 -> NaN Invalid_operation
orx259 or 100000000 700000000 -> NaN Invalid_operation
orx260 or 100000000 800000000 -> NaN Invalid_operation
orx261 or 100000000 900000000 -> NaN Invalid_operation
orx262 or 000000000 200000000 -> NaN Invalid_operation
orx263 or 000000000 700000000 -> NaN Invalid_operation
orx264 or 000000000 800000000 -> NaN Invalid_operation
orx265 or 000000000 900000000 -> NaN Invalid_operation
-- test MSD-1
orx270 or 020000000 100000000 -> NaN Invalid_operation
orx271 or 070100000 100000000 -> NaN Invalid_operation
orx272 or 080010000 100000001 -> NaN Invalid_operation
orx273 or 090001000 100000010 -> NaN Invalid_operation
orx274 or 100000100 020010100 -> NaN Invalid_operation
orx275 or 100000000 070001000 -> NaN Invalid_operation
orx276 or 100000010 080010100 -> NaN Invalid_operation
orx277 or 100000000 090000010 -> NaN Invalid_operation
-- test LSD
orx280 or 001000002 100000000 -> NaN Invalid_operation
orx281 or 000000007 100000000 -> NaN Invalid_operation
orx282 or 000000008 100000000 -> NaN Invalid_operation
orx283 or 000000009 100000000 -> NaN Invalid_operation
orx284 or 100000000 000100002 -> NaN Invalid_operation
orx285 or 100100000 001000007 -> NaN Invalid_operation
orx286 or 100010000 010000008 -> NaN Invalid_operation
orx287 or 100001000 100000009 -> NaN Invalid_operation
-- test Middie
orx288 or 001020000 100000000 -> NaN Invalid_operation
orx289 or 000070001 100000000 -> NaN Invalid_operation
orx290 or 000080000 100010000 -> NaN Invalid_operation
orx291 or 000090000 100001000 -> NaN Invalid_operation
orx292 or 100000010 000020100 -> NaN Invalid_operation
orx293 or 100100000 000070010 -> NaN Invalid_operation
orx294 or 100010100 000080001 -> NaN Invalid_operation
orx295 or 100001000 000090000 -> NaN Invalid_operation
-- signs
orx296 or -100001000 -000000000 -> NaN Invalid_operation
orx297 or -100001000 000010000 -> NaN Invalid_operation
orx298 or 100001000 -000000000 -> NaN Invalid_operation
orx299 or 100001000 000011000 -> 100011000
-- Nmax, Nmin, Ntiny
orx331 or 2 9.99999999E+999 -> NaN Invalid_operation
orx332 or 3 1E-999 -> NaN Invalid_operation
orx333 or 4 1.00000000E-999 -> NaN Invalid_operation
orx334 or 5 1E-1007 -> NaN Invalid_operation
orx335 or 6 -1E-1007 -> NaN Invalid_operation
orx336 or 7 -1.00000000E-999 -> NaN Invalid_operation
orx337 or 8 -1E-999 -> NaN Invalid_operation
orx338 or 9 -9.99999999E+999 -> NaN Invalid_operation
orx341 or 9.99999999E+999 -18 -> NaN Invalid_operation
orx342 or 1E-999 01 -> NaN Invalid_operation
orx343 or 1.00000000E-999 -18 -> NaN Invalid_operation
orx344 or 1E-1007 18 -> NaN Invalid_operation
orx345 or -1E-1007 -10 -> NaN Invalid_operation
orx346 or -1.00000000E-999 18 -> NaN Invalid_operation
orx347 or -1E-999 10 -> NaN Invalid_operation
orx348 or -9.99999999E+999 -18 -> NaN Invalid_operation
-- A few other non-integers
orx361 or 1.0 1 -> NaN Invalid_operation
orx362 or 1E+1 1 -> NaN Invalid_operation
orx363 or 0.0 1 -> NaN Invalid_operation
orx364 or 0E+1 1 -> NaN Invalid_operation
orx365 or 9.9 1 -> NaN Invalid_operation
orx366 or 9E+1 1 -> NaN Invalid_operation
orx371 or 0 1.0 -> NaN Invalid_operation
orx372 or 0 1E+1 -> NaN Invalid_operation
orx373 or 0 0.0 -> NaN Invalid_operation
orx374 or 0 0E+1 -> NaN Invalid_operation
orx375 or 0 9.9 -> NaN Invalid_operation
orx376 or 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
orx780 or -Inf -Inf -> NaN Invalid_operation
orx781 or -Inf -1000 -> NaN Invalid_operation
orx782 or -Inf -1 -> NaN Invalid_operation
orx783 or -Inf -0 -> NaN Invalid_operation
orx784 or -Inf 0 -> NaN Invalid_operation
orx785 or -Inf 1 -> NaN Invalid_operation
orx786 or -Inf 1000 -> NaN Invalid_operation
orx787 or -1000 -Inf -> NaN Invalid_operation
orx788 or -Inf -Inf -> NaN Invalid_operation
orx789 or -1 -Inf -> NaN Invalid_operation
orx790 or -0 -Inf -> NaN Invalid_operation
orx791 or 0 -Inf -> NaN Invalid_operation
orx792 or 1 -Inf -> NaN Invalid_operation
orx793 or 1000 -Inf -> NaN Invalid_operation
orx794 or Inf -Inf -> NaN Invalid_operation
orx800 or Inf -Inf -> NaN Invalid_operation
orx801 or Inf -1000 -> NaN Invalid_operation
orx802 or Inf -1 -> NaN Invalid_operation
orx803 or Inf -0 -> NaN Invalid_operation
orx804 or Inf 0 -> NaN Invalid_operation
orx805 or Inf 1 -> NaN Invalid_operation
orx806 or Inf 1000 -> NaN Invalid_operation
orx807 or Inf Inf -> NaN Invalid_operation
orx808 or -1000 Inf -> NaN Invalid_operation
orx809 or -Inf Inf -> NaN Invalid_operation
orx810 or -1 Inf -> NaN Invalid_operation
orx811 or -0 Inf -> NaN Invalid_operation
orx812 or 0 Inf -> NaN Invalid_operation
orx813 or 1 Inf -> NaN Invalid_operation
orx814 or 1000 Inf -> NaN Invalid_operation
orx815 or Inf Inf -> NaN Invalid_operation
orx821 or NaN -Inf -> NaN Invalid_operation
orx822 or NaN -1000 -> NaN Invalid_operation
orx823 or NaN -1 -> NaN Invalid_operation
orx824 or NaN -0 -> NaN Invalid_operation
orx825 or NaN 0 -> NaN Invalid_operation
orx826 or NaN 1 -> NaN Invalid_operation
orx827 or NaN 1000 -> NaN Invalid_operation
orx828 or NaN Inf -> NaN Invalid_operation
orx829 or NaN NaN -> NaN Invalid_operation
orx830 or -Inf NaN -> NaN Invalid_operation
orx831 or -1000 NaN -> NaN Invalid_operation
orx832 or -1 NaN -> NaN Invalid_operation
orx833 or -0 NaN -> NaN Invalid_operation
orx834 or 0 NaN -> NaN Invalid_operation
orx835 or 1 NaN -> NaN Invalid_operation
orx836 or 1000 NaN -> NaN Invalid_operation
orx837 or Inf NaN -> NaN Invalid_operation
orx841 or sNaN -Inf -> NaN Invalid_operation
orx842 or sNaN -1000 -> NaN Invalid_operation
orx843 or sNaN -1 -> NaN Invalid_operation
orx844 or sNaN -0 -> NaN Invalid_operation
orx845 or sNaN 0 -> NaN Invalid_operation
orx846 or sNaN 1 -> NaN Invalid_operation
orx847 or sNaN 1000 -> NaN Invalid_operation
orx848 or sNaN NaN -> NaN Invalid_operation
orx849 or sNaN sNaN -> NaN Invalid_operation
orx850 or NaN sNaN -> NaN Invalid_operation
orx851 or -Inf sNaN -> NaN Invalid_operation
orx852 or -1000 sNaN -> NaN Invalid_operation
orx853 or -1 sNaN -> NaN Invalid_operation
orx854 or -0 sNaN -> NaN Invalid_operation
orx855 or 0 sNaN -> NaN Invalid_operation
orx856 or 1 sNaN -> NaN Invalid_operation
orx857 or 1000 sNaN -> NaN Invalid_operation
orx858 or Inf sNaN -> NaN Invalid_operation
orx859 or NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
orx861 or NaN1 -Inf -> NaN Invalid_operation
orx862 or +NaN2 -1000 -> NaN Invalid_operation
orx863 or NaN3 1000 -> NaN Invalid_operation
orx864 or NaN4 Inf -> NaN Invalid_operation
orx865 or NaN5 +NaN6 -> NaN Invalid_operation
orx866 or -Inf NaN7 -> NaN Invalid_operation
orx867 or -1000 NaN8 -> NaN Invalid_operation
orx868 or 1000 NaN9 -> NaN Invalid_operation
orx869 or Inf +NaN10 -> NaN Invalid_operation
orx871 or sNaN11 -Inf -> NaN Invalid_operation
orx872 or sNaN12 -1000 -> NaN Invalid_operation
orx873 or sNaN13 1000 -> NaN Invalid_operation
orx874 or sNaN14 NaN17 -> NaN Invalid_operation
orx875 or sNaN15 sNaN18 -> NaN Invalid_operation
orx876 or NaN16 sNaN19 -> NaN Invalid_operation
orx877 or -Inf +sNaN20 -> NaN Invalid_operation
orx878 or -1000 sNaN21 -> NaN Invalid_operation
orx879 or 1000 sNaN22 -> NaN Invalid_operation
orx880 or Inf sNaN23 -> NaN Invalid_operation
orx881 or +NaN25 +sNaN24 -> NaN Invalid_operation
orx882 or -NaN26 NaN28 -> NaN Invalid_operation
orx883 or -sNaN27 sNaN29 -> NaN Invalid_operation
orx884 or 1000 -NaN30 -> NaN Invalid_operation
orx885 or 1000 -sNaN31 -> NaN Invalid_operation

Some files were not shown because too many files have changed in this diff Show More