Commit 353750c4 authored by Facundo Batista's avatar Facundo Batista

Merged the decimal-branch (revisions 54886 to 58140). Decimal is now

fully updated to the latests Decimal Specification (v1.66) and the
latests test cases (v2.56).

Thanks to Mark Dickinson for all his help during this process.
parent ddca9f08
This source diff could not be displayed because it is too large. You can view the blob instead.
------------------------------------------------------------------------
-- abs.decTest -- decimal absolute value --
-- Copyright (c) IBM Corporation, 1981, 2004. All rights reserved. --
-- Copyright (c) IBM Corporation, 1981, 2007. 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.39
version: 2.56
-- This set of tests primarily tests the existence of the operator.
-- Additon, subtraction, rounding, and more overflows are tested
......@@ -106,9 +106,9 @@ absx214 abs 0.01E-999 -> 1E-1001 Subnormal
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
absx219 abs 0.0009E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow
absx220 abs 0.0001E-999 -> 0E-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
......@@ -119,9 +119,9 @@ absx234 abs -0.01E-999 -> 1E-1001 Subnormal
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
absx239 abs -0.0009E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow
absx240 abs -0.0001E-999 -> 0E-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
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
------------------------------------------------------------------------
-- clamp.decTest -- clamped exponent tests (format-independent) --
-- Copyright (c) IBM Corporation, 2000, 2003. All rights reserved. --
-- Copyright (c) IBM Corporation, 2000, 2007. 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.39
version: 2.56
-- This set of tests uses the same limits as the 8-byte concrete
-- representation, but applies clamping without using format-specific
......@@ -73,10 +73,10 @@ clam092 apply 1.1e-398 -> #0000000000000001 Subnormal Underflo
clam093 apply 1.00000000001e-398 -> #0000000000000001 Subnormal Underflow Inexact Rounded
clam094 apply 1.00000000000001e-398 -> #0000000000000001 Subnormal Underflow Inexact Rounded
clam095 apply 1.000000000000001e-398 -> #0000000000000001 Subnormal Underflow Inexact Rounded
clam096 apply 0.1e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded
clam097 apply 0.00000000001e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded
clam098 apply 0.00000000000001e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded
clam099 apply 0.000000000000001e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded
clam096 apply 0.1e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded Clamped
clam097 apply 0.00000000001e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded Clamped
clam098 apply 0.00000000000001e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded Clamped
clam099 apply 0.000000000000001e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded Clamped
-- Same again, negatives
-- Nmax and similar
......@@ -112,10 +112,10 @@ clam192 apply -1.1e-398 -> #8000000000000001 Subnormal Underflo
clam193 apply -1.00000000001e-398 -> #8000000000000001 Subnormal Underflow Inexact Rounded
clam194 apply -1.00000000000001e-398 -> #8000000000000001 Subnormal Underflow Inexact Rounded
clam195 apply -1.000000000000001e-398 -> #8000000000000001 Subnormal Underflow Inexact Rounded
clam196 apply -0.1e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded
clam197 apply -0.00000000001e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded
clam198 apply -0.00000000000001e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded
clam199 apply -0.000000000000001e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded
clam196 apply -0.1e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded Clamped
clam197 apply -0.00000000001e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded Clamped
clam198 apply -0.00000000000001e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded Clamped
clam199 apply -0.000000000000001e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded Clamped
-- zeros
clam401 apply 0E-500 -> 0E-398 Clamped
......@@ -184,6 +184,20 @@ clam669 apply 9E+370 -> 9.0E+370 Clamped
clam671 apply 9E+369 -> 9E+369
clam673 apply 9E+368 -> 9E+368
-- subnormals clamped to 0-Etiny
precision: 16
maxExponent: 384
minExponent: -383
clam681 apply 7E-398 -> 7E-398 Subnormal
clam682 apply 0E-398 -> 0E-398
clam683 apply 7E-399 -> 1E-398 Subnormal Underflow Inexact Rounded
clam684 apply 4E-399 -> 0E-398 Clamped Subnormal Underflow Inexact Rounded
clam685 apply 7E-400 -> 0E-398 Clamped Subnormal Underflow Inexact Rounded
clam686 apply 7E-401 -> 0E-398 Clamped Subnormal Underflow Inexact Rounded
clam687 apply 0E-399 -> 0E-398 Clamped
clam688 apply 0E-400 -> 0E-398 Clamped
clam689 apply 0E-401 -> 0E-398 Clamped
-- example from documentation
precision: 7
rounding: half_even
......
------------------------------------------------------------------------
-- class.decTest -- Class operations --
-- Copyright (c) IBM Corporation, 1981, 2007. 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.56
-- [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
------------------------------------------------------------------------
-- compare.decTest -- decimal comparison --
-- Copyright (c) IBM Corporation, 1981, 2003. All rights reserved. --
-- compare.decTest -- decimal comparison that allows quiet NaNs --
-- Copyright (c) IBM Corporation, 1981, 2007. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
......@@ -17,11 +17,11 @@
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.39
version: 2.56
-- 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 necesary).
-- overflow or underflow, so actual subtractions are not necessary).
extended: 1
......@@ -112,10 +112,10 @@ comx086 compare 2.0 2.0 -> 0
-- now some cases which might overflow if subtract were used
maxexponent: 999999999
minexponent: -999999999
comx090 compare 9.99999999E+999999999 9.99999999E+999999999 -> 0
comx091 compare -9.99999999E+999999999 9.99999999E+999999999 -> -1
comx092 compare 9.99999999E+999999999 -9.99999999E+999999999 -> 1
comx093 compare -9.99999999E+999999999 -9.99999999E+999999999 -> 0
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
......@@ -265,6 +265,21 @@ 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
......@@ -362,7 +377,7 @@ 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 an useful coefficient, one side only
-- 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
......@@ -712,6 +727,32 @@ 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
This diff is collapsed.
This diff is collapsed.
------------------------------------------------------------------------
-- copy.decTest -- quiet copy --
-- Copyright (c) IBM Corporation, 1981, 2007. 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.56
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
------------------------------------------------------------------------
-- copyAbs.decTest -- quiet copy and set sign to zero --
-- Copyright (c) IBM Corporation, 1981, 2007. 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.56
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
------------------------------------------------------------------------
-- copyNegate.decTest -- quiet copy and negate --
-- Copyright (c) IBM Corporation, 1981, 2007. 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.56
extended: 1
precision: 9
rounding: half_up
maxExponent: 999
minExponent: -999
-- Sanity check
cpnx001 copynegate +7.50 -> -7.50
-- Infinities
cpnx011 copynegate Infinity -> -Infinity
cpnx012 copynegate -Infinity -> Infinity
-- NaNs, 0 payload
cpnx021 copynegate NaN -> -NaN
cpnx022 copynegate -NaN -> NaN
cpnx023 copynegate sNaN -> -sNaN
cpnx024 copynegate -sNaN -> sNaN
-- NaNs, non-0 payload
cpnx031 copynegate NaN13 -> -NaN13
cpnx032 copynegate -NaN13 -> NaN13
cpnx033 copynegate sNaN13 -> -sNaN13
cpnx034 copynegate -sNaN13 -> sNaN13
cpnx035 copynegate NaN70 -> -NaN70
cpnx036 copynegate -NaN70 -> NaN70
cpnx037 copynegate sNaN101 -> -sNaN101
cpnx038 copynegate -sNaN101 -> sNaN101
-- finites
cpnx101 copynegate 7 -> -7
cpnx102 copynegate -7 -> 7
cpnx103 copynegate 75 -> -75
cpnx104 copynegate -75 -> 75
cpnx105 copynegate 7.50 -> -7.50
cpnx106 copynegate -7.50 -> 7.50
cpnx107 copynegate 7.500 -> -7.500
cpnx108 copynegate -7.500 -> 7.500
-- zeros
cpnx111 copynegate 0 -> -0
cpnx112 copynegate -0 -> 0
cpnx113 copynegate 0E+4 -> -0E+4
cpnx114 copynegate -0E+4 -> 0E+4
cpnx115 copynegate 0.0000 -> -0.0000
cpnx116 copynegate -0.0000 -> 0.0000
cpnx117 copynegate 0E-141 -> -0E-141
cpnx118 copynegate -0E-141 -> 0E-141
-- full coefficients, alternating bits
cpnx121 copynegate 268268268 -> -268268268
cpnx122 copynegate -268268268 -> 268268268
cpnx123 copynegate 134134134 -> -134134134
cpnx124 copynegate -134134134 -> 134134134
-- Nmax, Nmin, Ntiny
cpnx131 copynegate 9.99999999E+999 -> -9.99999999E+999
cpnx132 copynegate 1E-999 -> -1E-999
cpnx133 copynegate 1.00000000E-999 -> -1.00000000E-999
cpnx134 copynegate 1E-1007 -> -1E-1007
cpnx135 copynegate -1E-1007 -> 1E-1007
cpnx136 copynegate -1.00000000E-999 -> 1.00000000E-999
cpnx137 copynegate -1E-999 -> 1E-999
cpnx138 copynegate -9.99999999E+999 -> 9.99999999E+999
------------------------------------------------------------------------
-- copysign.decTest -- quiet copy with sign from rhs --
-- Copyright (c) IBM Corporation, 1981, 2007. 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.56
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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
------------------------------------------------------------------------
-- decDouble.decTest -- run all decDouble decimal arithmetic tests --
-- Copyright (c) IBM Corporation, 1981, 2007. 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.56
-- 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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment