| 1 | ------------------------------------------------------------------------
|
|---|
| 2 | -- dqCopyNegate.decTest -- quiet decQuad 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@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 | dqcpn001 copynegate +7.50 -> -7.50
|
|---|
| 32 |
|
|---|
| 33 | -- Infinities
|
|---|
| 34 | dqcpn011 copynegate Infinity -> -Infinity
|
|---|
| 35 | dqcpn012 copynegate -Infinity -> Infinity
|
|---|
| 36 |
|
|---|
| 37 | -- NaNs, 0 payload
|
|---|
| 38 | dqcpn021 copynegate NaN -> -NaN
|
|---|
| 39 | dqcpn022 copynegate -NaN -> NaN
|
|---|
| 40 | dqcpn023 copynegate sNaN -> -sNaN
|
|---|
| 41 | dqcpn024 copynegate -sNaN -> sNaN
|
|---|
| 42 |
|
|---|
| 43 | -- NaNs, non-0 payload
|
|---|
| 44 | dqcpn031 copynegate NaN13 -> -NaN13
|
|---|
| 45 | dqcpn032 copynegate -NaN13 -> NaN13
|
|---|
| 46 | dqcpn033 copynegate sNaN13 -> -sNaN13
|
|---|
| 47 | dqcpn034 copynegate -sNaN13 -> sNaN13
|
|---|
| 48 | dqcpn035 copynegate NaN70 -> -NaN70
|
|---|
| 49 | dqcpn036 copynegate -NaN70 -> NaN70
|
|---|
| 50 | dqcpn037 copynegate sNaN101 -> -sNaN101
|
|---|
| 51 | dqcpn038 copynegate -sNaN101 -> sNaN101
|
|---|
| 52 |
|
|---|
| 53 | -- finites
|
|---|
| 54 | dqcpn101 copynegate 7 -> -7
|
|---|
| 55 | dqcpn102 copynegate -7 -> 7
|
|---|
| 56 | dqcpn103 copynegate 75 -> -75
|
|---|
| 57 | dqcpn104 copynegate -75 -> 75
|
|---|
| 58 | dqcpn105 copynegate 7.50 -> -7.50
|
|---|
| 59 | dqcpn106 copynegate -7.50 -> 7.50
|
|---|
| 60 | dqcpn107 copynegate 7.500 -> -7.500
|
|---|
| 61 | dqcpn108 copynegate -7.500 -> 7.500
|
|---|
| 62 |
|
|---|
| 63 | -- zeros
|
|---|
| 64 | dqcpn111 copynegate 0 -> -0
|
|---|
| 65 | dqcpn112 copynegate -0 -> 0
|
|---|
| 66 | dqcpn113 copynegate 0E+4 -> -0E+4
|
|---|
| 67 | dqcpn114 copynegate -0E+4 -> 0E+4
|
|---|
| 68 | dqcpn115 copynegate 0.0000 -> -0.0000
|
|---|
| 69 | dqcpn116 copynegate -0.0000 -> 0.0000
|
|---|
| 70 | dqcpn117 copynegate 0E-141 -> -0E-141
|
|---|
| 71 | dqcpn118 copynegate -0E-141 -> 0E-141
|
|---|
| 72 |
|
|---|
| 73 | -- full coefficients, alternating bits
|
|---|
| 74 | dqcpn121 copynegate 2682682682682682682682682682682682 -> -2682682682682682682682682682682682
|
|---|
| 75 | dqcpn122 copynegate -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
|
|---|
| 76 | dqcpn123 copynegate 1341341341341341341341341341341341 -> -1341341341341341341341341341341341
|
|---|
| 77 | dqcpn124 copynegate -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
|
|---|
| 78 |
|
|---|
| 79 | -- Nmax, Nmin, Ntiny
|
|---|
| 80 | dqcpn131 copynegate 9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
|
|---|
| 81 | dqcpn132 copynegate 1E-6143 -> -1E-6143
|
|---|
| 82 | dqcpn133 copynegate 1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
|
|---|
| 83 | dqcpn134 copynegate 1E-6176 -> -1E-6176
|
|---|
| 84 |
|
|---|
| 85 | dqcpn135 copynegate -1E-6176 -> 1E-6176
|
|---|
| 86 | dqcpn136 copynegate -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
|
|---|
| 87 | dqcpn137 copynegate -1E-6143 -> 1E-6143
|
|---|
| 88 | dqcpn138 copynegate -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
|
|---|