1 | ------------------------------------------------------------------------
|
---|
2 | -- nexttoward.decTest -- decimal next toward rhs [754r nextafter] --
|
---|
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: 384
|
---|
26 | minexponent: -383
|
---|
27 |
|
---|
28 | -- Sanity check with a scattering of numerics
|
---|
29 | nextt001 nexttoward 10 10 -> 10
|
---|
30 | nextt002 nexttoward -10 -10 -> -10
|
---|
31 | nextt003 nexttoward 1 10 -> 1.00000001
|
---|
32 | nextt004 nexttoward 1 -10 -> 0.999999999
|
---|
33 | nextt005 nexttoward -1 10 -> -0.999999999
|
---|
34 | nextt006 nexttoward -1 -10 -> -1.00000001
|
---|
35 | nextt007 nexttoward 0 10 -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
36 | nextt008 nexttoward 0 -10 -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
37 | nextt009 nexttoward 9.99999999E+384 +Infinity -> Infinity Overflow Inexact Rounded
|
---|
38 | nextt010 nexttoward -9.99999999E+384 -Infinity -> -Infinity Overflow Inexact Rounded
|
---|
39 |
|
---|
40 | ------- lhs=rhs
|
---|
41 | -- finites
|
---|
42 | nextt101 nexttoward 7 7 -> 7
|
---|
43 | nextt102 nexttoward -7 -7 -> -7
|
---|
44 | nextt103 nexttoward 75 75 -> 75
|
---|
45 | nextt104 nexttoward -75 -75 -> -75
|
---|
46 | nextt105 nexttoward 7.50 7.5 -> 7.50
|
---|
47 | nextt106 nexttoward -7.50 -7.50 -> -7.50
|
---|
48 | nextt107 nexttoward 7.500 7.5000 -> 7.500
|
---|
49 | nextt108 nexttoward -7.500 -7.5 -> -7.500
|
---|
50 |
|
---|
51 | -- zeros
|
---|
52 | nextt111 nexttoward 0 0 -> 0
|
---|
53 | nextt112 nexttoward -0 -0 -> -0
|
---|
54 | nextt113 nexttoward 0E+4 0 -> 0E+4
|
---|
55 | nextt114 nexttoward -0E+4 -0 -> -0E+4
|
---|
56 | nextt115 nexttoward 0.0000 0.00000 -> 0.0000
|
---|
57 | nextt116 nexttoward -0.0000 -0.00 -> -0.0000
|
---|
58 | nextt117 nexttoward 0E-141 0 -> 0E-141
|
---|
59 | nextt118 nexttoward -0E-141 -000 -> -0E-141
|
---|
60 |
|
---|
61 | -- full coefficients, alternating bits
|
---|
62 | nextt121 nexttoward 268268268 268268268 -> 268268268
|
---|
63 | nextt122 nexttoward -268268268 -268268268 -> -268268268
|
---|
64 | nextt123 nexttoward 134134134 134134134 -> 134134134
|
---|
65 | nextt124 nexttoward -134134134 -134134134 -> -134134134
|
---|
66 |
|
---|
67 | -- Nmax, Nmin, Ntiny
|
---|
68 | nextt131 nexttoward 9.99999999E+384 9.99999999E+384 -> 9.99999999E+384
|
---|
69 | nextt132 nexttoward 1E-383 1E-383 -> 1E-383
|
---|
70 | nextt133 nexttoward 1.00000000E-383 1.00000000E-383 -> 1.00000000E-383
|
---|
71 | nextt134 nexttoward 1E-391 1E-391 -> 1E-391
|
---|
72 |
|
---|
73 | nextt135 nexttoward -1E-391 -1E-391 -> -1E-391
|
---|
74 | nextt136 nexttoward -1.00000000E-383 -1.00000000E-383 -> -1.00000000E-383
|
---|
75 | nextt137 nexttoward -1E-383 -1E-383 -> -1E-383
|
---|
76 | nextt138 nexttoward -9.99999999E+384 -9.99999999E+384 -> -9.99999999E+384
|
---|
77 |
|
---|
78 | ------- lhs<rhs
|
---|
79 | nextt201 nexttoward 0.999999995 Infinity -> 0.999999996
|
---|
80 | nextt202 nexttoward 0.999999996 Infinity -> 0.999999997
|
---|
81 | nextt203 nexttoward 0.999999997 Infinity -> 0.999999998
|
---|
82 | nextt204 nexttoward 0.999999998 Infinity -> 0.999999999
|
---|
83 | nextt205 nexttoward 0.999999999 Infinity -> 1.00000000
|
---|
84 | nextt206 nexttoward 1.00000000 Infinity -> 1.00000001
|
---|
85 | nextt207 nexttoward 1.0 Infinity -> 1.00000001
|
---|
86 | nextt208 nexttoward 1 Infinity -> 1.00000001
|
---|
87 | nextt209 nexttoward 1.00000001 Infinity -> 1.00000002
|
---|
88 | nextt210 nexttoward 1.00000002 Infinity -> 1.00000003
|
---|
89 | nextt211 nexttoward 1.00000003 Infinity -> 1.00000004
|
---|
90 | nextt212 nexttoward 1.00000004 Infinity -> 1.00000005
|
---|
91 | nextt213 nexttoward 1.00000005 Infinity -> 1.00000006
|
---|
92 | nextt214 nexttoward 1.00000006 Infinity -> 1.00000007
|
---|
93 | nextt215 nexttoward 1.00000007 Infinity -> 1.00000008
|
---|
94 | nextt216 nexttoward 1.00000008 Infinity -> 1.00000009
|
---|
95 | nextt217 nexttoward 1.00000009 Infinity -> 1.00000010
|
---|
96 | nextt218 nexttoward 1.00000010 Infinity -> 1.00000011
|
---|
97 | nextt219 nexttoward 1.00000011 Infinity -> 1.00000012
|
---|
98 |
|
---|
99 | nextt221 nexttoward -0.999999995 Infinity -> -0.999999994
|
---|
100 | nextt222 nexttoward -0.999999996 Infinity -> -0.999999995
|
---|
101 | nextt223 nexttoward -0.999999997 Infinity -> -0.999999996
|
---|
102 | nextt224 nexttoward -0.999999998 Infinity -> -0.999999997
|
---|
103 | nextt225 nexttoward -0.999999999 Infinity -> -0.999999998
|
---|
104 | nextt226 nexttoward -1.00000000 Infinity -> -0.999999999
|
---|
105 | nextt227 nexttoward -1.0 Infinity -> -0.999999999
|
---|
106 | nextt228 nexttoward -1 Infinity -> -0.999999999
|
---|
107 | nextt229 nexttoward -1.00000001 Infinity -> -1.00000000
|
---|
108 | nextt230 nexttoward -1.00000002 Infinity -> -1.00000001
|
---|
109 | nextt231 nexttoward -1.00000003 Infinity -> -1.00000002
|
---|
110 | nextt232 nexttoward -1.00000004 Infinity -> -1.00000003
|
---|
111 | nextt233 nexttoward -1.00000005 Infinity -> -1.00000004
|
---|
112 | nextt234 nexttoward -1.00000006 Infinity -> -1.00000005
|
---|
113 | nextt235 nexttoward -1.00000007 Infinity -> -1.00000006
|
---|
114 | nextt236 nexttoward -1.00000008 Infinity -> -1.00000007
|
---|
115 | nextt237 nexttoward -1.00000009 Infinity -> -1.00000008
|
---|
116 | nextt238 nexttoward -1.00000010 Infinity -> -1.00000009
|
---|
117 | nextt239 nexttoward -1.00000011 Infinity -> -1.00000010
|
---|
118 | nextt240 nexttoward -1.00000012 Infinity -> -1.00000011
|
---|
119 |
|
---|
120 | -- input operand is >precision
|
---|
121 | nextt241 nexttoward 1.00000010998 Infinity -> 1.00000011
|
---|
122 | nextt242 nexttoward 1.00000010999 Infinity -> 1.00000011
|
---|
123 | nextt243 nexttoward 1.00000011000 Infinity -> 1.00000012
|
---|
124 | nextt244 nexttoward 1.00000011001 Infinity -> 1.00000012
|
---|
125 | nextt245 nexttoward 1.00000011002 Infinity -> 1.00000012
|
---|
126 | nextt246 nexttoward 1.00000011002 Infinity -> 1.00000012
|
---|
127 | nextt247 nexttoward 1.00000011052 Infinity -> 1.00000012
|
---|
128 | nextt248 nexttoward 1.00000011552 Infinity -> 1.00000012
|
---|
129 | nextt249 nexttoward -1.00000010998 Infinity -> -1.00000010
|
---|
130 | nextt250 nexttoward -1.00000010999 Infinity -> -1.00000010
|
---|
131 | nextt251 nexttoward -1.00000011000 Infinity -> -1.00000010
|
---|
132 | nextt252 nexttoward -1.00000011001 Infinity -> -1.00000011
|
---|
133 | nextt253 nexttoward -1.00000011002 Infinity -> -1.00000011
|
---|
134 | nextt254 nexttoward -1.00000011002 Infinity -> -1.00000011
|
---|
135 | nextt255 nexttoward -1.00000011052 Infinity -> -1.00000011
|
---|
136 | nextt256 nexttoward -1.00000011552 Infinity -> -1.00000011
|
---|
137 | -- ultra-tiny inputs
|
---|
138 | nextt260 nexttoward 1E-99999 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
139 | nextt261 nexttoward 1E-999999999 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
140 | nextt262 nexttoward 1E-391 Infinity -> 2E-391 Underflow Subnormal Inexact Rounded
|
---|
141 | nextt263 nexttoward -1E-99999 Infinity -> -0E-391 Underflow Subnormal Inexact Rounded Clamped
|
---|
142 | nextt264 nexttoward -1E-999999999 Infinity -> -0E-391 Underflow Subnormal Inexact Rounded Clamped
|
---|
143 | nextt265 nexttoward -1E-391 Infinity -> -0E-391 Underflow Subnormal Inexact Rounded Clamped
|
---|
144 |
|
---|
145 | -- Zeros
|
---|
146 | nextt300 nexttoward 0 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
147 | nextt301 nexttoward 0.00 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
148 | nextt302 nexttoward 0E-300 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
149 | nextt303 nexttoward 0E+300 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
150 | nextt304 nexttoward 0E+30000 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
151 | nextt305 nexttoward -0 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
152 | nextt306 nexttoward -0.00 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
153 | nextt307 nexttoward -0E-300 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
154 | nextt308 nexttoward -0E+300 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
155 | nextt309 nexttoward -0E+30000 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
156 |
|
---|
157 | -- specials
|
---|
158 | nextt350 nexttoward Inf Infinity -> Infinity
|
---|
159 | nextt351 nexttoward -Inf Infinity -> -9.99999999E+384
|
---|
160 | nextt352 nexttoward NaN Infinity -> NaN
|
---|
161 | nextt353 nexttoward sNaN Infinity -> NaN Invalid_operation
|
---|
162 | nextt354 nexttoward NaN77 Infinity -> NaN77
|
---|
163 | nextt355 nexttoward sNaN88 Infinity -> NaN88 Invalid_operation
|
---|
164 | nextt356 nexttoward -NaN Infinity -> -NaN
|
---|
165 | nextt357 nexttoward -sNaN Infinity -> -NaN Invalid_operation
|
---|
166 | nextt358 nexttoward -NaN77 Infinity -> -NaN77
|
---|
167 | nextt359 nexttoward -sNaN88 Infinity -> -NaN88 Invalid_operation
|
---|
168 |
|
---|
169 | -- Nmax, Nmin, Ntiny, subnormals
|
---|
170 | maxExponent: 999
|
---|
171 | minexponent: -999
|
---|
172 | nextt370 nexttoward 9.99999999E+999 Infinity -> Infinity Overflow Inexact Rounded
|
---|
173 | nextt371 nexttoward 9.99999998E+999 Infinity -> 9.99999999E+999
|
---|
174 | nextt372 nexttoward 1E-999 Infinity -> 1.00000001E-999
|
---|
175 | nextt373 nexttoward 1.00000000E-999 Infinity -> 1.00000001E-999
|
---|
176 | nextt374 nexttoward 0.999999999E-999 Infinity -> 1.00000000E-999
|
---|
177 | nextt375 nexttoward 0.99999999E-999 Infinity -> 1.00000000E-999
|
---|
178 | nextt376 nexttoward 9E-1007 Infinity -> 1.0E-1006 Underflow Subnormal Inexact Rounded
|
---|
179 | nextt377 nexttoward 9.9E-1006 Infinity -> 1.00E-1005 Underflow Subnormal Inexact Rounded
|
---|
180 | nextt378 nexttoward 9.9999E-1003 Infinity -> 1.00000E-1002 Underflow Subnormal Inexact Rounded
|
---|
181 | nextt379 nexttoward 9.9999998E-1000 Infinity -> 9.9999999E-1000 Underflow Subnormal Inexact Rounded
|
---|
182 | nextt380 nexttoward 9.9999997E-1000 Infinity -> 9.9999998E-1000 Underflow Subnormal Inexact Rounded
|
---|
183 | nextt381 nexttoward 0E-1007 Infinity -> 1E-1007 Underflow Subnormal Inexact Rounded
|
---|
184 | nextt382 nexttoward 1E-1007 Infinity -> 2E-1007 Underflow Subnormal Inexact Rounded
|
---|
185 | nextt383 nexttoward 2E-1007 Infinity -> 3E-1007 Underflow Subnormal Inexact Rounded
|
---|
186 |
|
---|
187 | nextt385 nexttoward -0E-1007 Infinity -> 1E-1007 Underflow Subnormal Inexact Rounded
|
---|
188 | nextt386 nexttoward -1E-1007 Infinity -> -0E-1007 Underflow Subnormal Inexact Rounded Clamped
|
---|
189 | nextt387 nexttoward -2E-1007 Infinity -> -1E-1007 Underflow Subnormal Inexact Rounded
|
---|
190 | nextt388 nexttoward -10E-1007 Infinity -> -9E-1007 Underflow Subnormal Inexact Rounded
|
---|
191 | nextt389 nexttoward -100E-1007 Infinity -> -9.9E-1006 Underflow Subnormal Inexact Rounded
|
---|
192 | nextt390 nexttoward -100000E-1007 Infinity -> -9.9999E-1003 Underflow Subnormal Inexact Rounded
|
---|
193 | nextt391 nexttoward -1.0000E-999 Infinity -> -9.9999999E-1000 Underflow Subnormal Inexact Rounded
|
---|
194 | nextt392 nexttoward -1.00000000E-999 Infinity -> -9.9999999E-1000 Underflow Subnormal Inexact Rounded
|
---|
195 | nextt393 nexttoward -1E-999 Infinity -> -9.9999999E-1000 Underflow Subnormal Inexact Rounded
|
---|
196 | nextt394 nexttoward -9.99999998E+999 Infinity -> -9.99999997E+999
|
---|
197 | nextt395 nexttoward -9.99999999E+999 Infinity -> -9.99999998E+999
|
---|
198 |
|
---|
199 | ------- lhs>rhs
|
---|
200 | maxExponent: 384
|
---|
201 | minexponent: -383
|
---|
202 | nextt401 nexttoward 0.999999995 -Infinity -> 0.999999994
|
---|
203 | nextt402 nexttoward 0.999999996 -Infinity -> 0.999999995
|
---|
204 | nextt403 nexttoward 0.999999997 -Infinity -> 0.999999996
|
---|
205 | nextt404 nexttoward 0.999999998 -Infinity -> 0.999999997
|
---|
206 | nextt405 nexttoward 0.999999999 -Infinity -> 0.999999998
|
---|
207 | nextt406 nexttoward 1.00000000 -Infinity -> 0.999999999
|
---|
208 | nextt407 nexttoward 1.0 -Infinity -> 0.999999999
|
---|
209 | nextt408 nexttoward 1 -Infinity -> 0.999999999
|
---|
210 | nextt409 nexttoward 1.00000001 -Infinity -> 1.00000000
|
---|
211 | nextt410 nexttoward 1.00000002 -Infinity -> 1.00000001
|
---|
212 | nextt411 nexttoward 1.00000003 -Infinity -> 1.00000002
|
---|
213 | nextt412 nexttoward 1.00000004 -Infinity -> 1.00000003
|
---|
214 | nextt413 nexttoward 1.00000005 -Infinity -> 1.00000004
|
---|
215 | nextt414 nexttoward 1.00000006 -Infinity -> 1.00000005
|
---|
216 | nextt415 nexttoward 1.00000007 -Infinity -> 1.00000006
|
---|
217 | nextt416 nexttoward 1.00000008 -Infinity -> 1.00000007
|
---|
218 | nextt417 nexttoward 1.00000009 -Infinity -> 1.00000008
|
---|
219 | nextt418 nexttoward 1.00000010 -Infinity -> 1.00000009
|
---|
220 | nextt419 nexttoward 1.00000011 -Infinity -> 1.00000010
|
---|
221 | nextt420 nexttoward 1.00000012 -Infinity -> 1.00000011
|
---|
222 |
|
---|
223 | nextt421 nexttoward -0.999999995 -Infinity -> -0.999999996
|
---|
224 | nextt422 nexttoward -0.999999996 -Infinity -> -0.999999997
|
---|
225 | nextt423 nexttoward -0.999999997 -Infinity -> -0.999999998
|
---|
226 | nextt424 nexttoward -0.999999998 -Infinity -> -0.999999999
|
---|
227 | nextt425 nexttoward -0.999999999 -Infinity -> -1.00000000
|
---|
228 | nextt426 nexttoward -1.00000000 -Infinity -> -1.00000001
|
---|
229 | nextt427 nexttoward -1.0 -Infinity -> -1.00000001
|
---|
230 | nextt428 nexttoward -1 -Infinity -> -1.00000001
|
---|
231 | nextt429 nexttoward -1.00000001 -Infinity -> -1.00000002
|
---|
232 | nextt430 nexttoward -1.00000002 -Infinity -> -1.00000003
|
---|
233 | nextt431 nexttoward -1.00000003 -Infinity -> -1.00000004
|
---|
234 | nextt432 nexttoward -1.00000004 -Infinity -> -1.00000005
|
---|
235 | nextt433 nexttoward -1.00000005 -Infinity -> -1.00000006
|
---|
236 | nextt434 nexttoward -1.00000006 -Infinity -> -1.00000007
|
---|
237 | nextt435 nexttoward -1.00000007 -Infinity -> -1.00000008
|
---|
238 | nextt436 nexttoward -1.00000008 -Infinity -> -1.00000009
|
---|
239 | nextt437 nexttoward -1.00000009 -Infinity -> -1.00000010
|
---|
240 | nextt438 nexttoward -1.00000010 -Infinity -> -1.00000011
|
---|
241 | nextt439 nexttoward -1.00000011 -Infinity -> -1.00000012
|
---|
242 |
|
---|
243 | -- input operand is >precision
|
---|
244 | nextt441 nexttoward 1.00000010998 -Infinity -> 1.00000010
|
---|
245 | nextt442 nexttoward 1.00000010999 -Infinity -> 1.00000010
|
---|
246 | nextt443 nexttoward 1.00000011000 -Infinity -> 1.00000010
|
---|
247 | nextt444 nexttoward 1.00000011001 -Infinity -> 1.00000011
|
---|
248 | nextt445 nexttoward 1.00000011002 -Infinity -> 1.00000011
|
---|
249 | nextt446 nexttoward 1.00000011002 -Infinity -> 1.00000011
|
---|
250 | nextt447 nexttoward 1.00000011052 -Infinity -> 1.00000011
|
---|
251 | nextt448 nexttoward 1.00000011552 -Infinity -> 1.00000011
|
---|
252 | nextt449 nexttoward -1.00000010998 -Infinity -> -1.00000011
|
---|
253 | nextt450 nexttoward -1.00000010999 -Infinity -> -1.00000011
|
---|
254 | nextt451 nexttoward -1.00000011000 -Infinity -> -1.00000012
|
---|
255 | nextt452 nexttoward -1.00000011001 -Infinity -> -1.00000012
|
---|
256 | nextt453 nexttoward -1.00000011002 -Infinity -> -1.00000012
|
---|
257 | nextt454 nexttoward -1.00000011002 -Infinity -> -1.00000012
|
---|
258 | nextt455 nexttoward -1.00000011052 -Infinity -> -1.00000012
|
---|
259 | nextt456 nexttoward -1.00000011552 -Infinity -> -1.00000012
|
---|
260 | -- ultra-tiny inputs
|
---|
261 | nextt460 nexttoward 1E-99999 -Infinity -> 0E-391 Underflow Subnormal Inexact Rounded Clamped
|
---|
262 | nextt461 nexttoward 1E-999999999 -Infinity -> 0E-391 Underflow Subnormal Inexact Rounded Clamped
|
---|
263 | nextt462 nexttoward 1E-391 -Infinity -> 0E-391 Underflow Subnormal Inexact Rounded Clamped
|
---|
264 | nextt463 nexttoward -1E-99999 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
265 | nextt464 nexttoward -1E-999999999 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
266 | nextt465 nexttoward -1E-391 -Infinity -> -2E-391 Underflow Subnormal Inexact Rounded
|
---|
267 |
|
---|
268 | -- Zeros
|
---|
269 | nextt500 nexttoward -0 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
270 | nextt501 nexttoward 0 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
271 | nextt502 nexttoward 0.00 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
272 | nextt503 nexttoward -0.00 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
273 | nextt504 nexttoward 0E-300 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
274 | nextt505 nexttoward 0E+300 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
275 | nextt506 nexttoward 0E+30000 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
276 | nextt507 nexttoward -0E+30000 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
277 | nextt508 nexttoward 0.00 -0.0000 -> -0.00
|
---|
278 |
|
---|
279 | -- specials
|
---|
280 | nextt550 nexttoward Inf -Infinity -> 9.99999999E+384
|
---|
281 | nextt551 nexttoward -Inf -Infinity -> -Infinity
|
---|
282 | nextt552 nexttoward NaN -Infinity -> NaN
|
---|
283 | nextt553 nexttoward sNaN -Infinity -> NaN Invalid_operation
|
---|
284 | nextt554 nexttoward NaN77 -Infinity -> NaN77
|
---|
285 | nextt555 nexttoward sNaN88 -Infinity -> NaN88 Invalid_operation
|
---|
286 | nextt556 nexttoward -NaN -Infinity -> -NaN
|
---|
287 | nextt557 nexttoward -sNaN -Infinity -> -NaN Invalid_operation
|
---|
288 | nextt558 nexttoward -NaN77 -Infinity -> -NaN77
|
---|
289 | nextt559 nexttoward -sNaN88 -Infinity -> -NaN88 Invalid_operation
|
---|
290 |
|
---|
291 | -- Nmax, Nmin, Ntiny, subnormals
|
---|
292 | maxExponent: 999
|
---|
293 | minexponent: -999
|
---|
294 | nextt570 nexttoward 9.99999999E+999 -Infinity -> 9.99999998E+999
|
---|
295 | nextt571 nexttoward 9.99999998E+999 -Infinity -> 9.99999997E+999
|
---|
296 | nextt572 nexttoward 1E-999 -Infinity -> 9.9999999E-1000 Underflow Subnormal Inexact Rounded
|
---|
297 | nextt573 nexttoward 1.00000000E-999 -Infinity -> 9.9999999E-1000 Underflow Subnormal Inexact Rounded
|
---|
298 | nextt574 nexttoward 9E-1007 -Infinity -> 8E-1007 Underflow Subnormal Inexact Rounded
|
---|
299 | nextt575 nexttoward 9.9E-1006 -Infinity -> 9.8E-1006 Underflow Subnormal Inexact Rounded
|
---|
300 | nextt576 nexttoward 9.9999E-1003 -Infinity -> 9.9998E-1003 Underflow Subnormal Inexact Rounded
|
---|
301 | nextt577 nexttoward 9.9999999E-1000 -Infinity -> 9.9999998E-1000 Underflow Subnormal Inexact Rounded
|
---|
302 | nextt578 nexttoward 9.9999998E-1000 -Infinity -> 9.9999997E-1000 Underflow Subnormal Inexact Rounded
|
---|
303 | nextt579 nexttoward 9.9999997E-1000 -Infinity -> 9.9999996E-1000 Underflow Subnormal Inexact Rounded
|
---|
304 | nextt580 nexttoward 0E-1007 -Infinity -> -1E-1007 Underflow Subnormal Inexact Rounded
|
---|
305 | nextt581 nexttoward 1E-1007 -Infinity -> 0E-1007 Underflow Subnormal Inexact Rounded Clamped
|
---|
306 | nextt582 nexttoward 2E-1007 -Infinity -> 1E-1007 Underflow Subnormal Inexact Rounded
|
---|
307 |
|
---|
308 | nextt583 nexttoward -0E-1007 -Infinity -> -1E-1007 Underflow Subnormal Inexact Rounded
|
---|
309 | nextt584 nexttoward -1E-1007 -Infinity -> -2E-1007 Underflow Subnormal Inexact Rounded
|
---|
310 | nextt585 nexttoward -2E-1007 -Infinity -> -3E-1007 Underflow Subnormal Inexact Rounded
|
---|
311 | nextt586 nexttoward -10E-1007 -Infinity -> -1.1E-1006 Underflow Subnormal Inexact Rounded
|
---|
312 | nextt587 nexttoward -100E-1007 -Infinity -> -1.01E-1005 Underflow Subnormal Inexact Rounded
|
---|
313 | nextt588 nexttoward -100000E-1007 -Infinity -> -1.00001E-1002 Underflow Subnormal Inexact Rounded
|
---|
314 | nextt589 nexttoward -1.0000E-999 -Infinity -> -1.00000001E-999
|
---|
315 | nextt590 nexttoward -1.00000000E-999 -Infinity -> -1.00000001E-999
|
---|
316 | nextt591 nexttoward -1E-999 -Infinity -> -1.00000001E-999
|
---|
317 | nextt592 nexttoward -9.99999998E+999 -Infinity -> -9.99999999E+999
|
---|
318 | nextt593 nexttoward -9.99999999E+999 -Infinity -> -Infinity Overflow Inexact Rounded
|
---|
319 |
|
---|
320 |
|
---|
321 |
|
---|
322 |
|
---|
323 | ------- Specials
|
---|
324 | maxExponent: 384
|
---|
325 | minexponent: -383
|
---|
326 | nextt780 nexttoward -Inf -Inf -> -Infinity
|
---|
327 | nextt781 nexttoward -Inf -1000 -> -9.99999999E+384
|
---|
328 | nextt782 nexttoward -Inf -1 -> -9.99999999E+384
|
---|
329 | nextt783 nexttoward -Inf -0 -> -9.99999999E+384
|
---|
330 | nextt784 nexttoward -Inf 0 -> -9.99999999E+384
|
---|
331 | nextt785 nexttoward -Inf 1 -> -9.99999999E+384
|
---|
332 | nextt786 nexttoward -Inf 1000 -> -9.99999999E+384
|
---|
333 | nextt787 nexttoward -1000 -Inf -> -1000.00001
|
---|
334 | nextt788 nexttoward -Inf -Inf -> -Infinity
|
---|
335 | nextt789 nexttoward -1 -Inf -> -1.00000001
|
---|
336 | nextt790 nexttoward -0 -Inf -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
337 | nextt791 nexttoward 0 -Inf -> -1E-391 Underflow Subnormal Inexact Rounded
|
---|
338 | nextt792 nexttoward 1 -Inf -> 0.999999999
|
---|
339 | nextt793 nexttoward 1000 -Inf -> 999.999999
|
---|
340 | nextt794 nexttoward Inf -Inf -> 9.99999999E+384
|
---|
341 |
|
---|
342 | nextt800 nexttoward Inf -Inf -> 9.99999999E+384
|
---|
343 | nextt801 nexttoward Inf -1000 -> 9.99999999E+384
|
---|
344 | nextt802 nexttoward Inf -1 -> 9.99999999E+384
|
---|
345 | nextt803 nexttoward Inf -0 -> 9.99999999E+384
|
---|
346 | nextt804 nexttoward Inf 0 -> 9.99999999E+384
|
---|
347 | nextt805 nexttoward Inf 1 -> 9.99999999E+384
|
---|
348 | nextt806 nexttoward Inf 1000 -> 9.99999999E+384
|
---|
349 | nextt807 nexttoward Inf Inf -> Infinity
|
---|
350 | nextt808 nexttoward -1000 Inf -> -999.999999
|
---|
351 | nextt809 nexttoward -Inf Inf -> -9.99999999E+384
|
---|
352 | nextt810 nexttoward -1 Inf -> -0.999999999
|
---|
353 | nextt811 nexttoward -0 Inf -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
354 | nextt812 nexttoward 0 Inf -> 1E-391 Underflow Subnormal Inexact Rounded
|
---|
355 | nextt813 nexttoward 1 Inf -> 1.00000001
|
---|
356 | nextt814 nexttoward 1000 Inf -> 1000.00001
|
---|
357 | nextt815 nexttoward Inf Inf -> Infinity
|
---|
358 |
|
---|
359 | nextt821 nexttoward NaN -Inf -> NaN
|
---|
360 | nextt822 nexttoward NaN -1000 -> NaN
|
---|
361 | nextt823 nexttoward NaN -1 -> NaN
|
---|
362 | nextt824 nexttoward NaN -0 -> NaN
|
---|
363 | nextt825 nexttoward NaN 0 -> NaN
|
---|
364 | nextt826 nexttoward NaN 1 -> NaN
|
---|
365 | nextt827 nexttoward NaN 1000 -> NaN
|
---|
366 | nextt828 nexttoward NaN Inf -> NaN
|
---|
367 | nextt829 nexttoward NaN NaN -> NaN
|
---|
368 | nextt830 nexttoward -Inf NaN -> NaN
|
---|
369 | nextt831 nexttoward -1000 NaN -> NaN
|
---|
370 | nextt832 nexttoward -1 NaN -> NaN
|
---|
371 | nextt833 nexttoward -0 NaN -> NaN
|
---|
372 | nextt834 nexttoward 0 NaN -> NaN
|
---|
373 | nextt835 nexttoward 1 NaN -> NaN
|
---|
374 | nextt836 nexttoward 1000 NaN -> NaN
|
---|
375 | nextt837 nexttoward Inf NaN -> NaN
|
---|
376 |
|
---|
377 | nextt841 nexttoward sNaN -Inf -> NaN Invalid_operation
|
---|
378 | nextt842 nexttoward sNaN -1000 -> NaN Invalid_operation
|
---|
379 | nextt843 nexttoward sNaN -1 -> NaN Invalid_operation
|
---|
380 | nextt844 nexttoward sNaN -0 -> NaN Invalid_operation
|
---|
381 | nextt845 nexttoward sNaN 0 -> NaN Invalid_operation
|
---|
382 | nextt846 nexttoward sNaN 1 -> NaN Invalid_operation
|
---|
383 | nextt847 nexttoward sNaN 1000 -> NaN Invalid_operation
|
---|
384 | nextt848 nexttoward sNaN NaN -> NaN Invalid_operation
|
---|
385 | nextt849 nexttoward sNaN sNaN -> NaN Invalid_operation
|
---|
386 | nextt850 nexttoward NaN sNaN -> NaN Invalid_operation
|
---|
387 | nextt851 nexttoward -Inf sNaN -> NaN Invalid_operation
|
---|
388 | nextt852 nexttoward -1000 sNaN -> NaN Invalid_operation
|
---|
389 | nextt853 nexttoward -1 sNaN -> NaN Invalid_operation
|
---|
390 | nextt854 nexttoward -0 sNaN -> NaN Invalid_operation
|
---|
391 | nextt855 nexttoward 0 sNaN -> NaN Invalid_operation
|
---|
392 | nextt856 nexttoward 1 sNaN -> NaN Invalid_operation
|
---|
393 | nextt857 nexttoward 1000 sNaN -> NaN Invalid_operation
|
---|
394 | nextt858 nexttoward Inf sNaN -> NaN Invalid_operation
|
---|
395 | nextt859 nexttoward NaN sNaN -> NaN Invalid_operation
|
---|
396 |
|
---|
397 | -- propagating NaNs
|
---|
398 | nextt861 nexttoward NaN1 -Inf -> NaN1
|
---|
399 | nextt862 nexttoward +NaN2 -1000 -> NaN2
|
---|
400 | nextt863 nexttoward NaN3 1000 -> NaN3
|
---|
401 | nextt864 nexttoward NaN4 Inf -> NaN4
|
---|
402 | nextt865 nexttoward NaN5 +NaN6 -> NaN5
|
---|
403 | nextt866 nexttoward -Inf NaN7 -> NaN7
|
---|
404 | nextt867 nexttoward -1000 NaN8 -> NaN8
|
---|
405 | nextt868 nexttoward 1000 NaN9 -> NaN9
|
---|
406 | nextt869 nexttoward Inf +NaN10 -> NaN10
|
---|
407 | nextt871 nexttoward sNaN11 -Inf -> NaN11 Invalid_operation
|
---|
408 | nextt872 nexttoward sNaN12 -1000 -> NaN12 Invalid_operation
|
---|
409 | nextt873 nexttoward sNaN13 1000 -> NaN13 Invalid_operation
|
---|
410 | nextt874 nexttoward sNaN14 NaN17 -> NaN14 Invalid_operation
|
---|
411 | nextt875 nexttoward sNaN15 sNaN18 -> NaN15 Invalid_operation
|
---|
412 | nextt876 nexttoward NaN16 sNaN19 -> NaN19 Invalid_operation
|
---|
413 | nextt877 nexttoward -Inf +sNaN20 -> NaN20 Invalid_operation
|
---|
414 | nextt878 nexttoward -1000 sNaN21 -> NaN21 Invalid_operation
|
---|
415 | nextt879 nexttoward 1000 sNaN22 -> NaN22 Invalid_operation
|
---|
416 | nextt880 nexttoward Inf sNaN23 -> NaN23 Invalid_operation
|
---|
417 | nextt881 nexttoward +NaN25 +sNaN24 -> NaN24 Invalid_operation
|
---|
418 | nextt882 nexttoward -NaN26 NaN28 -> -NaN26
|
---|
419 | nextt883 nexttoward -sNaN27 sNaN29 -> -NaN27 Invalid_operation
|
---|
420 | nextt884 nexttoward 1000 -NaN30 -> -NaN30
|
---|
421 | nextt885 nexttoward 1000 -sNaN31 -> -NaN31 Invalid_operation
|
---|
422 |
|
---|
423 | -- Null tests
|
---|
424 | nextt900 nexttoward 1 # -> NaN Invalid_operation
|
---|
425 | nextt901 nexttoward # 1 -> NaN Invalid_operation
|
---|
426 |
|
---|