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