1------------------------------------------------------------------------ 2-- dqCopyAbs.decTest -- quiet decQuad 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 decQuads. 23extended: 1 24clamp: 1 25precision: 34 26maxExponent: 6144 27minExponent: -6143 28rounding: half_even 29 30-- Sanity check 31dqcpa001 copyabs +7.50 -> 7.50 32 33-- Infinities 34dqcpa011 copyabs Infinity -> Infinity 35dqcpa012 copyabs -Infinity -> Infinity 36 37-- NaNs, 0 payload 38dqcpa021 copyabs NaN -> NaN 39dqcpa022 copyabs -NaN -> NaN 40dqcpa023 copyabs sNaN -> sNaN 41dqcpa024 copyabs -sNaN -> sNaN 42 43-- NaNs, non-0 payload 44dqcpa031 copyabs NaN10 -> NaN10 45dqcpa032 copyabs -NaN15 -> NaN15 46dqcpa033 copyabs sNaN15 -> sNaN15 47dqcpa034 copyabs -sNaN10 -> sNaN10 48dqcpa035 copyabs NaN7 -> NaN7 49dqcpa036 copyabs -NaN7 -> NaN7 50dqcpa037 copyabs sNaN101 -> sNaN101 51dqcpa038 copyabs -sNaN101 -> sNaN101 52 53-- finites 54dqcpa101 copyabs 7 -> 7 55dqcpa102 copyabs -7 -> 7 56dqcpa103 copyabs 75 -> 75 57dqcpa104 copyabs -75 -> 75 58dqcpa105 copyabs 7.10 -> 7.10 59dqcpa106 copyabs -7.10 -> 7.10 60dqcpa107 copyabs 7.500 -> 7.500 61dqcpa108 copyabs -7.500 -> 7.500 62 63-- zeros 64dqcpa111 copyabs 0 -> 0 65dqcpa112 copyabs -0 -> 0 66dqcpa113 copyabs 0E+6 -> 0E+6 67dqcpa114 copyabs -0E+6 -> 0E+6 68dqcpa115 copyabs 0.0000 -> 0.0000 69dqcpa116 copyabs -0.0000 -> 0.0000 70dqcpa117 copyabs 0E-141 -> 0E-141 71dqcpa118 copyabs -0E-141 -> 0E-141 72 73-- full coefficients, alternating bits 74dqcpa121 copyabs 2682682682682682682682682682682682 -> 2682682682682682682682682682682682 75dqcpa122 copyabs -2682682682682682682682682682682682 -> 2682682682682682682682682682682682 76dqcpa123 copyabs 1341341341341341341341341341341341 -> 1341341341341341341341341341341341 77dqcpa124 copyabs -1341341341341341341341341341341341 -> 1341341341341341341341341341341341 78 79-- Nmax, Nmin, Ntiny 80dqcpa131 copyabs 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144 81dqcpa132 copyabs 1E-6143 -> 1E-6143 82dqcpa133 copyabs 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143 83dqcpa134 copyabs 1E-6176 -> 1E-6176 84 85dqcpa135 copyabs -1E-6176 -> 1E-6176 86dqcpa136 copyabs -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143 87dqcpa137 copyabs -1E-6143 -> 1E-6143 88dqcpa138 copyabs -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144 89