1------------------------------------------------------------------------ 2-- ddCopyAbs.decTest -- quiet decDouble copy and set sign to zero -- 3-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. -- 4------------------------------------------------------------------------ 5-- Please see the document "General Decimal Arithmetic Testcases" -- 6-- at http://www2.hursley.ibm.com/decimal for the description of -- 7-- these testcases. -- 8-- -- 9-- These testcases are experimental ('beta' versions), and they -- 10-- may contain errors. They are offered on an as-is basis. In -- 11-- particular, achieving the same results as the tests here is not -- 12-- a guarantee that an implementation complies with any Standard -- 13-- or specification. The tests are not exhaustive. -- 14-- -- 15-- Please send comments, suggestions, and corrections to the author: -- 16-- Mike Cowlishaw, IBM Fellow -- 17-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK -- 18-- mfc@uk.ibm.com -- 19------------------------------------------------------------------------ 20version: 2.59 21 22-- All operands and results are decDoubles. 23precision: 16 24maxExponent: 384 25minExponent: -383 26extended: 1 27clamp: 1 28rounding: half_even 29 30-- Sanity check 31ddcpa001 copyabs +7.50 -> 7.50 32 33-- Infinities 34ddcpa011 copyabs Infinity -> Infinity 35ddcpa012 copyabs -Infinity -> Infinity 36 37-- NaNs, 0 payload 38ddcpa021 copyabs NaN -> NaN 39ddcpa022 copyabs -NaN -> NaN 40ddcpa023 copyabs sNaN -> sNaN 41ddcpa024 copyabs -sNaN -> sNaN 42 43-- NaNs, non-0 payload 44ddcpa031 copyabs NaN10 -> NaN10 45ddcpa032 copyabs -NaN15 -> NaN15 46ddcpa033 copyabs sNaN15 -> sNaN15 47ddcpa034 copyabs -sNaN10 -> sNaN10 48ddcpa035 copyabs NaN7 -> NaN7 49ddcpa036 copyabs -NaN7 -> NaN7 50ddcpa037 copyabs sNaN101 -> sNaN101 51ddcpa038 copyabs -sNaN101 -> sNaN101 52 53-- finites 54ddcpa101 copyabs 7 -> 7 55ddcpa102 copyabs -7 -> 7 56ddcpa103 copyabs 75 -> 75 57ddcpa104 copyabs -75 -> 75 58ddcpa105 copyabs 7.10 -> 7.10 59ddcpa106 copyabs -7.10 -> 7.10 60ddcpa107 copyabs 7.500 -> 7.500 61ddcpa108 copyabs -7.500 -> 7.500 62 63-- zeros 64ddcpa111 copyabs 0 -> 0 65ddcpa112 copyabs -0 -> 0 66ddcpa113 copyabs 0E+6 -> 0E+6 67ddcpa114 copyabs -0E+6 -> 0E+6 68ddcpa115 copyabs 0.0000 -> 0.0000 69ddcpa116 copyabs -0.0000 -> 0.0000 70ddcpa117 copyabs 0E-141 -> 0E-141 71ddcpa118 copyabs -0E-141 -> 0E-141 72 73-- full coefficients, alternating bits 74ddcpa121 copyabs 2682682682682682 -> 2682682682682682 75ddcpa122 copyabs -2682682682682682 -> 2682682682682682 76ddcpa123 copyabs 1341341341341341 -> 1341341341341341 77ddcpa124 copyabs -1341341341341341 -> 1341341341341341 78 79-- Nmax, Nmin, Ntiny 80ddcpa131 copyabs 9.999999999999999E+384 -> 9.999999999999999E+384 81ddcpa132 copyabs 1E-383 -> 1E-383 82ddcpa133 copyabs 1.000000000000000E-383 -> 1.000000000000000E-383 83ddcpa134 copyabs 1E-398 -> 1E-398 84 85ddcpa135 copyabs -1E-398 -> 1E-398 86ddcpa136 copyabs -1.000000000000000E-383 -> 1.000000000000000E-383 87ddcpa137 copyabs -1E-383 -> 1E-383 88ddcpa138 copyabs -9.999999999999999E+384 -> 9.999999999999999E+384 89