|
1 ------------------------------------------------------------------------ |
|
2 -- nextminus.decTest -- decimal next that is less [754r nextdown] -- |
|
3 -- Copyright (c) IBM Corporation, 1981, 2007. 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.57 |
|
21 |
|
22 extended: 1 |
|
23 precision: 9 |
|
24 rounding: half_up |
|
25 maxExponent: 384 |
|
26 minexponent: -383 |
|
27 |
|
28 nextm001 nextminus 0.999999995 -> 0.999999994 |
|
29 nextm002 nextminus 0.999999996 -> 0.999999995 |
|
30 nextm003 nextminus 0.999999997 -> 0.999999996 |
|
31 nextm004 nextminus 0.999999998 -> 0.999999997 |
|
32 nextm005 nextminus 0.999999999 -> 0.999999998 |
|
33 nextm006 nextminus 1.00000000 -> 0.999999999 |
|
34 nextm007 nextminus 1.0 -> 0.999999999 |
|
35 nextm008 nextminus 1 -> 0.999999999 |
|
36 nextm009 nextminus 1.00000001 -> 1.00000000 |
|
37 nextm010 nextminus 1.00000002 -> 1.00000001 |
|
38 nextm011 nextminus 1.00000003 -> 1.00000002 |
|
39 nextm012 nextminus 1.00000004 -> 1.00000003 |
|
40 nextm013 nextminus 1.00000005 -> 1.00000004 |
|
41 nextm014 nextminus 1.00000006 -> 1.00000005 |
|
42 nextm015 nextminus 1.00000007 -> 1.00000006 |
|
43 nextm016 nextminus 1.00000008 -> 1.00000007 |
|
44 nextm017 nextminus 1.00000009 -> 1.00000008 |
|
45 nextm018 nextminus 1.00000010 -> 1.00000009 |
|
46 nextm019 nextminus 1.00000011 -> 1.00000010 |
|
47 nextm020 nextminus 1.00000012 -> 1.00000011 |
|
48 |
|
49 nextm021 nextminus -0.999999995 -> -0.999999996 |
|
50 nextm022 nextminus -0.999999996 -> -0.999999997 |
|
51 nextm023 nextminus -0.999999997 -> -0.999999998 |
|
52 nextm024 nextminus -0.999999998 -> -0.999999999 |
|
53 nextm025 nextminus -0.999999999 -> -1.00000000 |
|
54 nextm026 nextminus -1.00000000 -> -1.00000001 |
|
55 nextm027 nextminus -1.0 -> -1.00000001 |
|
56 nextm028 nextminus -1 -> -1.00000001 |
|
57 nextm029 nextminus -1.00000001 -> -1.00000002 |
|
58 nextm030 nextminus -1.00000002 -> -1.00000003 |
|
59 nextm031 nextminus -1.00000003 -> -1.00000004 |
|
60 nextm032 nextminus -1.00000004 -> -1.00000005 |
|
61 nextm033 nextminus -1.00000005 -> -1.00000006 |
|
62 nextm034 nextminus -1.00000006 -> -1.00000007 |
|
63 nextm035 nextminus -1.00000007 -> -1.00000008 |
|
64 nextm036 nextminus -1.00000008 -> -1.00000009 |
|
65 nextm037 nextminus -1.00000009 -> -1.00000010 |
|
66 nextm038 nextminus -1.00000010 -> -1.00000011 |
|
67 nextm039 nextminus -1.00000011 -> -1.00000012 |
|
68 |
|
69 -- input operand is >precision |
|
70 nextm041 nextminus 1.00000010998 -> 1.00000010 |
|
71 nextm042 nextminus 1.00000010999 -> 1.00000010 |
|
72 nextm043 nextminus 1.00000011000 -> 1.00000010 |
|
73 nextm044 nextminus 1.00000011001 -> 1.00000011 |
|
74 nextm045 nextminus 1.00000011002 -> 1.00000011 |
|
75 nextm046 nextminus 1.00000011002 -> 1.00000011 |
|
76 nextm047 nextminus 1.00000011052 -> 1.00000011 |
|
77 nextm048 nextminus 1.00000011552 -> 1.00000011 |
|
78 nextm049 nextminus -1.00000010998 -> -1.00000011 |
|
79 nextm050 nextminus -1.00000010999 -> -1.00000011 |
|
80 nextm051 nextminus -1.00000011000 -> -1.00000012 |
|
81 nextm052 nextminus -1.00000011001 -> -1.00000012 |
|
82 nextm053 nextminus -1.00000011002 -> -1.00000012 |
|
83 nextm054 nextminus -1.00000011002 -> -1.00000012 |
|
84 nextm055 nextminus -1.00000011052 -> -1.00000012 |
|
85 nextm056 nextminus -1.00000011552 -> -1.00000012 |
|
86 -- ultra-tiny inputs |
|
87 nextm060 nextminus 1E-99999 -> 0E-391 |
|
88 nextm061 nextminus 1E-999999999 -> 0E-391 |
|
89 nextm062 nextminus 1E-391 -> 0E-391 |
|
90 nextm063 nextminus -1E-99999 -> -1E-391 |
|
91 nextm064 nextminus -1E-999999999 -> -1E-391 |
|
92 nextm065 nextminus -1E-391 -> -2E-391 |
|
93 |
|
94 -- Zeros |
|
95 nextm100 nextminus -0 -> -1E-391 |
|
96 nextm101 nextminus 0 -> -1E-391 |
|
97 nextm102 nextminus 0.00 -> -1E-391 |
|
98 nextm103 nextminus -0.00 -> -1E-391 |
|
99 nextm104 nextminus 0E-300 -> -1E-391 |
|
100 nextm105 nextminus 0E+300 -> -1E-391 |
|
101 nextm106 nextminus 0E+30000 -> -1E-391 |
|
102 nextm107 nextminus -0E+30000 -> -1E-391 |
|
103 |
|
104 precision: 9 |
|
105 maxExponent: 999 |
|
106 minexponent: -999 |
|
107 -- specials |
|
108 nextm150 nextminus Inf -> 9.99999999E+999 |
|
109 nextm151 nextminus -Inf -> -Infinity |
|
110 nextm152 nextminus NaN -> NaN |
|
111 nextm153 nextminus sNaN -> NaN Invalid_operation |
|
112 nextm154 nextminus NaN77 -> NaN77 |
|
113 nextm155 nextminus sNaN88 -> NaN88 Invalid_operation |
|
114 nextm156 nextminus -NaN -> -NaN |
|
115 nextm157 nextminus -sNaN -> -NaN Invalid_operation |
|
116 nextm158 nextminus -NaN77 -> -NaN77 |
|
117 nextm159 nextminus -sNaN88 -> -NaN88 Invalid_operation |
|
118 |
|
119 -- Nmax, Nmin, Ntiny, subnormals |
|
120 nextm170 nextminus 9.99999999E+999 -> 9.99999998E+999 |
|
121 nextm171 nextminus 9.99999998E+999 -> 9.99999997E+999 |
|
122 nextm172 nextminus 1E-999 -> 9.9999999E-1000 |
|
123 nextm173 nextminus 1.00000000E-999 -> 9.9999999E-1000 |
|
124 nextm174 nextminus 9E-1007 -> 8E-1007 |
|
125 nextm175 nextminus 9.9E-1006 -> 9.8E-1006 |
|
126 nextm176 nextminus 9.9999E-1003 -> 9.9998E-1003 |
|
127 nextm177 nextminus 9.9999999E-1000 -> 9.9999998E-1000 |
|
128 nextm178 nextminus 9.9999998E-1000 -> 9.9999997E-1000 |
|
129 nextm179 nextminus 9.9999997E-1000 -> 9.9999996E-1000 |
|
130 nextm180 nextminus 0E-1007 -> -1E-1007 |
|
131 nextm181 nextminus 1E-1007 -> 0E-1007 |
|
132 nextm182 nextminus 2E-1007 -> 1E-1007 |
|
133 |
|
134 nextm183 nextminus -0E-1007 -> -1E-1007 |
|
135 nextm184 nextminus -1E-1007 -> -2E-1007 |
|
136 nextm185 nextminus -2E-1007 -> -3E-1007 |
|
137 nextm186 nextminus -10E-1007 -> -1.1E-1006 |
|
138 nextm187 nextminus -100E-1007 -> -1.01E-1005 |
|
139 nextm188 nextminus -100000E-1007 -> -1.00001E-1002 |
|
140 nextm189 nextminus -1.0000E-999 -> -1.00000001E-999 |
|
141 nextm190 nextminus -1.00000000E-999 -> -1.00000001E-999 |
|
142 nextm191 nextminus -1E-999 -> -1.00000001E-999 |
|
143 nextm192 nextminus -9.99999998E+999 -> -9.99999999E+999 |
|
144 nextm193 nextminus -9.99999999E+999 -> -Infinity |
|
145 |
|
146 -- Null tests |
|
147 nextm900 nextminus # -> NaN Invalid_operation |
|
148 |