1------------------------------------------------------------------------
2-- dqNextToward.decTest -- decQuad 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------------------------------------------------------------------------
20version: 2.59
21
22-- All operands and results are decQuads.
23extended:    1
24clamp:       1
25precision:   34
26maxExponent: 6144
27minExponent: -6143
28rounding:    half_even
29
30
31-- Sanity check with a scattering of numerics
32dqnextt001 nexttoward   10    10   ->  10
33dqnextt002 nexttoward  -10   -10   -> -10
34dqnextt003 nexttoward   1     10   ->  1.000000000000000000000000000000001
35dqnextt004 nexttoward   1    -10   ->  0.9999999999999999999999999999999999
36dqnextt005 nexttoward  -1     10   -> -0.9999999999999999999999999999999999
37dqnextt006 nexttoward  -1    -10   -> -1.000000000000000000000000000000001
38dqnextt007 nexttoward   0     10   ->  1E-6176       Underflow Subnormal Inexact Rounded
39dqnextt008 nexttoward   0    -10   -> -1E-6176       Underflow Subnormal Inexact Rounded
40dqnextt009 nexttoward   9.999999999999999999999999999999999E+6144 +Infinity ->  Infinity Overflow Inexact Rounded
41dqnextt010 nexttoward  -9.999999999999999999999999999999999E+6144 -Infinity -> -Infinity Overflow Inexact Rounded
42dqnextt011 nexttoward       9.999999999999999999999999999999999  10  ->  10.00000000000000000000000000000000
43dqnextt012 nexttoward   10  9.999999999999999999999999999999999      ->  9.999999999999999999999999999999999
44dqnextt013 nexttoward      -9.999999999999999999999999999999999 -10  -> -10.00000000000000000000000000000000
45dqnextt014 nexttoward  -10 -9.999999999999999999999999999999999      -> -9.999999999999999999999999999999999
46dqnextt015 nexttoward       9.999999999999999999999999999999998  10  ->  9.999999999999999999999999999999999
47dqnextt016 nexttoward   10  9.999999999999999999999999999999998      ->  9.999999999999999999999999999999999
48dqnextt017 nexttoward      -9.999999999999999999999999999999998 -10  -> -9.999999999999999999999999999999999
49dqnextt018 nexttoward  -10 -9.999999999999999999999999999999998      -> -9.999999999999999999999999999999999
50
51------- lhs=rhs
52-- finites
53dqnextt101 nexttoward          7       7 ->  7
54dqnextt102 nexttoward         -7      -7 -> -7
55dqnextt103 nexttoward         75      75 ->  75
56dqnextt104 nexttoward        -75     -75 -> -75
57dqnextt105 nexttoward       7.50     7.5 ->  7.50
58dqnextt106 nexttoward      -7.50   -7.50 -> -7.50
59dqnextt107 nexttoward       7.500 7.5000 ->  7.500
60dqnextt108 nexttoward      -7.500   -7.5 -> -7.500
61
62-- zeros
63dqnextt111 nexttoward          0       0 ->  0
64dqnextt112 nexttoward         -0      -0 -> -0
65dqnextt113 nexttoward       0E+4       0 ->  0E+4
66dqnextt114 nexttoward      -0E+4      -0 -> -0E+4
67dqnextt115 nexttoward     0.00000000000   0.000000000000 ->  0E-11
68dqnextt116 nexttoward    -0.00000000000  -0.00           -> -0E-11
69dqnextt117 nexttoward      0E-141      0 ->  0E-141
70dqnextt118 nexttoward     -0E-141   -000 -> -0E-141
71
72-- full coefficients, alternating bits
73dqnextt121 nexttoward   268268268    268268268 ->   268268268
74dqnextt122 nexttoward  -268268268   -268268268 ->  -268268268
75dqnextt123 nexttoward   134134134    134134134 ->   134134134
76dqnextt124 nexttoward  -134134134   -134134134 ->  -134134134
77
78-- Nmax, Nmin, Ntiny
79dqnextt131 nexttoward  9.999999999999999999999999999999999E+6144  9.999999999999999999999999999999999E+6144   ->   9.999999999999999999999999999999999E+6144
80dqnextt132 nexttoward  1E-6143           1E-6143            ->   1E-6143
81dqnextt133 nexttoward  1.000000000000000000000000000000000E-6143  1.000000000000000000000000000000000E-6143   ->   1.000000000000000000000000000000000E-6143
82dqnextt134 nexttoward  1E-6176           1E-6176            ->   1E-6176
83
84dqnextt135 nexttoward  -1E-6176          -1E-6176           ->  -1E-6176
85dqnextt136 nexttoward  -1.000000000000000000000000000000000E-6143 -1.000000000000000000000000000000000E-6143  ->  -1.000000000000000000000000000000000E-6143
86dqnextt137 nexttoward  -1E-6143          -1E-6143           ->  -1E-6143
87dqnextt138 nexttoward  -9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144  ->  -9.999999999999999999999999999999999E+6144
88
89------- lhs<rhs
90dqnextt201 nexttoward  0.9999999999999999999999999999999995 Infinity ->   0.9999999999999999999999999999999996
91dqnextt202 nexttoward  0.9999999999999999999999999999999996 Infinity ->   0.9999999999999999999999999999999997
92dqnextt203 nexttoward  0.9999999999999999999999999999999997 Infinity ->   0.9999999999999999999999999999999998
93dqnextt204 nexttoward  0.9999999999999999999999999999999998 Infinity ->   0.9999999999999999999999999999999999
94dqnextt205 nexttoward  0.9999999999999999999999999999999999 Infinity ->   1.000000000000000000000000000000000
95dqnextt206 nexttoward  1.000000000000000000000000000000000  Infinity ->   1.000000000000000000000000000000001
96dqnextt207 nexttoward  1.0         Infinity ->   1.000000000000000000000000000000001
97dqnextt208 nexttoward  1           Infinity ->   1.000000000000000000000000000000001
98dqnextt209 nexttoward  1.000000000000000000000000000000001  Infinity ->   1.000000000000000000000000000000002
99dqnextt210 nexttoward  1.000000000000000000000000000000002  Infinity ->   1.000000000000000000000000000000003
100dqnextt211 nexttoward  1.000000000000000000000000000000003  Infinity ->   1.000000000000000000000000000000004
101dqnextt212 nexttoward  1.000000000000000000000000000000004  Infinity ->   1.000000000000000000000000000000005
102dqnextt213 nexttoward  1.000000000000000000000000000000005  Infinity ->   1.000000000000000000000000000000006
103dqnextt214 nexttoward  1.000000000000000000000000000000006  Infinity ->   1.000000000000000000000000000000007
104dqnextt215 nexttoward  1.000000000000000000000000000000007  Infinity ->   1.000000000000000000000000000000008
105dqnextt216 nexttoward  1.000000000000000000000000000000008  Infinity ->   1.000000000000000000000000000000009
106dqnextt217 nexttoward  1.000000000000000000000000000000009  Infinity ->   1.000000000000000000000000000000010
107dqnextt218 nexttoward  1.000000000000000000000000000000010  Infinity ->   1.000000000000000000000000000000011
108dqnextt219 nexttoward  1.000000000000000000000000000000011  Infinity ->   1.000000000000000000000000000000012
109
110dqnextt221 nexttoward -0.9999999999999999999999999999999995 Infinity ->  -0.9999999999999999999999999999999994
111dqnextt222 nexttoward -0.9999999999999999999999999999999996 Infinity -> -0.9999999999999999999999999999999995
112dqnextt223 nexttoward -0.9999999999999999999999999999999997 Infinity ->  -0.9999999999999999999999999999999996
113dqnextt224 nexttoward -0.9999999999999999999999999999999998 Infinity ->  -0.9999999999999999999999999999999997
114dqnextt225 nexttoward -0.9999999999999999999999999999999999 Infinity ->  -0.9999999999999999999999999999999998
115dqnextt226 nexttoward -1.000000000000000000000000000000000  Infinity ->  -0.9999999999999999999999999999999999
116dqnextt227 nexttoward -1.0         Infinity ->  -0.9999999999999999999999999999999999
117dqnextt228 nexttoward -1           Infinity ->  -0.9999999999999999999999999999999999
118dqnextt229 nexttoward -1.000000000000000000000000000000001  Infinity ->  -1.000000000000000000000000000000000
119dqnextt230 nexttoward -1.000000000000000000000000000000002  Infinity ->  -1.000000000000000000000000000000001
120dqnextt231 nexttoward -1.000000000000000000000000000000003  Infinity ->  -1.000000000000000000000000000000002
121dqnextt232 nexttoward -1.000000000000000000000000000000004  Infinity ->  -1.000000000000000000000000000000003
122dqnextt233 nexttoward -1.000000000000000000000000000000005  Infinity ->  -1.000000000000000000000000000000004
123dqnextt234 nexttoward -1.000000000000000000000000000000006  Infinity ->  -1.000000000000000000000000000000005
124dqnextt235 nexttoward -1.000000000000000000000000000000007  Infinity ->  -1.000000000000000000000000000000006
125dqnextt236 nexttoward -1.000000000000000000000000000000008  Infinity ->  -1.000000000000000000000000000000007
126dqnextt237 nexttoward -1.000000000000000000000000000000009  Infinity ->  -1.000000000000000000000000000000008
127dqnextt238 nexttoward -1.000000000000000000000000000000010  Infinity ->  -1.000000000000000000000000000000009
128dqnextt239 nexttoward -1.000000000000000000000000000000011  Infinity ->  -1.000000000000000000000000000000010
129dqnextt240 nexttoward -1.000000000000000000000000000000012  Infinity ->  -1.000000000000000000000000000000011
130
131-- Zeros
132dqnextt300 nexttoward  0           Infinity ->  1E-6176              Underflow Subnormal Inexact Rounded
133dqnextt301 nexttoward  0.00        Infinity ->  1E-6176              Underflow Subnormal Inexact Rounded
134dqnextt302 nexttoward  0E-300      Infinity ->  1E-6176              Underflow Subnormal Inexact Rounded
135dqnextt303 nexttoward  0E+300      Infinity ->  1E-6176              Underflow Subnormal Inexact Rounded
136dqnextt304 nexttoward  0E+30000    Infinity ->  1E-6176              Underflow Subnormal Inexact Rounded
137dqnextt305 nexttoward -0           Infinity ->  1E-6176              Underflow Subnormal Inexact Rounded
138dqnextt306 nexttoward -0.00        Infinity ->  1E-6176              Underflow Subnormal Inexact Rounded
139dqnextt307 nexttoward -0E-300      Infinity ->  1E-6176              Underflow Subnormal Inexact Rounded
140dqnextt308 nexttoward -0E+300      Infinity ->  1E-6176              Underflow Subnormal Inexact Rounded
141dqnextt309 nexttoward -0E+30000    Infinity ->  1E-6176              Underflow Subnormal Inexact Rounded
142
143-- specials
144dqnextt350 nexttoward   Inf    Infinity ->  Infinity
145dqnextt351 nexttoward  -Inf    Infinity -> -9.999999999999999999999999999999999E+6144
146dqnextt352 nexttoward   NaN    Infinity ->  NaN
147dqnextt353 nexttoward  sNaN    Infinity ->  NaN   Invalid_operation
148dqnextt354 nexttoward   NaN77  Infinity ->  NaN77
149dqnextt355 nexttoward  sNaN88  Infinity ->  NaN88 Invalid_operation
150dqnextt356 nexttoward  -NaN    Infinity -> -NaN
151dqnextt357 nexttoward -sNaN    Infinity -> -NaN   Invalid_operation
152dqnextt358 nexttoward  -NaN77  Infinity -> -NaN77
153dqnextt359 nexttoward -sNaN88  Infinity -> -NaN88 Invalid_operation
154
155-- Nmax, Nmin, Ntiny, subnormals
156dqnextt370 nexttoward  -9.999999999999999999999999999999999E+6144  Infinity  -> -9.999999999999999999999999999999998E+6144
157dqnextt371 nexttoward  -9.999999999999999999999999999999998E+6144  Infinity  -> -9.999999999999999999999999999999997E+6144
158dqnextt372 nexttoward  -1E-6143                  Infinity  -> -9.99999999999999999999999999999999E-6144  Underflow Subnormal Inexact Rounded
159dqnextt373 nexttoward  -1.000000000000000E-6143  Infinity  -> -9.99999999999999999999999999999999E-6144  Underflow Subnormal Inexact Rounded
160dqnextt374 nexttoward  -9E-6176                  Infinity  -> -8E-6176                 Underflow Subnormal Inexact Rounded
161dqnextt375 nexttoward  -9.9E-6175                Infinity  -> -9.8E-6175               Underflow Subnormal Inexact Rounded
162dqnextt376 nexttoward  -9.99999999999999999999999999999E-6147      Infinity  -> -9.99999999999999999999999999998E-6147     Underflow Subnormal Inexact Rounded
163dqnextt377 nexttoward  -9.99999999999999999999999999999999E-6144   Infinity  -> -9.99999999999999999999999999999998E-6144  Underflow Subnormal Inexact Rounded
164dqnextt378 nexttoward  -9.99999999999999999999999999999998E-6144   Infinity  -> -9.99999999999999999999999999999997E-6144  Underflow Subnormal Inexact Rounded
165dqnextt379 nexttoward  -9.99999999999999999999999999999997E-6144   Infinity  -> -9.99999999999999999999999999999996E-6144  Underflow Subnormal Inexact Rounded
166dqnextt380 nexttoward  -0E-6176                  Infinity  ->  1E-6176                 Underflow Subnormal Inexact Rounded
167dqnextt381 nexttoward  -1E-6176                  Infinity  -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
168dqnextt382 nexttoward  -2E-6176                  Infinity  -> -1E-6176                 Underflow Subnormal Inexact Rounded
169
170dqnextt383 nexttoward   0E-6176                  Infinity  ->  1E-6176                 Underflow Subnormal Inexact Rounded
171dqnextt384 nexttoward   1E-6176                  Infinity  ->  2E-6176                 Underflow Subnormal Inexact Rounded
172dqnextt385 nexttoward   2E-6176                  Infinity  ->  3E-6176                 Underflow Subnormal Inexact Rounded
173dqnextt386 nexttoward   10E-6176                 Infinity  ->  1.1E-6175               Underflow Subnormal Inexact Rounded
174dqnextt387 nexttoward   100E-6176                Infinity  ->  1.01E-6174              Underflow Subnormal Inexact Rounded
175dqnextt388 nexttoward   100000E-6176             Infinity  ->  1.00001E-6171           Underflow Subnormal Inexact Rounded
176dqnextt389 nexttoward   1.00000000000000000000000000000E-6143      Infinity  ->  1.000000000000000000000000000000001E-6143
177dqnextt390 nexttoward   1.000000000000000000000000000000000E-6143  Infinity  ->  1.000000000000000000000000000000001E-6143
178dqnextt391 nexttoward   1E-6143                  Infinity  ->  1.000000000000000000000000000000001E-6143
179dqnextt392 nexttoward   9.999999999999999999999999999999997E+6144  Infinity  ->  9.999999999999999999999999999999998E+6144
180dqnextt393 nexttoward   9.999999999999999999999999999999998E+6144  Infinity  ->  9.999999999999999999999999999999999E+6144
181dqnextt394 nexttoward   9.999999999999999999999999999999999E+6144  Infinity  ->  Infinity               Overflow Inexact Rounded
182
183------- lhs>rhs
184dqnextt401 nexttoward  0.9999999999999999999999999999999995  -Infinity ->   0.9999999999999999999999999999999994
185dqnextt402 nexttoward  0.9999999999999999999999999999999996  -Infinity ->   0.9999999999999999999999999999999995
186dqnextt403 nexttoward  0.9999999999999999999999999999999997  -Infinity ->   0.9999999999999999999999999999999996
187dqnextt404 nexttoward  0.9999999999999999999999999999999998  -Infinity ->   0.9999999999999999999999999999999997
188dqnextt405 nexttoward  0.9999999999999999999999999999999999  -Infinity ->   0.9999999999999999999999999999999998
189dqnextt406 nexttoward  1.000000000000000000000000000000000   -Infinity ->   0.9999999999999999999999999999999999
190dqnextt407 nexttoward  1.0          -Infinity ->   0.9999999999999999999999999999999999
191dqnextt408 nexttoward  1            -Infinity ->   0.9999999999999999999999999999999999
192dqnextt409 nexttoward  1.000000000000000000000000000000001   -Infinity ->   1.000000000000000000000000000000000
193dqnextt410 nexttoward  1.000000000000000000000000000000002   -Infinity ->   1.000000000000000000000000000000001
194dqnextt411 nexttoward  1.000000000000000000000000000000003   -Infinity ->   1.000000000000000000000000000000002
195dqnextt412 nexttoward  1.000000000000000000000000000000004   -Infinity ->   1.000000000000000000000000000000003
196dqnextt413 nexttoward  1.000000000000000000000000000000005   -Infinity ->   1.000000000000000000000000000000004
197dqnextt414 nexttoward  1.000000000000000000000000000000006   -Infinity ->   1.000000000000000000000000000000005
198dqnextt415 nexttoward  1.000000000000000000000000000000007   -Infinity ->   1.000000000000000000000000000000006
199dqnextt416 nexttoward  1.000000000000000000000000000000008   -Infinity ->   1.000000000000000000000000000000007
200dqnextt417 nexttoward  1.000000000000000000000000000000009   -Infinity ->   1.000000000000000000000000000000008
201dqnextt418 nexttoward  1.000000000000000000000000000000010   -Infinity ->   1.000000000000000000000000000000009
202dqnextt419 nexttoward  1.000000000000000000000000000000011   -Infinity ->   1.000000000000000000000000000000010
203dqnextt420 nexttoward  1.000000000000000000000000000000012   -Infinity ->   1.000000000000000000000000000000011
204
205dqnextt421 nexttoward -0.9999999999999999999999999999999995  -Infinity ->  -0.9999999999999999999999999999999996
206dqnextt422 nexttoward -0.9999999999999999999999999999999996  -Infinity ->  -0.9999999999999999999999999999999997
207dqnextt423 nexttoward -0.9999999999999999999999999999999997  -Infinity ->  -0.9999999999999999999999999999999998
208dqnextt424 nexttoward -0.9999999999999999999999999999999998  -Infinity ->  -0.9999999999999999999999999999999999
209dqnextt425 nexttoward -0.9999999999999999999999999999999999  -Infinity ->  -1.000000000000000000000000000000000
210dqnextt426 nexttoward -1.000000000000000000000000000000000   -Infinity ->  -1.000000000000000000000000000000001
211dqnextt427 nexttoward -1.0          -Infinity ->  -1.000000000000000000000000000000001
212dqnextt428 nexttoward -1            -Infinity ->  -1.000000000000000000000000000000001
213dqnextt429 nexttoward -1.000000000000000000000000000000001   -Infinity ->  -1.000000000000000000000000000000002
214dqnextt430 nexttoward -1.000000000000000000000000000000002   -Infinity ->  -1.000000000000000000000000000000003
215dqnextt431 nexttoward -1.000000000000000000000000000000003   -Infinity ->  -1.000000000000000000000000000000004
216dqnextt432 nexttoward -1.000000000000000000000000000000004   -Infinity ->  -1.000000000000000000000000000000005
217dqnextt433 nexttoward -1.000000000000000000000000000000005   -Infinity ->  -1.000000000000000000000000000000006
218dqnextt434 nexttoward -1.000000000000000000000000000000006   -Infinity ->  -1.000000000000000000000000000000007
219dqnextt435 nexttoward -1.000000000000000000000000000000007   -Infinity ->  -1.000000000000000000000000000000008
220dqnextt436 nexttoward -1.000000000000000000000000000000008   -Infinity ->  -1.000000000000000000000000000000009
221dqnextt437 nexttoward -1.000000000000000000000000000000009   -Infinity ->  -1.000000000000000000000000000000010
222dqnextt438 nexttoward -1.000000000000000000000000000000010   -Infinity ->  -1.000000000000000000000000000000011
223dqnextt439 nexttoward -1.000000000000000000000000000000011   -Infinity ->  -1.000000000000000000000000000000012
224
225-- Zeros
226dqnextt500 nexttoward -0            -Infinity -> -1E-6176         Underflow Subnormal Inexact Rounded
227dqnextt501 nexttoward  0            -Infinity -> -1E-6176         Underflow Subnormal Inexact Rounded
228dqnextt502 nexttoward  0.00         -Infinity -> -1E-6176         Underflow Subnormal Inexact Rounded
229dqnextt503 nexttoward -0.00         -Infinity -> -1E-6176         Underflow Subnormal Inexact Rounded
230dqnextt504 nexttoward  0E-300       -Infinity -> -1E-6176         Underflow Subnormal Inexact Rounded
231dqnextt505 nexttoward  0E+300       -Infinity -> -1E-6176         Underflow Subnormal Inexact Rounded
232dqnextt506 nexttoward  0E+30000     -Infinity -> -1E-6176         Underflow Subnormal Inexact Rounded
233dqnextt507 nexttoward -0E+30000     -Infinity -> -1E-6176         Underflow Subnormal Inexact Rounded
234
235-- specials
236dqnextt550 nexttoward   Inf     -Infinity ->  9.999999999999999999999999999999999E+6144
237dqnextt551 nexttoward  -Inf     -Infinity -> -Infinity
238dqnextt552 nexttoward   NaN     -Infinity ->  NaN
239dqnextt553 nexttoward  sNaN     -Infinity ->  NaN   Invalid_operation
240dqnextt554 nexttoward   NaN77   -Infinity ->  NaN77
241dqnextt555 nexttoward  sNaN88   -Infinity ->  NaN88 Invalid_operation
242dqnextt556 nexttoward  -NaN     -Infinity -> -NaN
243dqnextt557 nexttoward -sNaN     -Infinity -> -NaN   Invalid_operation
244dqnextt558 nexttoward  -NaN77   -Infinity -> -NaN77
245dqnextt559 nexttoward -sNaN88   -Infinity -> -NaN88 Invalid_operation
246
247-- Nmax, Nmin, Ntiny, subnormals
248dqnextt670 nexttoward  9.999999999999999999999999999999999E+6144   -Infinity  -> 9.999999999999999999999999999999998E+6144
249dqnextt671 nexttoward  9.999999999999999999999999999999998E+6144   -Infinity  -> 9.999999999999999999999999999999997E+6144
250dqnextt672 nexttoward  1E-6143                   -Infinity  -> 9.99999999999999999999999999999999E-6144   Underflow Subnormal  Inexact Rounded
251dqnextt673 nexttoward  1.000000000000000000000000000000000E-6143   -Infinity  -> 9.99999999999999999999999999999999E-6144   Underflow Subnormal  Inexact Rounded
252dqnextt674 nexttoward  9E-6176                   -Infinity  -> 8E-6176                  Underflow Subnormal  Inexact Rounded
253dqnextt675 nexttoward  9.9E-6175                 -Infinity  -> 9.8E-6175                Underflow Subnormal  Inexact Rounded
254dqnextt676 nexttoward  9.99999999999999999999999999999E-6147       -Infinity  -> 9.99999999999999999999999999998E-6147      Underflow Subnormal  Inexact Rounded
255dqnextt677 nexttoward  9.99999999999999999999999999999999E-6144    -Infinity  -> 9.99999999999999999999999999999998E-6144   Underflow Subnormal  Inexact Rounded
256dqnextt678 nexttoward  9.99999999999999999999999999999998E-6144    -Infinity  -> 9.99999999999999999999999999999997E-6144   Underflow Subnormal  Inexact Rounded
257dqnextt679 nexttoward  9.99999999999999999999999999999997E-6144    -Infinity  -> 9.99999999999999999999999999999996E-6144   Underflow Subnormal  Inexact Rounded
258dqnextt680 nexttoward  0E-6176                   -Infinity  -> -1E-6176                 Underflow Subnormal  Inexact Rounded
259dqnextt681 nexttoward  1E-6176                   -Infinity  -> 0E-6176                  Underflow Subnormal  Inexact Rounded Clamped
260dqnextt682 nexttoward  2E-6176                   -Infinity  -> 1E-6176                  Underflow Subnormal  Inexact Rounded
261
262dqnextt683 nexttoward  -0E-6176                  -Infinity  -> -1E-6176                 Underflow Subnormal  Inexact Rounded
263dqnextt684 nexttoward  -1E-6176                  -Infinity  -> -2E-6176                 Underflow Subnormal  Inexact Rounded
264dqnextt685 nexttoward  -2E-6176                  -Infinity  -> -3E-6176                 Underflow Subnormal  Inexact Rounded
265dqnextt686 nexttoward  -10E-6176                 -Infinity  -> -1.1E-6175               Underflow Subnormal  Inexact Rounded
266dqnextt687 nexttoward  -100E-6176                -Infinity  -> -1.01E-6174              Underflow Subnormal  Inexact Rounded
267dqnextt688 nexttoward  -100000E-6176             -Infinity  -> -1.00001E-6171           Underflow Subnormal  Inexact Rounded
268dqnextt689 nexttoward  -1.00000000000000000000000000000E-6143      -Infinity  -> -1.000000000000000000000000000000001E-6143
269dqnextt690 nexttoward  -1.000000000000000000000000000000000E-6143  -Infinity  -> -1.000000000000000000000000000000001E-6143
270dqnextt691 nexttoward  -1E-6143                  -Infinity  -> -1.000000000000000000000000000000001E-6143
271dqnextt692 nexttoward  -9.999999999999999999999999999999998E+6144  -Infinity  -> -9.999999999999999999999999999999999E+6144
272dqnextt693 nexttoward  -9.999999999999999999999999999999999E+6144  -Infinity  -> -Infinity               Overflow Inexact Rounded
273
274------- Specials
275dqnextt780 nexttoward -Inf  -Inf   -> -Infinity
276dqnextt781 nexttoward -Inf  -1000  -> -9.999999999999999999999999999999999E+6144
277dqnextt782 nexttoward -Inf  -1     -> -9.999999999999999999999999999999999E+6144
278dqnextt783 nexttoward -Inf  -0     -> -9.999999999999999999999999999999999E+6144
279dqnextt784 nexttoward -Inf   0     -> -9.999999999999999999999999999999999E+6144
280dqnextt785 nexttoward -Inf   1     -> -9.999999999999999999999999999999999E+6144
281dqnextt786 nexttoward -Inf   1000  -> -9.999999999999999999999999999999999E+6144
282dqnextt787 nexttoward -1000 -Inf   -> -1000.000000000000000000000000000001
283dqnextt788 nexttoward -Inf  -Inf   -> -Infinity
284dqnextt789 nexttoward -1    -Inf   -> -1.000000000000000000000000000000001
285dqnextt790 nexttoward -0    -Inf   -> -1E-6176           Underflow Subnormal Inexact Rounded
286dqnextt791 nexttoward  0    -Inf   -> -1E-6176           Underflow Subnormal Inexact Rounded
287dqnextt792 nexttoward  1    -Inf   ->  0.9999999999999999999999999999999999
288dqnextt793 nexttoward  1000 -Inf   ->  999.9999999999999999999999999999999
289dqnextt794 nexttoward  Inf  -Inf   ->  9.999999999999999999999999999999999E+6144
290
291dqnextt800 nexttoward  Inf  -Inf   ->  9.999999999999999999999999999999999E+6144
292dqnextt801 nexttoward  Inf  -1000  ->  9.999999999999999999999999999999999E+6144
293dqnextt802 nexttoward  Inf  -1     ->  9.999999999999999999999999999999999E+6144
294dqnextt803 nexttoward  Inf  -0     ->  9.999999999999999999999999999999999E+6144
295dqnextt804 nexttoward  Inf   0     ->  9.999999999999999999999999999999999E+6144
296dqnextt805 nexttoward  Inf   1     ->  9.999999999999999999999999999999999E+6144
297dqnextt806 nexttoward  Inf   1000  ->  9.999999999999999999999999999999999E+6144
298dqnextt807 nexttoward  Inf   Inf   ->  Infinity
299dqnextt808 nexttoward -1000  Inf   -> -999.9999999999999999999999999999999
300dqnextt809 nexttoward -Inf   Inf   -> -9.999999999999999999999999999999999E+6144
301dqnextt810 nexttoward -1     Inf   -> -0.9999999999999999999999999999999999
302dqnextt811 nexttoward -0     Inf   ->  1E-6176           Underflow Subnormal Inexact Rounded
303dqnextt812 nexttoward  0     Inf   ->  1E-6176           Underflow Subnormal Inexact Rounded
304dqnextt813 nexttoward  1     Inf   ->  1.000000000000000000000000000000001
305dqnextt814 nexttoward  1000  Inf   ->  1000.000000000000000000000000000001
306dqnextt815 nexttoward  Inf   Inf   ->  Infinity
307
308dqnextt821 nexttoward  NaN -Inf    ->  NaN
309dqnextt822 nexttoward  NaN -1000   ->  NaN
310dqnextt823 nexttoward  NaN -1      ->  NaN
311dqnextt824 nexttoward  NaN -0      ->  NaN
312dqnextt825 nexttoward  NaN  0      ->  NaN
313dqnextt826 nexttoward  NaN  1      ->  NaN
314dqnextt827 nexttoward  NaN  1000   ->  NaN
315dqnextt828 nexttoward  NaN  Inf    ->  NaN
316dqnextt829 nexttoward  NaN  NaN    ->  NaN
317dqnextt830 nexttoward -Inf  NaN    ->  NaN
318dqnextt831 nexttoward -1000 NaN    ->  NaN
319dqnextt832 nexttoward -1    NaN    ->  NaN
320dqnextt833 nexttoward -0    NaN    ->  NaN
321dqnextt834 nexttoward  0    NaN    ->  NaN
322dqnextt835 nexttoward  1    NaN    ->  NaN
323dqnextt836 nexttoward  1000 NaN    ->  NaN
324dqnextt837 nexttoward  Inf  NaN    ->  NaN
325
326dqnextt841 nexttoward  sNaN -Inf   ->  NaN  Invalid_operation
327dqnextt842 nexttoward  sNaN -1000  ->  NaN  Invalid_operation
328dqnextt843 nexttoward  sNaN -1     ->  NaN  Invalid_operation
329dqnextt844 nexttoward  sNaN -0     ->  NaN  Invalid_operation
330dqnextt845 nexttoward  sNaN  0     ->  NaN  Invalid_operation
331dqnextt846 nexttoward  sNaN  1     ->  NaN  Invalid_operation
332dqnextt847 nexttoward  sNaN  1000  ->  NaN  Invalid_operation
333dqnextt848 nexttoward  sNaN  NaN   ->  NaN  Invalid_operation
334dqnextt849 nexttoward  sNaN sNaN   ->  NaN  Invalid_operation
335dqnextt850 nexttoward  NaN  sNaN   ->  NaN  Invalid_operation
336dqnextt851 nexttoward -Inf  sNaN   ->  NaN  Invalid_operation
337dqnextt852 nexttoward -1000 sNaN   ->  NaN  Invalid_operation
338dqnextt853 nexttoward -1    sNaN   ->  NaN  Invalid_operation
339dqnextt854 nexttoward -0    sNaN   ->  NaN  Invalid_operation
340dqnextt855 nexttoward  0    sNaN   ->  NaN  Invalid_operation
341dqnextt856 nexttoward  1    sNaN   ->  NaN  Invalid_operation
342dqnextt857 nexttoward  1000 sNaN   ->  NaN  Invalid_operation
343dqnextt858 nexttoward  Inf  sNaN   ->  NaN  Invalid_operation
344dqnextt859 nexttoward  NaN  sNaN   ->  NaN  Invalid_operation
345
346-- propagating NaNs
347dqnextt861 nexttoward  NaN1   -Inf    ->  NaN1
348dqnextt862 nexttoward +NaN2   -1000   ->  NaN2
349dqnextt863 nexttoward  NaN3    1000   ->  NaN3
350dqnextt864 nexttoward  NaN4    Inf    ->  NaN4
351dqnextt865 nexttoward  NaN5   +NaN6   ->  NaN5
352dqnextt866 nexttoward -Inf     NaN7   ->  NaN7
353dqnextt867 nexttoward -1000    NaN8   ->  NaN8
354dqnextt868 nexttoward  1000    NaN9   ->  NaN9
355dqnextt869 nexttoward  Inf    +NaN10  ->  NaN10
356dqnextt871 nexttoward  sNaN11  -Inf   ->  NaN11  Invalid_operation
357dqnextt872 nexttoward  sNaN12  -1000  ->  NaN12  Invalid_operation
358dqnextt873 nexttoward  sNaN13   1000  ->  NaN13  Invalid_operation
359dqnextt874 nexttoward  sNaN14   NaN17 ->  NaN14  Invalid_operation
360dqnextt875 nexttoward  sNaN15  sNaN18 ->  NaN15  Invalid_operation
361dqnextt876 nexttoward  NaN16   sNaN19 ->  NaN19  Invalid_operation
362dqnextt877 nexttoward -Inf    +sNaN20 ->  NaN20  Invalid_operation
363dqnextt878 nexttoward -1000    sNaN21 ->  NaN21  Invalid_operation
364dqnextt879 nexttoward  1000    sNaN22 ->  NaN22  Invalid_operation
365dqnextt880 nexttoward  Inf     sNaN23 ->  NaN23  Invalid_operation
366dqnextt881 nexttoward +NaN25  +sNaN24 ->  NaN24  Invalid_operation
367dqnextt882 nexttoward -NaN26    NaN28 -> -NaN26
368dqnextt883 nexttoward -sNaN27  sNaN29 -> -NaN27  Invalid_operation
369dqnextt884 nexttoward  1000    -NaN30 -> -NaN30
370dqnextt885 nexttoward  1000   -sNaN31 -> -NaN31  Invalid_operation
371
372-- Null tests
373dqnextt900 nexttoward 1  # -> NaN Invalid_operation
374dqnextt901 nexttoward #  1 -> NaN Invalid_operation
375
376