summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-08-17 06:42:13 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-08-17 06:42:13 (GMT)
commit3ee3ed2e808e3f69bca98a509d23132bc1c93718 (patch)
treeb42f214e0444b9ced38748087c54b23a8332ff7a /Lib
parentd6c700a320eacd6f04cbcc60996b84e765766890 (diff)
downloadcpython-3ee3ed2e808e3f69bca98a509d23132bc1c93718.zip
cpython-3ee3ed2e808e3f69bca98a509d23132bc1c93718.tar.gz
cpython-3ee3ed2e808e3f69bca98a509d23132bc1c93718.tar.bz2
Add two new files and update remaining tests from the latest update of the
test suite in version 2.39 of dectest.zip.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/decimaltestdata/abs.decTest2
-rw-r--r--Lib/test/decimaltestdata/add.decTest2
-rw-r--r--Lib/test/decimaltestdata/base.decTest38
-rw-r--r--Lib/test/decimaltestdata/clamp.decTest2
-rw-r--r--Lib/test/decimaltestdata/compare.decTest2
-rw-r--r--Lib/test/decimaltestdata/decimal128.decTest441
-rw-r--r--Lib/test/decimaltestdata/decimal32.decTest385
-rw-r--r--Lib/test/decimaltestdata/decimal64.decTest57
-rw-r--r--Lib/test/decimaltestdata/divide.decTest2
-rw-r--r--Lib/test/decimaltestdata/divideint.decTest2
-rw-r--r--Lib/test/decimaltestdata/inexact.decTest2
-rw-r--r--Lib/test/decimaltestdata/max.decTest194
-rw-r--r--Lib/test/decimaltestdata/min.decTest186
-rw-r--r--Lib/test/decimaltestdata/minus.decTest2
-rw-r--r--Lib/test/decimaltestdata/multiply.decTest2
-rw-r--r--Lib/test/decimaltestdata/normalize.decTest2
-rw-r--r--Lib/test/decimaltestdata/plus.decTest2
-rw-r--r--Lib/test/decimaltestdata/power.decTest2
-rw-r--r--Lib/test/decimaltestdata/quantize.decTest2
-rw-r--r--Lib/test/decimaltestdata/randomBound32.decTest2
-rw-r--r--Lib/test/decimaltestdata/randoms.decTest2
-rw-r--r--Lib/test/decimaltestdata/remainder.decTest2
-rw-r--r--Lib/test/decimaltestdata/remainderNear.decTest2
-rw-r--r--Lib/test/decimaltestdata/rescale.decTest28
-rw-r--r--Lib/test/decimaltestdata/rounding.decTest2
-rw-r--r--Lib/test/decimaltestdata/samequantum.decTest2
-rw-r--r--Lib/test/decimaltestdata/squareroot.decTest2
-rw-r--r--Lib/test/decimaltestdata/subtract.decTest2
-rw-r--r--Lib/test/decimaltestdata/testall.decTest6
-rw-r--r--Lib/test/decimaltestdata/tointegral.decTest2
-rw-r--r--Lib/test/decimaltestdata/trim.decTest2
31 files changed, 1190 insertions, 191 deletions
diff --git a/Lib/test/decimaltestdata/abs.decTest b/Lib/test/decimaltestdata/abs.decTest
index 033aac1..3f0849a 100644
--- a/Lib/test/decimaltestdata/abs.decTest
+++ b/Lib/test/decimaltestdata/abs.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- This set of tests primarily tests the existence of the operator.
-- Additon, subtraction, rounding, and more overflows are tested
diff --git a/Lib/test/decimaltestdata/add.decTest b/Lib/test/decimaltestdata/add.decTest
index a4478a8..2d3efab 100644
--- a/Lib/test/decimaltestdata/add.decTest
+++ b/Lib/test/decimaltestdata/add.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
precision: 9
rounding: half_up
diff --git a/Lib/test/decimaltestdata/base.decTest b/Lib/test/decimaltestdata/base.decTest
index 334c225..96a4b9d 100644
--- a/Lib/test/decimaltestdata/base.decTest
+++ b/Lib/test/decimaltestdata/base.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- This file tests base conversions from string to a decimal number
-- and back to a string (in either Scientific or Engineering form)
@@ -73,21 +73,22 @@ basx038 toSci '0.123456789012345' -> '0.123456789012345'
-- String [many more examples are implicitly tested elsewhere]
-- strings without E cannot generate E in result
-basx101 toSci "12" -> '12'
-basx102 toSci "-76" -> '-76'
-basx103 toSci "12.76" -> '12.76'
-basx104 toSci "+12.76" -> '12.76'
-basx105 toSci "012.76" -> '12.76'
-basx106 toSci "+0.003" -> '0.003'
-basx107 toSci "17." -> '17'
-basx108 toSci ".5" -> '0.5'
-basx109 toSci "044" -> '44'
-basx110 toSci "0044" -> '44'
-basx111 toSci "0.0005" -> '0.0005'
-basx112 toSci "00.00005" -> '0.00005'
-basx113 toSci "0.000005" -> '0.000005'
-basx114 toSci "0.0000005" -> '5E-7'
-basx115 toSci "0.00000005" -> '5E-8'
+basx100 toSci "12" -> '12'
+basx101 toSci "-76" -> '-76'
+basx102 toSci "12.76" -> '12.76'
+basx103 toSci "+12.76" -> '12.76'
+basx104 toSci "012.76" -> '12.76'
+basx105 toSci "+0.003" -> '0.003'
+basx106 toSci "17." -> '17'
+basx107 toSci ".5" -> '0.5'
+basx108 toSci "044" -> '44'
+basx109 toSci "0044" -> '44'
+basx110 toSci "0.0005" -> '0.0005'
+basx111 toSci "00.00005" -> '0.00005'
+basx112 toSci "0.000005" -> '0.000005'
+basx113 toSci "0.0000050" -> '0.0000050'
+basx114 toSci "0.0000005" -> '5E-7'
+basx115 toSci "0.00000005" -> '5E-8'
basx116 toSci "12345678.543210" -> '12345678.543210'
basx117 toSci "2345678.543210" -> '2345678.543210'
basx118 toSci "345678.543210" -> '345678.543210'
@@ -99,6 +100,11 @@ basx123 toSci "+00345678.5432" -> '345678.5432'
basx124 toSci "-345678.5432" -> '-345678.5432'
basx125 toSci "-0345678.5432" -> '-345678.5432'
basx126 toSci "-00345678.5432" -> '-345678.5432'
+-- examples
+basx127 toSci "5E-6" -> '0.000005'
+basx128 toSci "50E-7" -> '0.0000050'
+basx129 toSci "5E-7" -> '5E-7'
+
-- [No exotics as no Unicode]
diff --git a/Lib/test/decimaltestdata/clamp.decTest b/Lib/test/decimaltestdata/clamp.decTest
index fafe708..722971a 100644
--- a/Lib/test/decimaltestdata/clamp.decTest
+++ b/Lib/test/decimaltestdata/clamp.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- This set of tests uses the same limits as the 8-byte concrete
-- representation, but applies clamping without using format-specific
diff --git a/Lib/test/decimaltestdata/compare.decTest b/Lib/test/decimaltestdata/compare.decTest
index 40631da..21651ad 100644
--- a/Lib/test/decimaltestdata/compare.decTest
+++ b/Lib/test/decimaltestdata/compare.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- Note that we cannot assume add/subtract tests cover paths adequately,
-- here, because the code might be quite different (comparison cannot
diff --git a/Lib/test/decimaltestdata/decimal128.decTest b/Lib/test/decimaltestdata/decimal128.decTest
new file mode 100644
index 0000000..3cc9d06
--- /dev/null
+++ b/Lib/test/decimaltestdata/decimal128.decTest
@@ -0,0 +1,441 @@
+------------------------------------------------------------------------
+-- decimal128.decTest -- decimal sixteen-byte format testcases --
+-- Copyright (c) IBM Corporation, 2000, 2003. 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.39
+
+-- This set of tests is for the sixteen-byte concrete representation.
+-- Its characteristics are:
+--
+-- 1 bit sign
+-- 5 bits combination field
+-- 12 bits exponent continuation
+-- 110 bits coefficient continuation
+--
+-- Total exponent length 14 bits
+-- Total coefficient length 114 bits (34 digits)
+--
+-- Elimit = 12287 (maximum encoded exponent)
+-- Emax = 6144 (largest exponent value)
+-- Emin = -6143 (smallest exponent value)
+-- bias = 6176 (subtracted from encoded exponent) = -Etiny
+
+extended: 1
+precision: 34
+rounding: half_up
+maxExponent: 6144
+minExponent: -6143
+
+-- General testcases
+-- (mostly derived from the Strawman 4 document and examples)
+decg001 apply #A20780000000000000000000000003D0 -> -7.50
+decg002 apply -7.50 -> #A20780000000000000000000000003D0
+
+-- Normality
+decf010 apply 1234567890123456789012345678901234 -> #2608134b9c1e28e56f3c127177823534
+decf011 apply 1234567890123456789012345678901234.0 -> #2608134b9c1e28e56f3c127177823534 Rounded
+decf012 apply 1234567890123456789012345678901234.1 -> #2608134b9c1e28e56f3c127177823534 Rounded Inexact
+decf013 apply -1234567890123456789012345678901234 -> #a608134b9c1e28e56f3c127177823534
+decf014 apply -1234567890123456789012345678901234.0 -> #a608134b9c1e28e56f3c127177823534 Rounded
+decf015 apply -1234567890123456789012345678901234.1 -> #a608134b9c1e28e56f3c127177823534 Rounded Inexact
+
+
+-- Nmax and similar
+decf022 apply 9.999999999999999999999999999999999E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
+decf023 apply #77ffcff3fcff3fcff3fcff3fcff3fcff -> 9.999999999999999999999999999999999E+6144
+decf024 apply 1.234567890123456789012345678901234E+6144 -> #47ffd34b9c1e28e56f3c127177823534
+decf025 apply #47ffd34b9c1e28e56f3c127177823534 -> 1.234567890123456789012345678901234E+6144
+-- fold-downs (more below)
+decf030 apply 1.23E+6144 -> #47ffd300000000000000000000000000 Clamped
+decf031 apply #47ffd300000000000000000000000000 -> 1.230000000000000000000000000000000E+6144
+decf032 apply 1E+6144 -> #47ffc000000000000000000000000000 Clamped
+decf033 apply #47ffc000000000000000000000000000 -> 1.000000000000000000000000000000000E+6144
+
+-- overflows
+maxExponent: 9999 -- set high so conversion causes the overflow
+minExponent: -9999
+decf040 apply 10E+6144 -> #78000000000000000000000000000000 Overflow Rounded Inexact
+decf041 apply 1.000000000000000E+6145 -> #78000000000000000000000000000000 Overflow Rounded Inexact
+maxExponent: 6144
+minExponent: -6143
+
+decf051 apply 12345 -> #220800000000000000000000000049c5
+decf052 apply #220800000000000000000000000049c5 -> 12345
+decf053 apply 1234 -> #22080000000000000000000000000534
+decf054 apply #22080000000000000000000000000534 -> 1234
+decf055 apply 123 -> #220800000000000000000000000000a3
+decf056 apply #220800000000000000000000000000a3 -> 123
+decf057 apply 12 -> #22080000000000000000000000000012
+decf058 apply #22080000000000000000000000000012 -> 12
+decf059 apply 1 -> #22080000000000000000000000000001
+decf060 apply #22080000000000000000000000000001 -> 1
+decf061 apply 1.23 -> #220780000000000000000000000000a3
+decf062 apply #220780000000000000000000000000a3 -> 1.23
+decf063 apply 123.45 -> #220780000000000000000000000049c5
+decf064 apply #220780000000000000000000000049c5 -> 123.45
+
+-- Nmin and below
+decf071 apply 1E-6143 -> #00084000000000000000000000000001
+decf072 apply #00084000000000000000000000000001 -> 1E-6143
+decf073 apply 1.000000000000000000000000000000000E-6143 -> #04000000000000000000000000000000
+decf074 apply #04000000000000000000000000000000 -> 1.000000000000000000000000000000000E-6143
+decf075 apply 1.000000000000000000000000000000001E-6143 -> #04000000000000000000000000000001
+decf076 apply #04000000000000000000000000000001 -> 1.000000000000000000000000000000001E-6143
+
+decf077 apply 0.100000000000000000000000000000000E-6143 -> #00000800000000000000000000000000 Subnormal
+decf078 apply #00000800000000000000000000000000 -> 1.00000000000000000000000000000000E-6144 Subnormal
+decf079 apply 0.000000000000000000000000000000010E-6143 -> #00000000000000000000000000000010 Subnormal
+decf080 apply #00000000000000000000000000000010 -> 1.0E-6175 Subnormal
+decf081 apply 0.00000000000000000000000000000001E-6143 -> #00004000000000000000000000000001 Subnormal
+decf082 apply #00004000000000000000000000000001 -> 1E-6175 Subnormal
+decf083 apply 0.000000000000000000000000000000001E-6143 -> #00000000000000000000000000000001 Subnormal
+decf084 apply #00000000000000000000000000000001 -> 1E-6176 Subnormal
+
+-- underflows
+decf090 apply 1e-6176 -> #00000000000000000000000000000001 Subnormal
+decf091 apply 1.9e-6176 -> #00000000000000000000000000000002 Subnormal Underflow Inexact Rounded
+decf092 apply 1.1e-6176 -> #00000000000000000000000000000001 Subnormal Underflow Inexact Rounded
+decf093 apply 1.00000000001e-6176 -> #00000000000000000000000000000001 Subnormal Underflow Inexact Rounded
+decf094 apply 1.00000000000001e-6176 -> #00000000000000000000000000000001 Subnormal Underflow Inexact Rounded
+decf095 apply 1.000000000000001e-6176 -> #00000000000000000000000000000001 Subnormal Underflow Inexact Rounded
+decf096 apply 0.1e-6176 -> #00000000000000000000000000000000 Subnormal Underflow Inexact Rounded
+decf097 apply 0.00000000001e-6176 -> #00000000000000000000000000000000 Subnormal Underflow Inexact Rounded
+decf098 apply 0.00000000000001e-6176 -> #00000000000000000000000000000000 Subnormal Underflow Inexact Rounded
+decf099 apply 0.000000000000001e-6176 -> #00000000000000000000000000000000 Subnormal Underflow Inexact Rounded
+decf100 apply 999999999999999999999999999999999e-6176 -> #00000ff3fcff3fcff3fcff3fcff3fcff Subnormal
+
+-- same again, negatives
+-- Nmax and similar
+decf122 apply -9.999999999999999999999999999999999E+6144 -> #f7ffcff3fcff3fcff3fcff3fcff3fcff
+decf123 apply #f7ffcff3fcff3fcff3fcff3fcff3fcff -> -9.999999999999999999999999999999999E+6144
+decf124 apply -1.234567890123456789012345678901234E+6144 -> #c7ffd34b9c1e28e56f3c127177823534
+decf125 apply #c7ffd34b9c1e28e56f3c127177823534 -> -1.234567890123456789012345678901234E+6144
+-- fold-downs (more below)
+decf130 apply -1.23E+6144 -> #c7ffd300000000000000000000000000 Clamped
+decf131 apply #c7ffd300000000000000000000000000 -> -1.230000000000000000000000000000000E+6144
+decf132 apply -1E+6144 -> #c7ffc000000000000000000000000000 Clamped
+decf133 apply #c7ffc000000000000000000000000000 -> -1.000000000000000000000000000000000E+6144
+
+-- overflows
+maxExponent: 9999 -- set high so conversion causes the overflow
+minExponent: -9999
+decf140 apply -10E+6144 -> #f8000000000000000000000000000000 Overflow Rounded Inexact
+decf141 apply -1.000000000000000E+6145 -> #f8000000000000000000000000000000 Overflow Rounded Inexact
+maxExponent: 6144
+minExponent: -6143
+
+decf151 apply -12345 -> #a20800000000000000000000000049c5
+decf152 apply #a20800000000000000000000000049c5 -> -12345
+decf153 apply -1234 -> #a2080000000000000000000000000534
+decf154 apply #a2080000000000000000000000000534 -> -1234
+decf155 apply -123 -> #a20800000000000000000000000000a3
+decf156 apply #a20800000000000000000000000000a3 -> -123
+decf157 apply -12 -> #a2080000000000000000000000000012
+decf158 apply #a2080000000000000000000000000012 -> -12
+decf159 apply -1 -> #a2080000000000000000000000000001
+decf160 apply #a2080000000000000000000000000001 -> -1
+decf161 apply -1.23 -> #a20780000000000000000000000000a3
+decf162 apply #a20780000000000000000000000000a3 -> -1.23
+decf163 apply -123.45 -> #a20780000000000000000000000049c5
+decf164 apply #a20780000000000000000000000049c5 -> -123.45
+
+-- Nmin and below
+decf171 apply -1E-6143 -> #80084000000000000000000000000001
+decf172 apply #80084000000000000000000000000001 -> -1E-6143
+decf173 apply -1.000000000000000000000000000000000E-6143 -> #84000000000000000000000000000000
+decf174 apply #84000000000000000000000000000000 -> -1.000000000000000000000000000000000E-6143
+decf175 apply -1.000000000000000000000000000000001E-6143 -> #84000000000000000000000000000001
+decf176 apply #84000000000000000000000000000001 -> -1.000000000000000000000000000000001E-6143
+
+decf177 apply -0.100000000000000000000000000000000E-6143 -> #80000800000000000000000000000000 Subnormal
+decf178 apply #80000800000000000000000000000000 -> -1.00000000000000000000000000000000E-6144 Subnormal
+decf179 apply -0.000000000000000000000000000000010E-6143 -> #80000000000000000000000000000010 Subnormal
+decf180 apply #80000000000000000000000000000010 -> -1.0E-6175 Subnormal
+decf181 apply -0.00000000000000000000000000000001E-6143 -> #80004000000000000000000000000001 Subnormal
+decf182 apply #80004000000000000000000000000001 -> -1E-6175 Subnormal
+decf183 apply -0.000000000000000000000000000000001E-6143 -> #80000000000000000000000000000001 Subnormal
+decf184 apply #80000000000000000000000000000001 -> -1E-6176 Subnormal
+
+-- underflows
+decf190 apply -1e-6176 -> #80000000000000000000000000000001 Subnormal
+decf191 apply -1.9e-6176 -> #80000000000000000000000000000002 Subnormal Underflow Inexact Rounded
+decf192 apply -1.1e-6176 -> #80000000000000000000000000000001 Subnormal Underflow Inexact Rounded
+decf193 apply -1.00000000001e-6176 -> #80000000000000000000000000000001 Subnormal Underflow Inexact Rounded
+decf194 apply -1.00000000000001e-6176 -> #80000000000000000000000000000001 Subnormal Underflow Inexact Rounded
+decf195 apply -1.000000000000001e-6176 -> #80000000000000000000000000000001 Subnormal Underflow Inexact Rounded
+decf196 apply -0.1e-6176 -> #80000000000000000000000000000000 Subnormal Underflow Inexact Rounded
+decf197 apply -0.00000000001e-6176 -> #80000000000000000000000000000000 Subnormal Underflow Inexact Rounded
+decf198 apply -0.00000000000001e-6176 -> #80000000000000000000000000000000 Subnormal Underflow Inexact Rounded
+decf199 apply -0.000000000000001e-6176 -> #80000000000000000000000000000000 Subnormal Underflow Inexact Rounded
+decf200 apply -999999999999999999999999999999999e-6176 -> #80000ff3fcff3fcff3fcff3fcff3fcff Subnormal
+
+-- zeros
+decf400 apply 0E-8000 -> #00000000000000000000000000000000 Clamped
+decf401 apply 0E-6177 -> #00000000000000000000000000000000 Clamped
+decf402 apply 0E-6176 -> #00000000000000000000000000000000
+decf403 apply #00000000000000000000000000000000 -> 0E-6176
+decf404 apply 0.000000000000000000000000000000000E-6143 -> #00000000000000000000000000000000
+decf405 apply #00000000000000000000000000000000 -> 0E-6176
+decf406 apply 0E-2 -> #22078000000000000000000000000000
+decf407 apply #22078000000000000000000000000000 -> 0.00
+decf408 apply 0 -> #22080000000000000000000000000000
+decf409 apply #22080000000000000000000000000000 -> 0
+decf410 apply 0E+3 -> #2208c000000000000000000000000000
+decf411 apply #2208c000000000000000000000000000 -> 0E+3
+decf412 apply 0E+6111 -> #43ffc000000000000000000000000000
+decf413 apply #43ffc000000000000000000000000000 -> 0E+6111
+-- clamped zeros...
+decf414 apply 0E+6112 -> #43ffc000000000000000000000000000 Clamped
+decf415 apply #43ffc000000000000000000000000000 -> 0E+6111
+decf416 apply 0E+6144 -> #43ffc000000000000000000000000000 Clamped
+decf417 apply #43ffc000000000000000000000000000 -> 0E+6111
+decf418 apply 0E+8000 -> #43ffc000000000000000000000000000 Clamped
+decf419 apply #43ffc000000000000000000000000000 -> 0E+6111
+
+-- negative zeros
+decf420 apply -0E-8000 -> #80000000000000000000000000000000 Clamped
+decf421 apply -0E-6177 -> #80000000000000000000000000000000 Clamped
+decf422 apply -0E-6176 -> #80000000000000000000000000000000
+decf423 apply #80000000000000000000000000000000 -> -0E-6176
+decf424 apply -0.000000000000000000000000000000000E-6143 -> #80000000000000000000000000000000
+decf425 apply #80000000000000000000000000000000 -> -0E-6176
+decf426 apply -0E-2 -> #a2078000000000000000000000000000
+decf427 apply #a2078000000000000000000000000000 -> -0.00
+decf428 apply -0 -> #a2080000000000000000000000000000
+decf429 apply #a2080000000000000000000000000000 -> -0
+decf430 apply -0E+3 -> #a208c000000000000000000000000000
+decf431 apply #a208c000000000000000000000000000 -> -0E+3
+decf432 apply -0E+6111 -> #c3ffc000000000000000000000000000
+decf433 apply #c3ffc000000000000000000000000000 -> -0E+6111
+-- clamped zeros...
+decf434 apply -0E+6112 -> #c3ffc000000000000000000000000000 Clamped
+decf435 apply #c3ffc000000000000000000000000000 -> -0E+6111
+decf436 apply -0E+6144 -> #c3ffc000000000000000000000000000 Clamped
+decf437 apply #c3ffc000000000000000000000000000 -> -0E+6111
+decf438 apply -0E+8000 -> #c3ffc000000000000000000000000000 Clamped
+decf439 apply #c3ffc000000000000000000000000000 -> -0E+6111
+
+-- Specials
+decf500 apply Infinity -> #78000000000000000000000000000000
+decf501 apply #78787878787878787878787878787878 -> #78000000000000000000000000000000
+decf502 apply #78000000000000000000000000000000 -> Infinity
+decf503 apply #79797979797979797979797979797979 -> #78000000000000000000000000000000
+decf504 apply #79000000000000000000000000000000 -> Infinity
+decf505 apply #7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a -> #78000000000000000000000000000000
+decf506 apply #7a000000000000000000000000000000 -> Infinity
+decf507 apply #7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b -> #78000000000000000000000000000000
+decf508 apply #7b000000000000000000000000000000 -> Infinity
+
+decf509 apply NaN -> #7c000000000000000000000000000000
+decf510 apply #7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c -> #7c003c7c7c7c7c7c7c7c7c7c7c7c7c7c
+decf511 apply #7c000000000000000000000000000000 -> NaN
+decf512 apply #7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d -> #7c003d7d7d7d7d7d7d7d7d7d7d7d7d7d
+decf513 apply #7d000000000000000000000000000000 -> NaN
+decf514 apply #7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e -> #7e003e7e7c7e7e7e7e7c7e7e7e7e7c7e
+decf515 apply #7e000000000000000000000000000000 -> sNaN
+decf516 apply #7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f -> #7e003f7f7c7f7f7f7f7c7f7f7f7f7c7f
+decf517 apply #7f000000000000000000000000000000 -> sNaN
+decf518 apply #7fffffffffffffffffffffffffffffff -> sNaN999999999999999999999999999999999
+decf519 apply #7fffffffffffffffffffffffffffffff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
+
+decf520 apply -Infinity -> #f8000000000000000000000000000000
+decf521 apply #f8787878787878787878787878787878 -> #f8000000000000000000000000000000
+decf522 apply #f8000000000000000000000000000000 -> -Infinity
+decf523 apply #f9797979797979797979797979797979 -> #f8000000000000000000000000000000
+decf524 apply #f9000000000000000000000000000000 -> -Infinity
+decf525 apply #fa7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a -> #f8000000000000000000000000000000
+decf526 apply #fa000000000000000000000000000000 -> -Infinity
+decf527 apply #fb7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b -> #f8000000000000000000000000000000
+decf528 apply #fb000000000000000000000000000000 -> -Infinity
+
+decf529 apply -NaN -> #fc000000000000000000000000000000
+decf530 apply #fc7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c -> #fc003c7c7c7c7c7c7c7c7c7c7c7c7c7c
+decf531 apply #fc000000000000000000000000000000 -> -NaN
+decf532 apply #fd7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d -> #fc003d7d7d7d7d7d7d7d7d7d7d7d7d7d
+decf533 apply #fd000000000000000000000000000000 -> -NaN
+decf534 apply #fe7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e -> #fe003e7e7c7e7e7e7e7c7e7e7e7e7c7e
+decf535 apply #fe000000000000000000000000000000 -> -sNaN
+decf536 apply #ff7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f -> #fe003f7f7c7f7f7f7f7c7f7f7f7f7c7f
+decf537 apply #ff000000000000000000000000000000 -> -sNaN
+decf538 apply #ffffffffffffffffffffffffffffffff -> -sNaN999999999999999999999999999999999
+decf539 apply #ffffffffffffffffffffffffffffffff -> #fe000ff3fcff3fcff3fcff3fcff3fcff
+
+decf540 apply NaN -> #7c000000000000000000000000000000
+decf541 apply NaN0 -> #7c000000000000000000000000000000
+decf542 apply NaN1 -> #7c000000000000000000000000000001
+decf543 apply NaN12 -> #7c000000000000000000000000000012
+decf544 apply NaN79 -> #7c000000000000000000000000000079
+decf545 apply NaN12345 -> #7c0000000000000000000000000049c5
+decf546 apply NaN123456 -> #7c000000000000000000000000028e56
+decf547 apply NaN799799 -> #7c0000000000000000000000000f7fdf
+decf548 apply NaN799799799799799799799799799799799 -> #7c003dff7fdff7fdff7fdff7fdff7fdf
+decf549 apply NaN999999999999999999999999999999999 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
+decf550 apply NaN1234567890123456789012345678901234 -> #7c000000000000000000000000000000 -- too many digits
+
+-- fold-down full sequence
+decf600 apply 1E+6145 -> #78000000000000000000000000000000 Overflow Inexact Rounded
+decf601 apply 1E+6144 -> #47ffc000000000000000000000000000 Clamped
+decf602 apply #47ffc000000000000000000000000000 -> 1.000000000000000000000000000000000E+6144
+decf603 apply 1E+6143 -> #43ffc800000000000000000000000000 Clamped
+decf604 apply #43ffc800000000000000000000000000 -> 1.00000000000000000000000000000000E+6143
+decf605 apply 1E+6142 -> #43ffc100000000000000000000000000 Clamped
+decf606 apply #43ffc100000000000000000000000000 -> 1.0000000000000000000000000000000E+6142
+decf607 apply 1E+6141 -> #43ffc010000000000000000000000000 Clamped
+decf608 apply #43ffc010000000000000000000000000 -> 1.000000000000000000000000000000E+6141
+decf609 apply 1E+6140 -> #43ffc002000000000000000000000000 Clamped
+decf610 apply #43ffc002000000000000000000000000 -> 1.00000000000000000000000000000E+6140
+decf611 apply 1E+6139 -> #43ffc000400000000000000000000000 Clamped
+decf612 apply #43ffc000400000000000000000000000 -> 1.0000000000000000000000000000E+6139
+decf613 apply 1E+6138 -> #43ffc000040000000000000000000000 Clamped
+decf614 apply #43ffc000040000000000000000000000 -> 1.000000000000000000000000000E+6138
+decf615 apply 1E+6137 -> #43ffc000008000000000000000000000 Clamped
+decf616 apply #43ffc000008000000000000000000000 -> 1.00000000000000000000000000E+6137
+decf617 apply 1E+6136 -> #43ffc000001000000000000000000000 Clamped
+decf618 apply #43ffc000001000000000000000000000 -> 1.0000000000000000000000000E+6136
+decf619 apply 1E+6135 -> #43ffc000000100000000000000000000 Clamped
+decf620 apply #43ffc000000100000000000000000000 -> 1.000000000000000000000000E+6135
+decf621 apply 1E+6134 -> #43ffc000000020000000000000000000 Clamped
+decf622 apply #43ffc000000020000000000000000000 -> 1.00000000000000000000000E+6134
+decf623 apply 1E+6133 -> #43ffc000000004000000000000000000 Clamped
+decf624 apply #43ffc000000004000000000000000000 -> 1.0000000000000000000000E+6133
+decf625 apply 1E+6132 -> #43ffc000000000400000000000000000 Clamped
+decf626 apply #43ffc000000000400000000000000000 -> 1.000000000000000000000E+6132
+decf627 apply 1E+6131 -> #43ffc000000000080000000000000000 Clamped
+decf628 apply #43ffc000000000080000000000000000 -> 1.00000000000000000000E+6131
+decf629 apply 1E+6130 -> #43ffc000000000010000000000000000 Clamped
+decf630 apply #43ffc000000000010000000000000000 -> 1.0000000000000000000E+6130
+decf631 apply 1E+6129 -> #43ffc000000000001000000000000000 Clamped
+decf632 apply #43ffc000000000001000000000000000 -> 1.000000000000000000E+6129
+decf633 apply 1E+6128 -> #43ffc000000000000200000000000000 Clamped
+decf634 apply #43ffc000000000000200000000000000 -> 1.00000000000000000E+6128
+decf635 apply 1E+6127 -> #43ffc000000000000040000000000000 Clamped
+decf636 apply #43ffc000000000000040000000000000 -> 1.0000000000000000E+6127
+decf637 apply 1E+6126 -> #43ffc000000000000004000000000000 Clamped
+decf638 apply #43ffc000000000000004000000000000 -> 1.000000000000000E+6126
+decf639 apply 1E+6125 -> #43ffc000000000000000800000000000 Clamped
+decf640 apply #43ffc000000000000000800000000000 -> 1.00000000000000E+6125
+decf641 apply 1E+6124 -> #43ffc000000000000000100000000000 Clamped
+decf642 apply #43ffc000000000000000100000000000 -> 1.0000000000000E+6124
+decf643 apply 1E+6123 -> #43ffc000000000000000010000000000 Clamped
+decf644 apply #43ffc000000000000000010000000000 -> 1.000000000000E+6123
+decf645 apply 1E+6122 -> #43ffc000000000000000002000000000 Clamped
+decf646 apply #43ffc000000000000000002000000000 -> 1.00000000000E+6122
+decf647 apply 1E+6121 -> #43ffc000000000000000000400000000 Clamped
+decf648 apply #43ffc000000000000000000400000000 -> 1.0000000000E+6121
+decf649 apply 1E+6120 -> #43ffc000000000000000000040000000 Clamped
+decf650 apply #43ffc000000000000000000040000000 -> 1.000000000E+6120
+decf651 apply 1E+6119 -> #43ffc000000000000000000008000000 Clamped
+decf652 apply #43ffc000000000000000000008000000 -> 1.00000000E+6119
+decf653 apply 1E+6118 -> #43ffc000000000000000000001000000 Clamped
+decf654 apply #43ffc000000000000000000001000000 -> 1.0000000E+6118
+decf655 apply 1E+6117 -> #43ffc000000000000000000000100000 Clamped
+decf656 apply #43ffc000000000000000000000100000 -> 1.000000E+6117
+decf657 apply 1E+6116 -> #43ffc000000000000000000000020000 Clamped
+decf658 apply #43ffc000000000000000000000020000 -> 1.00000E+6116
+decf659 apply 1E+6115 -> #43ffc000000000000000000000004000 Clamped
+decf660 apply #43ffc000000000000000000000004000 -> 1.0000E+6115
+decf661 apply 1E+6114 -> #43ffc000000000000000000000000400 Clamped
+decf662 apply #43ffc000000000000000000000000400 -> 1.000E+6114
+decf663 apply 1E+6113 -> #43ffc000000000000000000000000080 Clamped
+decf664 apply #43ffc000000000000000000000000080 -> 1.00E+6113
+decf665 apply 1E+6112 -> #43ffc000000000000000000000000010 Clamped
+decf666 apply #43ffc000000000000000000000000010 -> 1.0E+6112
+decf667 apply 1E+6111 -> #43ffc000000000000000000000000001
+decf668 apply #43ffc000000000000000000000000001 -> 1E+6111
+decf669 apply 1E+6110 -> #43ff8000000000000000000000000001
+decf670 apply #43ff8000000000000000000000000001 -> 1E+6110
+
+-- Selected DPD codes
+decf700 apply #22080000000000000000000000000000 -> 0
+decf701 apply #22080000000000000000000000000009 -> 9
+decf702 apply #22080000000000000000000000000010 -> 10
+decf703 apply #22080000000000000000000000000019 -> 19
+decf704 apply #22080000000000000000000000000020 -> 20
+decf705 apply #22080000000000000000000000000029 -> 29
+decf706 apply #22080000000000000000000000000030 -> 30
+decf707 apply #22080000000000000000000000000039 -> 39
+decf708 apply #22080000000000000000000000000040 -> 40
+decf709 apply #22080000000000000000000000000049 -> 49
+decf710 apply #22080000000000000000000000000050 -> 50
+decf711 apply #22080000000000000000000000000059 -> 59
+decf712 apply #22080000000000000000000000000060 -> 60
+decf713 apply #22080000000000000000000000000069 -> 69
+decf714 apply #22080000000000000000000000000070 -> 70
+decf715 apply #22080000000000000000000000000071 -> 71
+decf716 apply #22080000000000000000000000000072 -> 72
+decf717 apply #22080000000000000000000000000073 -> 73
+decf718 apply #22080000000000000000000000000074 -> 74
+decf719 apply #22080000000000000000000000000075 -> 75
+decf720 apply #22080000000000000000000000000076 -> 76
+decf721 apply #22080000000000000000000000000077 -> 77
+decf722 apply #22080000000000000000000000000078 -> 78
+decf723 apply #22080000000000000000000000000079 -> 79
+
+decf730 apply #2208000000000000000000000000029e -> 994
+decf731 apply #2208000000000000000000000000029f -> 995
+decf732 apply #220800000000000000000000000002a0 -> 520
+decf733 apply #220800000000000000000000000002a1 -> 521
+
+-- DPD: one of each of the huffman groups
+decf740 apply #220800000000000000000000000003f7 -> 777
+decf741 apply #220800000000000000000000000003f8 -> 778
+decf742 apply #220800000000000000000000000003eb -> 787
+decf743 apply #2208000000000000000000000000037d -> 877
+decf744 apply #2208000000000000000000000000039f -> 997
+decf745 apply #220800000000000000000000000003bf -> 979
+decf746 apply #220800000000000000000000000003df -> 799
+decf747 apply #2208000000000000000000000000006e -> 888
+
+
+-- DPD all-highs cases (includes the 24 redundant codes)
+decf750 apply #2208000000000000000000000000006e -> 888
+decf751 apply #2208000000000000000000000000016e -> 888
+decf752 apply #2208000000000000000000000000026e -> 888
+decf753 apply #2208000000000000000000000000036e -> 888
+decf754 apply #2208000000000000000000000000006f -> 889
+decf755 apply #2208000000000000000000000000016f -> 889
+decf756 apply #2208000000000000000000000000026f -> 889
+decf757 apply #2208000000000000000000000000036f -> 889
+
+decf760 apply #2208000000000000000000000000007e -> 898
+decf761 apply #2208000000000000000000000000017e -> 898
+decf762 apply #2208000000000000000000000000027e -> 898
+decf763 apply #2208000000000000000000000000037e -> 898
+decf764 apply #2208000000000000000000000000007f -> 899
+decf765 apply #2208000000000000000000000000017f -> 899
+decf766 apply #2208000000000000000000000000027f -> 899
+decf767 apply #2208000000000000000000000000037f -> 899
+
+decf770 apply #220800000000000000000000000000ee -> 988
+decf771 apply #220800000000000000000000000001ee -> 988
+decf772 apply #220800000000000000000000000002ee -> 988
+decf773 apply #220800000000000000000000000003ee -> 988
+decf774 apply #220800000000000000000000000000ef -> 989
+decf775 apply #220800000000000000000000000001ef -> 989
+decf776 apply #220800000000000000000000000002ef -> 989
+decf777 apply #220800000000000000000000000003ef -> 989
+
+decf780 apply #220800000000000000000000000000fe -> 998
+decf781 apply #220800000000000000000000000001fe -> 998
+decf782 apply #220800000000000000000000000002fe -> 998
+decf783 apply #220800000000000000000000000003fe -> 998
+decf784 apply #220800000000000000000000000000ff -> 999
+decf785 apply #220800000000000000000000000001ff -> 999
+decf786 apply #220800000000000000000000000002ff -> 999
+decf787 apply #220800000000000000000000000003ff -> 999
+
diff --git a/Lib/test/decimaltestdata/decimal32.decTest b/Lib/test/decimaltestdata/decimal32.decTest
new file mode 100644
index 0000000..faf1cf4
--- /dev/null
+++ b/Lib/test/decimaltestdata/decimal32.decTest
@@ -0,0 +1,385 @@
+------------------------------------------------------------------------
+-- decimal32.decTest -- decimal four-byte format testcases --
+-- Copyright (c) IBM Corporation, 2000, 2003. 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.39
+
+-- 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
+
+extended: 1
+precision: 7
+rounding: half_up
+maxExponent: 96
+minExponent: -95
+
+-- General testcases
+-- (mostly derived from the Strawman 4 document and examples)
+decd001 apply #A23003D0 -> -7.50
+decd002 apply -7.50 -> #A23003D0
+
+-- Normality
+decd010 apply 1234567 -> #2654d2e7
+decd011 apply 1234567.0 -> #2654d2e7 Rounded
+decd012 apply 1234567.1 -> #2654d2e7 Rounded Inexact
+decd013 apply -1234567 -> #a654d2e7
+decd014 apply -1234567.0 -> #a654d2e7 Rounded
+decd015 apply -1234567.1 -> #a654d2e7 Rounded Inexact
+
+
+-- Nmax and similar
+decd022 apply 9.999999E+96 -> #77f3fcff
+decd023 apply #77f3fcff -> 9.999999E+96
+decd024 apply 1.234567E+96 -> #47f4d2e7
+decd025 apply #47f4d2e7 -> 1.234567E+96
+-- fold-downs (more below)
+decd030 apply 1.23E+96 -> #47f4c000 Clamped
+decd031 apply #47f4c000 -> 1.230000E+96
+decd032 apply 1E+96 -> #47f00000 Clamped
+decd033 apply #47f00000 -> 1.000000E+96
+
+-- overflows
+maxExponent: 999 -- set high so conversion causes the overflow
+minExponent: -999
+decd040 apply 10E+96 -> #78000000 Overflow Rounded Inexact
+decd041 apply 1.000000E+97 -> #78000000 Overflow Rounded Inexact
+maxExponent: 96
+minExponent: -95
+
+decd051 apply 12345 -> #225049c5
+decd052 apply #225049c5 -> 12345
+decd053 apply 1234 -> #22500534
+decd054 apply #22500534 -> 1234
+decd055 apply 123 -> #225000a3
+decd056 apply #225000a3 -> 123
+decd057 apply 12 -> #22500012
+decd058 apply #22500012 -> 12
+decd059 apply 1 -> #22500001
+decd060 apply #22500001 -> 1
+decd061 apply 1.23 -> #223000a3
+decd062 apply #223000a3 -> 1.23
+decd063 apply 123.45 -> #223049c5
+decd064 apply #223049c5 -> 123.45
+
+-- Nmin and below
+decd071 apply 1E-95 -> #00600001
+decd072 apply #00600001 -> 1E-95
+decd073 apply 1.000000E-95 -> #04000000
+decd074 apply #04000000 -> 1.000000E-95
+decd075 apply 1.000001E-95 -> #04000001
+decd076 apply #04000001 -> 1.000001E-95
+
+decd077 apply 0.100000E-95 -> #00020000 Subnormal
+decd07x apply 1.00000E-96 -> 1.00000E-96 Subnormal
+decd078 apply #00020000 -> 1.00000E-96 Subnormal
+decd079 apply 0.000010E-95 -> #00000010 Subnormal
+decd080 apply #00000010 -> 1.0E-100 Subnormal
+decd081 apply 0.000001E-95 -> #00000001 Subnormal
+decd082 apply #00000001 -> 1E-101 Subnormal
+decd083 apply 1e-101 -> #00000001 Subnormal
+decd084 apply #00000001 -> 1E-101 Subnormal
+decd08x apply 1e-101 -> 1E-101 Subnormal
+
+-- underflows
+decd090 apply 1e-101 -> #00000001 Subnormal
+decd091 apply 1.9e-101 -> #00000002 Subnormal Underflow Inexact Rounded
+decd092 apply 1.1e-101 -> #00000001 Subnormal Underflow Inexact Rounded
+decd093 apply 1.001e-101 -> #00000001 Subnormal Underflow Inexact Rounded
+decd094 apply 1.000001e-101 -> #00000001 Subnormal Underflow Inexact Rounded
+decd095 apply 1.0000001e-101 -> #00000001 Subnormal Underflow Inexact Rounded
+decd096 apply 0.1e-101 -> #00000000 Subnormal Underflow Inexact Rounded
+decd097 apply 0.001e-101 -> #00000000 Subnormal Underflow Inexact Rounded
+decd098 apply 0.000001e-101 -> #00000000 Subnormal Underflow Inexact Rounded
+decd099 apply 0.0000001e-101 -> #00000000 Subnormal Underflow Inexact Rounded
+
+-- same again, negatives --
+
+-- Nmax and similar
+decd122 apply -9.999999E+96 -> #f7f3fcff
+decd123 apply #f7f3fcff -> -9.999999E+96
+decd124 apply -1.234567E+96 -> #c7f4d2e7
+decd125 apply #c7f4d2e7 -> -1.234567E+96
+-- fold-downs (more below)
+decd130 apply -1.23E+96 -> #c7f4c000 Clamped
+decd131 apply #c7f4c000 -> -1.230000E+96
+decd132 apply -1E+96 -> #c7f00000 Clamped
+decd133 apply #c7f00000 -> -1.000000E+96
+
+-- overflows
+maxExponent: 999 -- set high so conversion causes the overflow
+minExponent: -999
+decd140 apply -10E+96 -> #f8000000 Overflow Rounded Inexact
+decd141 apply -1.000000E+97 -> #f8000000 Overflow Rounded Inexact
+maxExponent: 96
+minExponent: -95
+
+decd151 apply -12345 -> #a25049c5
+decd152 apply #a25049c5 -> -12345
+decd153 apply -1234 -> #a2500534
+decd154 apply #a2500534 -> -1234
+decd155 apply -123 -> #a25000a3
+decd156 apply #a25000a3 -> -123
+decd157 apply -12 -> #a2500012
+decd158 apply #a2500012 -> -12
+decd159 apply -1 -> #a2500001
+decd160 apply #a2500001 -> -1
+decd161 apply -1.23 -> #a23000a3
+decd162 apply #a23000a3 -> -1.23
+decd163 apply -123.45 -> #a23049c5
+decd164 apply #a23049c5 -> -123.45
+
+-- Nmin and below
+decd171 apply -1E-95 -> #80600001
+decd172 apply #80600001 -> -1E-95
+decd173 apply -1.000000E-95 -> #84000000
+decd174 apply #84000000 -> -1.000000E-95
+decd175 apply -1.000001E-95 -> #84000001
+decd176 apply #84000001 -> -1.000001E-95
+
+decd177 apply -0.100000E-95 -> #80020000 Subnormal
+decd178 apply #80020000 -> -1.00000E-96 Subnormal
+decd179 apply -0.000010E-95 -> #80000010 Subnormal
+decd180 apply #80000010 -> -1.0E-100 Subnormal
+decd181 apply -0.000001E-95 -> #80000001 Subnormal
+decd182 apply #80000001 -> -1E-101 Subnormal
+decd183 apply -1e-101 -> #80000001 Subnormal
+decd184 apply #80000001 -> -1E-101 Subnormal
+
+-- underflows
+decd190 apply -1e-101 -> #80000001 Subnormal
+decd191 apply -1.9e-101 -> #80000002 Subnormal Underflow Inexact Rounded
+decd192 apply -1.1e-101 -> #80000001 Subnormal Underflow Inexact Rounded
+decd193 apply -1.001e-101 -> #80000001 Subnormal Underflow Inexact Rounded
+decd194 apply -1.000001e-101 -> #80000001 Subnormal Underflow Inexact Rounded
+decd195 apply -1.0000001e-101 -> #80000001 Subnormal Underflow Inexact Rounded
+decd196 apply -0.1e-101 -> #80000000 Subnormal Underflow Inexact Rounded
+decd197 apply -0.001e-101 -> #80000000 Subnormal Underflow Inexact Rounded
+decd198 apply -0.000001e-101 -> #80000000 Subnormal Underflow Inexact Rounded
+decd199 apply -0.0000001e-101 -> #80000000 Subnormal Underflow Inexact Rounded
+
+-- zeros
+decd400 apply 0E-400 -> #00000000 Clamped
+decd401 apply 0E-101 -> #00000000
+decd402 apply #00000000 -> 0E-101
+decd403 apply 0.000000E-95 -> #00000000
+decd404 apply #00000000 -> 0E-101
+decd405 apply 0E-2 -> #22300000
+decd406 apply #22300000 -> 0.00
+decd407 apply 0 -> #22500000
+decd408 apply #22500000 -> 0
+decd409 apply 0E+3 -> #22800000
+decd410 apply #22800000 -> 0E+3
+decd411 apply 0E+90 -> #43f00000
+decd412 apply #43f00000 -> 0E+90
+-- clamped zeros...
+decd413 apply 0E+91 -> #43f00000 Clamped
+decd414 apply #43f00000 -> 0E+90
+decd415 apply 0E+96 -> #43f00000 Clamped
+decd416 apply #43f00000 -> 0E+90
+decd417 apply 0E+400 -> #43f00000 Clamped
+decd418 apply #43f00000 -> 0E+90
+
+-- negative zeros
+decd420 apply -0E-400 -> #80000000 Clamped
+decd421 apply -0E-101 -> #80000000
+decd422 apply #80000000 -> -0E-101
+decd423 apply -0.000000E-95 -> #80000000
+decd424 apply #80000000 -> -0E-101
+decd425 apply -0E-2 -> #a2300000
+decd426 apply #a2300000 -> -0.00
+decd427 apply -0 -> #a2500000
+decd428 apply #a2500000 -> -0
+decd429 apply -0E+3 -> #a2800000
+decd430 apply #a2800000 -> -0E+3
+decd431 apply -0E+90 -> #c3f00000
+decd432 apply #c3f00000 -> -0E+90
+-- clamped zeros...
+decd433 apply -0E+91 -> #c3f00000 Clamped
+decd434 apply #c3f00000 -> -0E+90
+decd435 apply -0E+96 -> #c3f00000 Clamped
+decd436 apply #c3f00000 -> -0E+90
+decd437 apply -0E+400 -> #c3f00000 Clamped
+decd438 apply #c3f00000 -> -0E+90
+
+-- Specials
+decd500 apply Infinity -> #78000000
+decd501 apply #78787878 -> #78000000
+decd502 apply #78000000 -> Infinity
+decd503 apply #79797979 -> #78000000
+decd504 apply #79000000 -> Infinity
+decd505 apply #7a7a7a7a -> #78000000
+decd506 apply #7a000000 -> Infinity
+decd507 apply #7b7b7b7b -> #78000000
+decd508 apply #7b000000 -> Infinity
+decd509 apply #7c7c7c7c -> #7c0c7c7c
+
+decd510 apply NaN -> #7c000000
+decd511 apply #7c000000 -> NaN
+decd512 apply #7d7d7d7d -> #7c0d7d7d
+decd513 apply #7d000000 -> NaN
+decd514 apply #7e7e7e7e -> #7e0e7c7e
+decd515 apply #7e000000 -> sNaN
+decd516 apply #7f7f7f7f -> #7e0f7c7f
+decd517 apply #7f000000 -> sNaN
+decd518 apply #7fffffff -> sNaN999999
+decd519 apply #7fffffff -> #7e03fcff
+
+decd520 apply -Infinity -> #f8000000
+decd521 apply #f8787878 -> #f8000000
+decd522 apply #f8000000 -> -Infinity
+decd523 apply #f9797979 -> #f8000000
+decd524 apply #f9000000 -> -Infinity
+decd525 apply #fa7a7a7a -> #f8000000
+decd526 apply #fa000000 -> -Infinity
+decd527 apply #fb7b7b7b -> #f8000000
+decd528 apply #fb000000 -> -Infinity
+
+decd529 apply -NaN -> #fc000000
+decd530 apply #fc7c7c7c -> #fc0c7c7c
+decd531 apply #fc000000 -> -NaN
+decd532 apply #fd7d7d7d -> #fc0d7d7d
+decd533 apply #fd000000 -> -NaN
+decd534 apply #fe7e7e7e -> #fe0e7c7e
+decd535 apply #fe000000 -> -sNaN
+decd536 apply #ff7f7f7f -> #fe0f7c7f
+decd537 apply #ff000000 -> -sNaN
+decd538 apply #ffffffff -> -sNaN999999
+decd539 apply #ffffffff -> #fe03fcff
+
+-- diagnostic NaNs
+decd540 apply NaN -> #7c000000
+decd541 apply NaN0 -> #7c000000
+decd542 apply NaN1 -> #7c000001
+decd543 apply NaN12 -> #7c000012
+decd544 apply NaN79 -> #7c000079
+decd545 apply NaN12345 -> #7c0049c5
+decd546 apply NaN123456 -> #7c028e56
+decd547 apply NaN799799 -> #7c0f7fdf
+decd548 apply NaN999999 -> #7c03fcff
+decd549 apply NaN1234567 -> #7c000000 -- too many digits
+
+
+-- fold-down full sequence
+decd601 apply 1E+96 -> #47f00000 Clamped
+decd602 apply #47f00000 -> 1.000000E+96
+decd603 apply 1E+95 -> #43f20000 Clamped
+decd604 apply #43f20000 -> 1.00000E+95
+decd605 apply 1E+94 -> #43f04000 Clamped
+decd606 apply #43f04000 -> 1.0000E+94
+decd607 apply 1E+93 -> #43f00400 Clamped
+decd608 apply #43f00400 -> 1.000E+93
+decd609 apply 1E+92 -> #43f00080 Clamped
+decd610 apply #43f00080 -> 1.00E+92
+decd611 apply 1E+91 -> #43f00010 Clamped
+decd612 apply #43f00010 -> 1.0E+91
+decd613 apply 1E+90 -> #43f00001
+decd614 apply #43f00001 -> 1E+90
+
+
+-- Selected DPD codes
+decd700 apply #22500000 -> 0
+decd701 apply #22500009 -> 9
+decd702 apply #22500010 -> 10
+decd703 apply #22500019 -> 19
+decd704 apply #22500020 -> 20
+decd705 apply #22500029 -> 29
+decd706 apply #22500030 -> 30
+decd707 apply #22500039 -> 39
+decd708 apply #22500040 -> 40
+decd709 apply #22500049 -> 49
+decd710 apply #22500050 -> 50
+decd711 apply #22500059 -> 59
+decd712 apply #22500060 -> 60
+decd713 apply #22500069 -> 69
+decd714 apply #22500070 -> 70
+decd715 apply #22500071 -> 71
+decd716 apply #22500072 -> 72
+decd717 apply #22500073 -> 73
+decd718 apply #22500074 -> 74
+decd719 apply #22500075 -> 75
+decd720 apply #22500076 -> 76
+decd721 apply #22500077 -> 77
+decd722 apply #22500078 -> 78
+decd723 apply #22500079 -> 79
+
+decd730 apply #2250029e -> 994
+decd731 apply #2250029f -> 995
+decd732 apply #225002a0 -> 520
+decd733 apply #225002a1 -> 521
+
+-- DPD: one of each of the huffman groups
+decd740 apply #225003f7 -> 777
+decd741 apply #225003f8 -> 778
+decd742 apply #225003eb -> 787
+decd743 apply #2250037d -> 877
+decd744 apply #2250039f -> 997
+decd745 apply #225003bf -> 979
+decd746 apply #225003df -> 799
+decd747 apply #2250006e -> 888
+
+
+-- DPD all-highs cases (includes the 24 redundant codes)
+decd750 apply #2250006e -> 888
+decd751 apply #2250016e -> 888
+decd752 apply #2250026e -> 888
+decd753 apply #2250036e -> 888
+decd754 apply #2250006f -> 889
+decd755 apply #2250016f -> 889
+decd756 apply #2250026f -> 889
+decd757 apply #2250036f -> 889
+
+decd760 apply #2250007e -> 898
+decd761 apply #2250017e -> 898
+decd762 apply #2250027e -> 898
+decd763 apply #2250037e -> 898
+decd764 apply #2250007f -> 899
+decd765 apply #2250017f -> 899
+decd766 apply #2250027f -> 899
+decd767 apply #2250037f -> 899
+
+decd770 apply #225000ee -> 988
+decd771 apply #225001ee -> 988
+decd772 apply #225002ee -> 988
+decd773 apply #225003ee -> 988
+decd774 apply #225000ef -> 989
+decd775 apply #225001ef -> 989
+decd776 apply #225002ef -> 989
+decd777 apply #225003ef -> 989
+
+decd780 apply #225000fe -> 998
+decd781 apply #225001fe -> 998
+decd782 apply #225002fe -> 998
+decd783 apply #225003fe -> 998
+decd784 apply #225000ff -> 999
+decd785 apply #225001ff -> 999
+decd786 apply #225002ff -> 999
+decd787 apply #225003ff -> 999
+
diff --git a/Lib/test/decimaltestdata/decimal64.decTest b/Lib/test/decimaltestdata/decimal64.decTest
index 74599be..a254167 100644
--- a/Lib/test/decimaltestdata/decimal64.decTest
+++ b/Lib/test/decimaltestdata/decimal64.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.28
+version: 2.39
-- This set of tests is for the eight-byte concrete representation.
-- Its characteristics are:
@@ -234,6 +234,7 @@ dece451 apply -0E+500 -> #c3fc000000000000 Clamped
dece452 apply #c3fc000000000000 -> -0E+369
-- Specials
+dece500 apply Infinity -> #7800000000000000
dece501 apply #7878787878787878 -> #7800000000000000
dece502 apply #7800000000000000 -> Infinity
dece503 apply #7979797979797979 -> #7800000000000000
@@ -242,15 +243,20 @@ dece505 apply #7a7a7a7a7a7a7a7a -> #7800000000000000
dece506 apply #7a00000000000000 -> Infinity
dece507 apply #7b7b7b7b7b7b7b7b -> #7800000000000000
dece508 apply #7b00000000000000 -> Infinity
-dece509 apply #7c7c7c7c7c7c7c7c -> #7dffffffffffffff
-dece510 apply #7c00000000000000 -> NaN
-dece511 apply #7d7d7d7d7d7d7d7d -> #7dffffffffffffff
-dece512 apply #7d00000000000000 -> NaN
-dece513 apply #7e7e7e7e7e7e7e7e -> #7fffffffffffffff
-dece514 apply #7e00000000000000 -> sNaN
-dece515 apply #7f7f7f7f7f7f7f7f -> #7fffffffffffffff
-dece516 apply #7f00000000000000 -> sNaN
+dece509 apply NaN -> #7c00000000000000
+dece510 apply #7c7c7c7c7c7c7c7c -> #7c007c7c7c7c7c7c
+dece511 apply #7c00000000000000 -> NaN
+dece512 apply #7d7d7d7d7d7d7d7d -> #7c017d7d7d7d7d7d
+dece513 apply #7d00000000000000 -> NaN
+dece514 apply #7e7e7e7e7e7e7e7e -> #7e007e7e7e7e7c7e
+dece515 apply #7e00000000000000 -> sNaN
+dece516 apply #7f7f7f7f7f7f7f7f -> #7e007f7f7f7f7c7f
+dece517 apply #7f00000000000000 -> sNaN
+dece518 apply #7fffffffffffffff -> sNaN999999999999999
+dece519 apply #7fffffffffffffff -> #7e00ff3fcff3fcff
+
+dece520 apply -Infinity -> #f800000000000000
dece521 apply #f878787878787878 -> #f800000000000000
dece522 apply #f800000000000000 -> -Infinity
dece523 apply #f979797979797979 -> #f800000000000000
@@ -259,14 +265,31 @@ dece525 apply #fa7a7a7a7a7a7a7a -> #f800000000000000
dece526 apply #fa00000000000000 -> -Infinity
dece527 apply #fb7b7b7b7b7b7b7b -> #f800000000000000
dece528 apply #fb00000000000000 -> -Infinity
-dece529 apply #fc7c7c7c7c7c7c7c -> #7dffffffffffffff
-dece530 apply #fc00000000000000 -> NaN
-dece531 apply #fd7d7d7d7d7d7d7d -> #7dffffffffffffff
-dece532 apply #fd00000000000000 -> NaN
-dece533 apply #fe7e7e7e7e7e7e7e -> #7fffffffffffffff
-dece534 apply #fe00000000000000 -> sNaN
-dece535 apply #ff7f7f7f7f7f7f7f -> #7fffffffffffffff
-dece536 apply #ff00000000000000 -> sNaN
+
+dece529 apply -NaN -> #fc00000000000000
+dece530 apply #fc7c7c7c7c7c7c7c -> #fc007c7c7c7c7c7c
+dece531 apply #fc00000000000000 -> -NaN
+dece532 apply #fd7d7d7d7d7d7d7d -> #fc017d7d7d7d7d7d
+dece533 apply #fd00000000000000 -> -NaN
+dece534 apply #fe7e7e7e7e7e7e7e -> #fe007e7e7e7e7c7e
+dece535 apply #fe00000000000000 -> -sNaN
+dece536 apply #ff7f7f7f7f7f7f7f -> #fe007f7f7f7f7c7f
+dece537 apply #ff00000000000000 -> -sNaN
+dece538 apply #ffffffffffffffff -> -sNaN999999999999999
+dece539 apply #ffffffffffffffff -> #fe00ff3fcff3fcff
+
+-- diagnostic NaNs
+dece540 apply NaN -> #7c00000000000000
+dece541 apply NaN0 -> #7c00000000000000
+dece542 apply NaN1 -> #7c00000000000001
+dece543 apply NaN12 -> #7c00000000000012
+dece544 apply NaN79 -> #7c00000000000079
+dece545 apply NaN12345 -> #7c000000000049c5
+dece546 apply NaN123456 -> #7c00000000028e56
+dece547 apply NaN799799 -> #7c000000000f7fdf
+dece548 apply NaN799799799799799 -> #7c03dff7fdff7fdf
+dece549 apply NaN999999999999999 -> #7c00ff3fcff3fcff
+dece550 apply NaN1234567890123456 -> #7c00000000000000 -- too many digits
-- fold-down full sequence
dece601 apply 1E+384 -> #47fc000000000000 Clamped
diff --git a/Lib/test/decimaltestdata/divide.decTest b/Lib/test/decimaltestdata/divide.decTest
index 3141b4d..437d82a 100644
--- a/Lib/test/decimaltestdata/divide.decTest
+++ b/Lib/test/decimaltestdata/divide.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
extended: 1
precision: 9
diff --git a/Lib/test/decimaltestdata/divideint.decTest b/Lib/test/decimaltestdata/divideint.decTest
index ae52647..7c31297 100644
--- a/Lib/test/decimaltestdata/divideint.decTest
+++ b/Lib/test/decimaltestdata/divideint.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
extended: 1
precision: 9
diff --git a/Lib/test/decimaltestdata/inexact.decTest b/Lib/test/decimaltestdata/inexact.decTest
index 031891c..3c435bd 100644
--- a/Lib/test/decimaltestdata/inexact.decTest
+++ b/Lib/test/decimaltestdata/inexact.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
extended: 1
precision: 9
diff --git a/Lib/test/decimaltestdata/max.decTest b/Lib/test/decimaltestdata/max.decTest
index cb4e5cf..9798ae2 100644
--- a/Lib/test/decimaltestdata/max.decTest
+++ b/Lib/test/decimaltestdata/max.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- we assume that base comparison is tested in compare.decTest, so
-- these mainly cover special cases and rounding
@@ -60,24 +60,36 @@ 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
+maxx034 max -0 0 -> 0 -- note: -0 = 0, but 0 chosen
maxx035 max -0 -0 -> -0
-maxx036 max -0 -0.0 -> -0
-maxx037 max -0 0.0 -> -0
-maxx038 max 0.0 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.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
+maxx045 max -0.0 0.0 -> 0.0
-maxx046 max -0E1 0E2 -> -0E+1
-maxx047 max 0E2 0E1 -> 0E+2
-maxx048 max 0E1 0E2 -> 0E+1
-maxx049 max -0E3 -0E2 -> -0E+3
+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
@@ -115,23 +127,24 @@ maxx133 max 1 -Inf -> 1
maxx134 max 1000 -Inf -> 1000
maxx135 max Inf -Inf -> Infinity
-maxx141 max NaN -Inf -> NaN
-maxx142 max NaN -1000 -> NaN
-maxx143 max NaN -1 -> NaN
-maxx144 max NaN -0 -> NaN
-maxx145 max NaN 0 -> NaN
-maxx146 max NaN 1 -> NaN
-maxx147 max NaN 1000 -> NaN
-maxx148 max NaN Inf -> NaN
+-- 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 -> NaN
-maxx151 max -1000 NaN -> NaN
-maxx152 max -1 NaN -> NaN
-maxx153 max -0 NaN -> NaN
-maxx154 max 0 NaN -> NaN
-maxx155 max 1 NaN -> NaN
-maxx156 max 1000 NaN -> NaN
-maxx157 max Inf 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
@@ -154,13 +167,18 @@ maxx178 max Inf sNaN -> NaN Invalid_operation
maxx179 max NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
-maxx181 max NaN9 -Inf -> NaN9
-maxx182 max NaN8 9 -> NaN8
-maxx183 max -NaN7 Inf -> -NaN7
-maxx184 max NaN6 NaN5 -> NaN6
-maxx185 max -Inf NaN4 -> NaN4
-maxx186 max -9 -NaN3 -> -NaN3
-maxx187 max Inf NaN2 -> NaN2
+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
@@ -218,8 +236,9 @@ maxx238 max 1 -1234567896 -> 1
-- from examples
maxx280 max '3' '2' -> '3'
maxx281 max '-10' '3' -> '3'
-maxx282 max '1.0' '1' -> '1.0'
+maxx282 max '1.0' '1' -> '1'
maxx283 max '1' '1.0' -> '1'
+maxx284 max '7' 'NaN' -> '7'
-- overflow and underflow tests ...
maxExponent: 999999999
@@ -255,42 +274,99 @@ 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
+
-- overflow tests
maxexponent: 999999999
minexponent: -999999999
precision: 3
-maxx400 max 9.999E+999999999 0 -> Infinity Inexact Overflow Rounded
-maxx401 max -9.999E+999999999 0 -> 0
+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
-maxx410 max 1.00E-999 0 -> 1.00E-999
-maxx411 max 0.1E-999 0 -> 1E-1000 Subnormal
-maxx412 max 0.10E-999 0 -> 1.0E-1000 Subnormal
-maxx413 max 0.100E-999 0 -> 1.0E-1000 Subnormal Rounded
-maxx414 max 0.01E-999 0 -> 1E-1001 Subnormal
+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 Emin
-maxx415 max 0.999E-999 0 -> 1.00E-999 Inexact Rounded Subnormal Underflow
-maxx416 max 0.099E-999 0 -> 1.0E-1000 Inexact Rounded Subnormal Underflow
-maxx417 max 0.009E-999 0 -> 1E-1001 Inexact Rounded Subnormal Underflow
-maxx418 max 0.001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow
-maxx419 max 0.0009E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow
-maxx420 max 0.0001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow
+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
+maxx519 max 0.0009E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow
+maxx520 max 0.0001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow
-maxx430 max -1.00E-999 0 -> 0
-maxx431 max -0.1E-999 0 -> 0
-maxx432 max -0.10E-999 0 -> 0
-maxx433 max -0.100E-999 0 -> 0
-maxx434 max -0.01E-999 0 -> 0
-maxx435 max -0.999E-999 0 -> 0
-maxx436 max -0.099E-999 0 -> 0
-maxx437 max -0.009E-999 0 -> 0
-maxx438 max -0.001E-999 0 -> 0
-maxx439 max -0.0009E-999 0 -> 0
-maxx440 max -0.0001E-999 0 -> 0
+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
-- Null tests
maxx900 max 10 # -> NaN Invalid_operation
diff --git a/Lib/test/decimaltestdata/min.decTest b/Lib/test/decimaltestdata/min.decTest
index 8ee0907..6046401 100644
--- a/Lib/test/decimaltestdata/min.decTest
+++ b/Lib/test/decimaltestdata/min.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- we assume that base comparison is tested in compare.decTest, so
-- these mainly cover special cases and rounding
@@ -57,26 +57,28 @@ mnmx026 min 2 2 -> 2
-- extended zeros
mnmx030 min 0 0 -> 0
-mnmx031 min 0 -0 -> 0
-mnmx032 min 0 -0.0 -> 0
-mnmx033 min 0 0.0 -> 0
+mnmx031 min 0 -0 -> -0
+mnmx032 min 0 -0.0 -> -0.0
+mnmx033 min 0 0.0 -> 0.0
mnmx034 min -0 0 -> -0
mnmx035 min -0 -0 -> -0
mnmx036 min -0 -0.0 -> -0
mnmx037 min -0 0.0 -> -0
mnmx038 min 0.0 0 -> 0.0
-mnmx039 min 0.0 -0 -> 0.0
-mnmx040 min 0.0 -0.0 -> 0.0
+mnmx039 min 0.0 -0 -> -0
+mnmx040 min 0.0 -0.0 -> -0.0
mnmx041 min 0.0 0.0 -> 0.0
mnmx042 min -0.0 0 -> -0.0
-mnmx043 min -0.0 -0 -> -0.0
+mnmx043 min -0.0 -0 -> -0
mnmx044 min -0.0 -0.0 -> -0.0
mnmx045 min -0.0 0.0 -> -0.0
-mnmx046 min -0E1 0E2 -> -0E+1
-mnmx047 min 0E2 0E1 -> 0E+2
-mnmx048 min 0E1 0E2 -> 0E+1
-mnmx049 min -0E3 -0E2 -> -0E+3
+mnmx046 min 0E1 -0E1 -> -0E+1
+mnmx047 min -0E1 0E2 -> -0E+1
+mnmx048 min 0E2 0E1 -> 0E+1
+mnmx049 min 0E1 0E2 -> 0E+1
+mnmx050 min -0E3 -0E2 -> -0E+3
+mnmx051 min -0E2 -0E3 -> -0E+3
-- Specials
precision: 9
@@ -114,23 +116,24 @@ mnmx133 min 1 -Inf -> -Infinity
mnmx134 min 1000 -Inf -> -Infinity
mnmx135 min Inf -Inf -> -Infinity
-mnmx141 min NaN -Inf -> NaN
-mnmx142 min NaN -1000 -> NaN
-mnmx143 min NaN -1 -> NaN
-mnmx144 min NaN -0 -> NaN
-mnmx145 min NaN 0 -> NaN
-mnmx146 min NaN 1 -> NaN
-mnmx147 min NaN 1000 -> NaN
-mnmx148 min NaN Inf -> NaN
+-- 2004.08.02 754r chooses number over NaN in mixed cases
+mnmx141 min NaN -Inf -> -Infinity
+mnmx142 min NaN -1000 -> -1000
+mnmx143 min NaN -1 -> -1
+mnmx144 min NaN -0 -> -0
+mnmx145 min NaN 0 -> 0
+mnmx146 min NaN 1 -> 1
+mnmx147 min NaN 1000 -> 1000
+mnmx148 min NaN Inf -> Infinity
mnmx149 min NaN NaN -> NaN
-mnmx150 min -Inf NaN -> NaN
-mnmx151 min -1000 NaN -> NaN
-mnmx152 min -1 -NaN -> -NaN
-mnmx153 min -0 NaN -> NaN
-mnmx154 min 0 -NaN -> -NaN
-mnmx155 min 1 NaN -> NaN
-mnmx156 min 1000 NaN -> NaN
-mnmx157 min Inf NaN -> NaN
+mnmx150 min -Inf NaN -> -Infinity
+mnmx151 min -1000 NaN -> -1000
+mnmx152 min -1 -NaN -> -1
+mnmx153 min -0 NaN -> -0
+mnmx154 min 0 -NaN -> 0
+mnmx155 min 1 NaN -> 1
+mnmx156 min 1000 NaN -> 1000
+mnmx157 min Inf NaN -> Infinity
mnmx161 min sNaN -Inf -> NaN Invalid_operation
mnmx162 min sNaN -1000 -> NaN Invalid_operation
@@ -153,17 +156,22 @@ mnmx178 min Inf sNaN -> NaN Invalid_operation
mnmx179 min NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
-mnmx181 min NaN9 -Inf -> NaN9
-mnmx182 min -NaN8 9990 -> -NaN8
-mnmx183 min NaN71 Inf -> NaN71
-mnmx184 min NaN6 NaN51 -> NaN6
-mnmx185 min -Inf NaN41 -> NaN41
-mnmx186 min -9999 -NaN33 -> -NaN33
-mnmx187 min Inf NaN2 -> NaN2
+mnmx181 min NaN9 -Inf -> -Infinity
+mnmx182 min -NaN8 9990 -> 9990
+mnmx183 min NaN71 Inf -> Infinity
+
+mnmx184 min NaN1 NaN54 -> NaN1
+mnmx185 min NaN22 -NaN53 -> NaN22
+mnmx186 min -NaN3 NaN6 -> -NaN3
+mnmx187 min -NaN44 NaN7 -> -NaN44
+
+mnmx188 min -Inf NaN41 -> -Infinity
+mnmx189 min -9999 -NaN33 -> -9999
+mnmx190 min Inf NaN2 -> Infinity
mnmx191 min sNaN99 -Inf -> NaN99 Invalid_operation
mnmx192 min sNaN98 -11 -> NaN98 Invalid_operation
-mnmx193 min -sNaN97 NaN -> -NaN97 Invalid_operation
+mnmx193 min -sNaN97 NaN8 -> -NaN97 Invalid_operation
mnmx194 min sNaN69 sNaN94 -> NaN69 Invalid_operation
mnmx195 min NaN95 sNaN93 -> NaN93 Invalid_operation
mnmx196 min -Inf sNaN92 -> NaN92 Invalid_operation
@@ -218,7 +226,8 @@ mnmx238 min 1 1234567896 -> 1
mnmx280 min '3' '2' -> '2'
mnmx281 min '-10' '3' -> '-10'
mnmx282 min '1.0' '1' -> '1.0'
-mnmx283 min '1' '1.0' -> '1'
+mnmx283 min '1' '1.0' -> '1.0'
+mnmx284 min '7' 'NaN' -> '7'
-- overflow and underflow tests .. subnormal results [inputs] now allowed
maxExponent: 999999999
@@ -254,42 +263,99 @@ mnmx356 min -1e-777777777 +1e-411111111 -> -1E-777777777
mnmx357 min +1e-777777777 -1e-411111111 -> -1E-411111111
mnmx358 min +1e-777777777 +1e-411111111 -> 1E-777777777
+-- expanded list from min/max 754r purple prose
+-- [explicit tests for exponent ordering]
+mnmx401 min Inf 1.1 -> 1.1
+mnmx402 min 1.1 1 -> 1
+mnmx403 min 1 1.0 -> 1.0
+mnmx404 min 1.0 0.1 -> 0.1
+mnmx405 min 0.1 0.10 -> 0.10
+mnmx406 min 0.10 0.100 -> 0.100
+mnmx407 min 0.10 0 -> 0
+mnmx408 min 0 0.0 -> 0.0
+mnmx409 min 0.0 -0 -> -0
+mnmx410 min 0.0 -0.0 -> -0.0
+mnmx411 min 0.00 -0.0 -> -0.0
+mnmx412 min 0.0 -0.00 -> -0.00
+mnmx413 min 0 -0.0 -> -0.0
+mnmx414 min 0 -0 -> -0
+mnmx415 min -0.0 -0 -> -0
+mnmx416 min -0 -0.100 -> -0.100
+mnmx417 min -0.100 -0.10 -> -0.10
+mnmx418 min -0.10 -0.1 -> -0.1
+mnmx419 min -0.1 -1.0 -> -1.0
+mnmx420 min -1.0 -1 -> -1
+mnmx421 min -1 -1.1 -> -1.1
+mnmx423 min -1.1 -Inf -> -Infinity
+-- same with operands reversed
+mnmx431 min 1.1 Inf -> 1.1
+mnmx432 min 1 1.1 -> 1
+mnmx433 min 1.0 1 -> 1.0
+mnmx434 min 0.1 1.0 -> 0.1
+mnmx435 min 0.10 0.1 -> 0.10
+mnmx436 min 0.100 0.10 -> 0.100
+mnmx437 min 0 0.10 -> 0
+mnmx438 min 0.0 0 -> 0.0
+mnmx439 min -0 0.0 -> -0
+mnmx440 min -0.0 0.0 -> -0.0
+mnmx441 min -0.0 0.00 -> -0.0
+mnmx442 min -0.00 0.0 -> -0.00
+mnmx443 min -0.0 0 -> -0.0
+mnmx444 min -0 0 -> -0
+mnmx445 min -0 -0.0 -> -0
+mnmx446 min -0.100 -0 -> -0.100
+mnmx447 min -0.10 -0.100 -> -0.10
+mnmx448 min -0.1 -0.10 -> -0.1
+mnmx449 min -1.0 -0.1 -> -1.0
+mnmx450 min -1 -1.0 -> -1
+mnmx451 min -1.1 -1 -> -1.1
+mnmx453 min -Inf -1.1 -> -Infinity
+-- largies
+mnmx460 min 1000 1E+3 -> 1000
+mnmx461 min 1E+3 1000 -> 1000
+mnmx462 min 1000 -1E+3 -> -1E+3
+mnmx463 min 1E+3 -1000 -> -1000
+mnmx464 min -1000 1E+3 -> -1000
+mnmx465 min -1E+3 1000 -> -1E+3
+mnmx466 min -1000 -1E+3 -> -1E+3
+mnmx467 min -1E+3 -1000 -> -1E+3
+
-- overflow tests
maxexponent: 999999999
minexponent: -999999999
precision: 3
-mnmx400 min 9.999E+999999999 0 -> 0
-mnmx401 min -9.999E+999999999 0 -> -Infinity Inexact Overflow Rounded
+mnmx500 min 9.999E+999999999 0 -> 0
+mnmx501 min -9.999E+999999999 0 -> -Infinity Inexact Overflow Rounded
-- subnormals and underflow
precision: 3
maxexponent: 999
minexponent: -999
-mnmx410 min 1.00E-999 0 -> 0
-mnmx411 min 0.1E-999 0 -> 0
-mnmx412 min 0.10E-999 0 -> 0
-mnmx413 min 0.100E-999 0 -> 0
-mnmx414 min 0.01E-999 0 -> 0
-mnmx415 min 0.999E-999 0 -> 0
-mnmx416 min 0.099E-999 0 -> 0
-mnmx417 min 0.009E-999 0 -> 0
-mnmx418 min 0.001E-999 0 -> 0
-mnmx419 min 0.0009E-999 0 -> 0
-mnmx420 min 0.0001E-999 0 -> 0
+mnmx510 min 1.00E-999 0 -> 0
+mnmx511 min 0.1E-999 0 -> 0
+mnmx512 min 0.10E-999 0 -> 0
+mnmx513 min 0.100E-999 0 -> 0
+mnmx514 min 0.01E-999 0 -> 0
+mnmx515 min 0.999E-999 0 -> 0
+mnmx516 min 0.099E-999 0 -> 0
+mnmx517 min 0.009E-999 0 -> 0
+mnmx518 min 0.001E-999 0 -> 0
+mnmx519 min 0.0009E-999 0 -> 0
+mnmx520 min 0.0001E-999 0 -> 0
-mnmx430 min -1.00E-999 0 -> -1.00E-999
-mnmx431 min -0.1E-999 0 -> -1E-1000 Subnormal
-mnmx432 min -0.10E-999 0 -> -1.0E-1000 Subnormal
-mnmx433 min -0.100E-999 0 -> -1.0E-1000 Subnormal Rounded
-mnmx434 min -0.01E-999 0 -> -1E-1001 Subnormal
+mnmx530 min -1.00E-999 0 -> -1.00E-999
+mnmx531 min -0.1E-999 0 -> -1E-1000 Subnormal
+mnmx532 min -0.10E-999 0 -> -1.0E-1000 Subnormal
+mnmx533 min -0.100E-999 0 -> -1.0E-1000 Subnormal Rounded
+mnmx534 min -0.01E-999 0 -> -1E-1001 Subnormal
-- next is rounded to Emin
-mnmx435 min -0.999E-999 0 -> -1.00E-999 Inexact Rounded Subnormal Underflow
-mnmx436 min -0.099E-999 0 -> -1.0E-1000 Inexact Rounded Subnormal Underflow
-mnmx437 min -0.009E-999 0 -> -1E-1001 Inexact Rounded Subnormal Underflow
-mnmx438 min -0.001E-999 0 -> -0E-1001 Inexact Rounded Subnormal Underflow
-mnmx439 min -0.0009E-999 0 -> -0E-1001 Inexact Rounded Subnormal Underflow
-mnmx440 min -0.0001E-999 0 -> -0E-1001 Inexact Rounded Subnormal Underflow
+mnmx535 min -0.999E-999 0 -> -1.00E-999 Inexact Rounded Subnormal Underflow
+mnmx536 min -0.099E-999 0 -> -1.0E-1000 Inexact Rounded Subnormal Underflow
+mnmx537 min -0.009E-999 0 -> -1E-1001 Inexact Rounded Subnormal Underflow
+mnmx538 min -0.001E-999 0 -> -0E-1001 Inexact Rounded Subnormal Underflow
+mnmx539 min -0.0009E-999 0 -> -0E-1001 Inexact Rounded Subnormal Underflow
+mnmx540 min -0.0001E-999 0 -> -0E-1001 Inexact Rounded Subnormal Underflow
-- Null tests
diff --git a/Lib/test/decimaltestdata/minus.decTest b/Lib/test/decimaltestdata/minus.decTest
index a8a9231..d21af83 100644
--- a/Lib/test/decimaltestdata/minus.decTest
+++ b/Lib/test/decimaltestdata/minus.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- This set of tests primarily tests the existence of the operator.
-- Subtraction, rounding, and more overflows are tested elsewhere.
diff --git a/Lib/test/decimaltestdata/multiply.decTest b/Lib/test/decimaltestdata/multiply.decTest
index a3ac81e..f650150 100644
--- a/Lib/test/decimaltestdata/multiply.decTest
+++ b/Lib/test/decimaltestdata/multiply.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
extended: 1
precision: 9
diff --git a/Lib/test/decimaltestdata/normalize.decTest b/Lib/test/decimaltestdata/normalize.decTest
index 6276ab7..5708839 100644
--- a/Lib/test/decimaltestdata/normalize.decTest
+++ b/Lib/test/decimaltestdata/normalize.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
extended: 1
precision: 9
diff --git a/Lib/test/decimaltestdata/plus.decTest b/Lib/test/decimaltestdata/plus.decTest
index f331901..a6d8e58 100644
--- a/Lib/test/decimaltestdata/plus.decTest
+++ b/Lib/test/decimaltestdata/plus.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- This set of tests primarily tests the existence of the operator.
-- Addition and rounding, and most overflows, are tested elsewhere.
diff --git a/Lib/test/decimaltestdata/power.decTest b/Lib/test/decimaltestdata/power.decTest
index d7357e8..748d66a 100644
--- a/Lib/test/decimaltestdata/power.decTest
+++ b/Lib/test/decimaltestdata/power.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- This set of testcases tests raising numbers to an integer power only.
-- If arbitrary powers were supported, 1 ulp differences would be
diff --git a/Lib/test/decimaltestdata/quantize.decTest b/Lib/test/decimaltestdata/quantize.decTest
index 6dd5be4..dc1b130 100644
--- a/Lib/test/decimaltestdata/quantize.decTest
+++ b/Lib/test/decimaltestdata/quantize.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- Most of the tests here assume a "regular pattern", where the
-- sign and coefficient are +1.
diff --git a/Lib/test/decimaltestdata/randomBound32.decTest b/Lib/test/decimaltestdata/randomBound32.decTest
index 94d203e..308589c 100644
--- a/Lib/test/decimaltestdata/randomBound32.decTest
+++ b/Lib/test/decimaltestdata/randomBound32.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- These testcases test calculations at precisions 31, 32, and 33, to
-- exercise the boundaries around 2**5
diff --git a/Lib/test/decimaltestdata/randoms.decTest b/Lib/test/decimaltestdata/randoms.decTest
index bcc7b45..5493f0c 100644
--- a/Lib/test/decimaltestdata/randoms.decTest
+++ b/Lib/test/decimaltestdata/randoms.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
extended: 1
maxexponent: 999999999
diff --git a/Lib/test/decimaltestdata/remainder.decTest b/Lib/test/decimaltestdata/remainder.decTest
index 0975e6e..6eb49c3 100644
--- a/Lib/test/decimaltestdata/remainder.decTest
+++ b/Lib/test/decimaltestdata/remainder.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
extended: 1
precision: 9
diff --git a/Lib/test/decimaltestdata/remainderNear.decTest b/Lib/test/decimaltestdata/remainderNear.decTest
index d7c0a7d..d007bda 100644
--- a/Lib/test/decimaltestdata/remainderNear.decTest
+++ b/Lib/test/decimaltestdata/remainderNear.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
extended: 1
precision: 9
diff --git a/Lib/test/decimaltestdata/rescale.decTest b/Lib/test/decimaltestdata/rescale.decTest
index 41830a7..fd63f0f 100644
--- a/Lib/test/decimaltestdata/rescale.decTest
+++ b/Lib/test/decimaltestdata/rescale.decTest
@@ -1,6 +1,6 @@
------------------------------------------------------------------------
-- rescale.decTest -- decimal rescale operation --
--- Copyright (c) IBM Corporation, 1981, 2003. All rights reserved. --
+-- Copyright (c) IBM Corporation, 1981, 2004. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
@@ -17,10 +17,12 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.35
+version: 2.39
-- [obsolete] Quantize.decTest has the improved version
+-- 2004.03.15 Underflow for quantize is suppressed
+
extended: 1
precision: 9
rounding: half_up
@@ -498,12 +500,12 @@ resx553 rescale 1E-999 -1006 -> NaN Invalid_operation
resx554 rescale 1E-999 -1007 -> NaN Invalid_operation
-- related subnormal rounding
resx555 rescale 1.666666E-999 -1005 -> 1.666666E-999
-resx556 rescale 1.666666E-1000 -1005 -> 1.66667E-1000 Underflow Subnormal Inexact Rounded
-resx557 rescale 1.666666E-1001 -1005 -> 1.6667E-1001 Underflow Subnormal Inexact Rounded
-resx558 rescale 1.666666E-1002 -1005 -> 1.667E-1002 Underflow Subnormal Inexact Rounded
-resx559 rescale 1.666666E-1003 -1005 -> 1.67E-1003 Underflow Subnormal Inexact Rounded
-resx560 rescale 1.666666E-1004 -1005 -> 1.7E-1004 Underflow Subnormal Inexact Rounded
-resx561 rescale 1.666666E-1005 -1005 -> 2E-1005 Underflow Subnormal Inexact Rounded
+resx556 rescale 1.666666E-1000 -1005 -> 1.66667E-1000 Subnormal Inexact Rounded
+resx557 rescale 1.666666E-1001 -1005 -> 1.6667E-1001 Subnormal Inexact Rounded
+resx558 rescale 1.666666E-1002 -1005 -> 1.667E-1002 Subnormal Inexact Rounded
+resx559 rescale 1.666666E-1003 -1005 -> 1.67E-1003 Subnormal Inexact Rounded
+resx560 rescale 1.666666E-1004 -1005 -> 1.7E-1004 Subnormal Inexact Rounded
+resx561 rescale 1.666666E-1005 -1005 -> 2E-1005 Subnormal Inexact Rounded
resx562 rescale 1.666666E-1006 -1005 -> 0E-1005 Inexact Rounded
resx563 rescale 1.666666E-1007 -1005 -> 0E-1005 Inexact Rounded
@@ -626,9 +628,9 @@ resx713 rescale 0.100E-999 -1000 -> 1E-1000 Subnormal Rounded
resx714 rescale 0.01E-999 -1001 -> 1E-1001 Subnormal
-- next is rounded to Emin
resx715 rescale 0.999E-999 -999 -> 1E-999 Inexact Rounded
-resx716 rescale 0.099E-999 -1000 -> 1E-1000 Inexact Rounded Subnormal Underflow
+resx716 rescale 0.099E-999 -1000 -> 1E-1000 Inexact Rounded Subnormal
-resx717 rescale 0.009E-999 -1001 -> 1E-1001 Inexact Rounded Subnormal Underflow
+resx717 rescale 0.009E-999 -1001 -> 1E-1001 Inexact Rounded Subnormal
resx718 rescale 0.001E-999 -1001 -> 0E-1001 Inexact Rounded
resx719 rescale 0.0009E-999 -1001 -> 0E-1001 Inexact Rounded
resx720 rescale 0.0001E-999 -1001 -> 0E-1001 Inexact Rounded
@@ -652,7 +654,7 @@ resx743 rescale -0.100E-999 -1000 -> -1E-1000 Subnormal Rounded
resx744 rescale -0.01E-999 -1000 -> -0E-1000 Inexact Rounded
-- next is rounded to Emin
resx745 rescale -0.999E-999 -1000 -> -1.0E-999 Inexact Rounded
-resx746 rescale -0.099E-999 -1000 -> -1E-1000 Inexact Rounded Subnormal Underflow
+resx746 rescale -0.099E-999 -1000 -> -1E-1000 Inexact Rounded Subnormal
resx747 rescale -0.009E-999 -1000 -> -0E-1000 Inexact Rounded
resx748 rescale -0.001E-999 -1000 -> -0E-1000 Inexact Rounded
resx749 rescale -0.0001E-999 -1000 -> -0E-1000 Inexact Rounded
@@ -664,8 +666,8 @@ resx753 rescale -0.100E-999 -1001 -> -1.0E-1000 Subnormal Rounded
resx754 rescale -0.01E-999 -1001 -> -1E-1001 Subnormal
-- next is rounded to Emin
resx755 rescale -0.999E-999 -1001 -> -1.00E-999 Inexact Rounded
-resx756 rescale -0.099E-999 -1001 -> -1.0E-1000 Inexact Rounded Subnormal Underflow
-resx757 rescale -0.009E-999 -1001 -> -1E-1001 Inexact Rounded Subnormal Underflow
+resx756 rescale -0.099E-999 -1001 -> -1.0E-1000 Inexact Rounded Subnormal
+resx757 rescale -0.009E-999 -1001 -> -1E-1001 Inexact Rounded Subnormal
resx758 rescale -0.001E-999 -1001 -> -0E-1001 Inexact Rounded
resx759 rescale -0.0001E-999 -1001 -> -0E-1001 Inexact Rounded
diff --git a/Lib/test/decimaltestdata/rounding.decTest b/Lib/test/decimaltestdata/rounding.decTest
index 3e279c7..f1437a5 100644
--- a/Lib/test/decimaltestdata/rounding.decTest
+++ b/Lib/test/decimaltestdata/rounding.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- These tests require that implementations take account of residues in
-- order to get correct results for some rounding modes. Rather than
diff --git a/Lib/test/decimaltestdata/samequantum.decTest b/Lib/test/decimaltestdata/samequantum.decTest
index 885c8bc..bdea000 100644
--- a/Lib/test/decimaltestdata/samequantum.decTest
+++ b/Lib/test/decimaltestdata/samequantum.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
extended: 1
precision: 9
diff --git a/Lib/test/decimaltestdata/squareroot.decTest b/Lib/test/decimaltestdata/squareroot.decTest
index c83bd2b..0c83cc7 100644
--- a/Lib/test/decimaltestdata/squareroot.decTest
+++ b/Lib/test/decimaltestdata/squareroot.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
extended: 1
precision: 9
diff --git a/Lib/test/decimaltestdata/subtract.decTest b/Lib/test/decimaltestdata/subtract.decTest
index a156bb8..bdedc5b 100644
--- a/Lib/test/decimaltestdata/subtract.decTest
+++ b/Lib/test/decimaltestdata/subtract.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
extended: 1
precision: 9
diff --git a/Lib/test/decimaltestdata/testall.decTest b/Lib/test/decimaltestdata/testall.decTest
index 74248f4..8daa0d9 100644
--- a/Lib/test/decimaltestdata/testall.decTest
+++ b/Lib/test/decimaltestdata/testall.decTest
@@ -1,6 +1,6 @@
------------------------------------------------------------------------
-- testall.decTest -- run all general decimal arithmetic testcases --
--- Copyright (c) IBM Corporation, 1981, 2003. All rights reserved. --
+-- Copyright (c) IBM Corporation, 1981, 2004. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.35
+version: 2.39
-- core tests (using Extended: 1) --------------------------------------
dectest: base
@@ -54,5 +54,5 @@ dectest: decimal128
-- General 31->33-digit boundary tests
-dectest: randomBound32
+dectest: randombound32
diff --git a/Lib/test/decimaltestdata/tointegral.decTest b/Lib/test/decimaltestdata/tointegral.decTest
index 8ba1e7c..f7174d4 100644
--- a/Lib/test/decimaltestdata/tointegral.decTest
+++ b/Lib/test/decimaltestdata/tointegral.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.38
+version: 2.39
-- This set of tests tests the extended specification 'round-to-integral
-- value' operation (from IEEE 854, later modified in 754r).
diff --git a/Lib/test/decimaltestdata/trim.decTest b/Lib/test/decimaltestdata/trim.decTest
index 35cbd61..5b7e905 100644
--- a/Lib/test/decimaltestdata/trim.decTest
+++ b/Lib/test/decimaltestdata/trim.decTest
@@ -17,7 +17,7 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
-version: 2.35
+version: 2.39
extended: 1
precision: 9