1 ------------------------------------------------------------------------ 2 -- ddCopyNegate.decTest -- quiet decDouble copy and negate -- 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 ddcpn001 copynegate +7.50 -> -7.50 32 33 -- Infinities 34 ddcpn011 copynegate Infinity -> -Infinity 35 ddcpn012 copynegate -Infinity -> Infinity 36 37 -- NaNs, 0 payload 38 ddcpn021 copynegate NaN -> -NaN 39 ddcpn022 copynegate -NaN -> NaN 40 ddcpn023 copynegate sNaN -> -sNaN 41 ddcpn024 copynegate -sNaN -> sNaN 42 43 -- NaNs, non-0 payload 44 ddcpn031 copynegate NaN13 -> -NaN13 45 ddcpn032 copynegate -NaN13 -> NaN13 46 ddcpn033 copynegate sNaN13 -> -sNaN13 47 ddcpn034 copynegate -sNaN13 -> sNaN13 48 ddcpn035 copynegate NaN70 -> -NaN70 49 ddcpn036 copynegate -NaN70 -> NaN70 50 ddcpn037 copynegate sNaN101 -> -sNaN101 51 ddcpn038 copynegate -sNaN101 -> sNaN101 52 53 -- finites 54 ddcpn101 copynegate 7 -> -7 55 ddcpn102 copynegate -7 -> 7 56 ddcpn103 copynegate 75 -> -75 57 ddcpn104 copynegate -75 -> 75 58 ddcpn105 copynegate 7.50 -> -7.50 59 ddcpn106 copynegate -7.50 -> 7.50 60 ddcpn107 copynegate 7.500 -> -7.500 61 ddcpn108 copynegate -7.500 -> 7.500 62 63 -- zeros 64 ddcpn111 copynegate 0 -> -0 65 ddcpn112 copynegate -0 -> 0 66 ddcpn113 copynegate 0E+4 -> -0E+4 67 ddcpn114 copynegate -0E+4 -> 0E+4 68 ddcpn115 copynegate 0.0000 -> -0.0000 69 ddcpn116 copynegate -0.0000 -> 0.0000 70 ddcpn117 copynegate 0E-141 -> -0E-141 71 ddcpn118 copynegate -0E-141 -> 0E-141 72 73 -- full coefficients, alternating bits 74 ddcpn121 copynegate 2682682682682682 -> -2682682682682682 75 ddcpn122 copynegate -2682682682682682 -> 2682682682682682 76 ddcpn123 copynegate 1341341341341341 -> -1341341341341341 77 ddcpn124 copynegate -1341341341341341 -> 1341341341341341 78 79 -- Nmax, Nmin, Ntiny 80 ddcpn131 copynegate 9.999999999999999E+384 -> -9.999999999999999E+384 81 ddcpn132 copynegate 1E-383 -> -1E-383 82 ddcpn133 copynegate 1.000000000000000E-383 -> -1.000000000000000E-383 83 ddcpn134 copynegate 1E-398 -> -1E-398 84 85 ddcpn135 copynegate -1E-398 -> 1E-398 86 ddcpn136 copynegate -1.000000000000000E-383 -> 1.000000000000000E-383 87 ddcpn137 copynegate -1E-383 -> 1E-383 88 ddcpn138 copynegate -9.999999999999999E+384 -> 9.999999999999999E+384 89