1 | ------------------------------------------------------------------------
|
---|
2 | -- copyNegate.decTest -- quiet 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 | extended: 1
|
---|
23 | precision: 9
|
---|
24 | rounding: half_up
|
---|
25 | maxExponent: 999
|
---|
26 | minExponent: -999
|
---|
27 |
|
---|
28 | -- Sanity check
|
---|
29 | cpnx001 copynegate +7.50 -> -7.50
|
---|
30 |
|
---|
31 | -- Infinities
|
---|
32 | cpnx011 copynegate Infinity -> -Infinity
|
---|
33 | cpnx012 copynegate -Infinity -> Infinity
|
---|
34 |
|
---|
35 | -- NaNs, 0 payload
|
---|
36 | cpnx021 copynegate NaN -> -NaN
|
---|
37 | cpnx022 copynegate -NaN -> NaN
|
---|
38 | cpnx023 copynegate sNaN -> -sNaN
|
---|
39 | cpnx024 copynegate -sNaN -> sNaN
|
---|
40 |
|
---|
41 | -- NaNs, non-0 payload
|
---|
42 | cpnx031 copynegate NaN13 -> -NaN13
|
---|
43 | cpnx032 copynegate -NaN13 -> NaN13
|
---|
44 | cpnx033 copynegate sNaN13 -> -sNaN13
|
---|
45 | cpnx034 copynegate -sNaN13 -> sNaN13
|
---|
46 | cpnx035 copynegate NaN70 -> -NaN70
|
---|
47 | cpnx036 copynegate -NaN70 -> NaN70
|
---|
48 | cpnx037 copynegate sNaN101 -> -sNaN101
|
---|
49 | cpnx038 copynegate -sNaN101 -> sNaN101
|
---|
50 |
|
---|
51 | -- finites
|
---|
52 | cpnx101 copynegate 7 -> -7
|
---|
53 | cpnx102 copynegate -7 -> 7
|
---|
54 | cpnx103 copynegate 75 -> -75
|
---|
55 | cpnx104 copynegate -75 -> 75
|
---|
56 | cpnx105 copynegate 7.50 -> -7.50
|
---|
57 | cpnx106 copynegate -7.50 -> 7.50
|
---|
58 | cpnx107 copynegate 7.500 -> -7.500
|
---|
59 | cpnx108 copynegate -7.500 -> 7.500
|
---|
60 |
|
---|
61 | -- zeros
|
---|
62 | cpnx111 copynegate 0 -> -0
|
---|
63 | cpnx112 copynegate -0 -> 0
|
---|
64 | cpnx113 copynegate 0E+4 -> -0E+4
|
---|
65 | cpnx114 copynegate -0E+4 -> 0E+4
|
---|
66 | cpnx115 copynegate 0.0000 -> -0.0000
|
---|
67 | cpnx116 copynegate -0.0000 -> 0.0000
|
---|
68 | cpnx117 copynegate 0E-141 -> -0E-141
|
---|
69 | cpnx118 copynegate -0E-141 -> 0E-141
|
---|
70 |
|
---|
71 | -- full coefficients, alternating bits
|
---|
72 | cpnx121 copynegate 268268268 -> -268268268
|
---|
73 | cpnx122 copynegate -268268268 -> 268268268
|
---|
74 | cpnx123 copynegate 134134134 -> -134134134
|
---|
75 | cpnx124 copynegate -134134134 -> 134134134
|
---|
76 |
|
---|
77 | -- Nmax, Nmin, Ntiny
|
---|
78 | cpnx131 copynegate 9.99999999E+999 -> -9.99999999E+999
|
---|
79 | cpnx132 copynegate 1E-999 -> -1E-999
|
---|
80 | cpnx133 copynegate 1.00000000E-999 -> -1.00000000E-999
|
---|
81 | cpnx134 copynegate 1E-1007 -> -1E-1007
|
---|
82 |
|
---|
83 | cpnx135 copynegate -1E-1007 -> 1E-1007
|
---|
84 | cpnx136 copynegate -1.00000000E-999 -> 1.00000000E-999
|
---|
85 | cpnx137 copynegate -1E-999 -> 1E-999
|
---|
86 | cpnx138 copynegate -9.99999999E+999 -> 9.99999999E+999
|
---|