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 (a] uk.ibm.com -- 19 ------------------------------------------------------------------------ 20 version: 2.59 21 22 -- All operands and results are decDoubles. 23 precision: 16 24 maxExponent: 384 25 minExponent: -383 26 extended: 1 27 clamp: 1 28 rounding: half_even 29 30 -- Sanity check 31 ddcpa001 copyabs +7.50 -> 7.50 32 33 -- Infinities 34 ddcpa011 copyabs Infinity -> Infinity 35 ddcpa012 copyabs -Infinity -> Infinity 36 37 -- NaNs, 0 payload 38 ddcpa021 copyabs NaN -> NaN 39 ddcpa022 copyabs -NaN -> NaN 40 ddcpa023 copyabs sNaN -> sNaN 41 ddcpa024 copyabs -sNaN -> sNaN 42 43 -- NaNs, non-0 payload 44 ddcpa031 copyabs NaN10 -> NaN10 45 ddcpa032 copyabs -NaN15 -> NaN15 46 ddcpa033 copyabs sNaN15 -> sNaN15 47 ddcpa034 copyabs -sNaN10 -> sNaN10 48 ddcpa035 copyabs NaN7 -> NaN7 49 ddcpa036 copyabs -NaN7 -> NaN7 50 ddcpa037 copyabs sNaN101 -> sNaN101 51 ddcpa038 copyabs -sNaN101 -> sNaN101 52 53 -- finites 54 ddcpa101 copyabs 7 -> 7 55 ddcpa102 copyabs -7 -> 7 56 ddcpa103 copyabs 75 -> 75 57 ddcpa104 copyabs -75 -> 75 58 ddcpa105 copyabs 7.10 -> 7.10 59 ddcpa106 copyabs -7.10 -> 7.10 60 ddcpa107 copyabs 7.500 -> 7.500 61 ddcpa108 copyabs -7.500 -> 7.500 62 63 -- zeros 64 ddcpa111 copyabs 0 -> 0 65 ddcpa112 copyabs -0 -> 0 66 ddcpa113 copyabs 0E+6 -> 0E+6 67 ddcpa114 copyabs -0E+6 -> 0E+6 68 ddcpa115 copyabs 0.0000 -> 0.0000 69 ddcpa116 copyabs -0.0000 -> 0.0000 70 ddcpa117 copyabs 0E-141 -> 0E-141 71 ddcpa118 copyabs -0E-141 -> 0E-141 72 73 -- full coefficients, alternating bits 74 ddcpa121 copyabs 2682682682682682 -> 2682682682682682 75 ddcpa122 copyabs -2682682682682682 -> 2682682682682682 76 ddcpa123 copyabs 1341341341341341 -> 1341341341341341 77 ddcpa124 copyabs -1341341341341341 -> 1341341341341341 78 79 -- Nmax, Nmin, Ntiny 80 ddcpa131 copyabs 9.999999999999999E+384 -> 9.999999999999999E+384 81 ddcpa132 copyabs 1E-383 -> 1E-383 82 ddcpa133 copyabs 1.000000000000000E-383 -> 1.000000000000000E-383 83 ddcpa134 copyabs 1E-398 -> 1E-398 84 85 ddcpa135 copyabs -1E-398 -> 1E-398 86 ddcpa136 copyabs -1.000000000000000E-383 -> 1.000000000000000E-383 87 ddcpa137 copyabs -1E-383 -> 1E-383 88 ddcpa138 copyabs -9.999999999999999E+384 -> 9.999999999999999E+384 89