• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1------------------------------------------------------------------------
2-- ddDivide.decTest -- decDouble division                             --
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
22precision:   16
23maxExponent: 384
24minExponent: -383
25extended:    1
26clamp:       1
27rounding:    half_even
28
29-- sanity checks
30dddiv001 divide  1     1    ->  1
31dddiv002 divide  2     1    ->  2
32dddiv003 divide  1     2    ->  0.5
33dddiv004 divide  2     2    ->  1
34dddiv005 divide  0     1    ->  0
35dddiv006 divide  0     2    ->  0
36dddiv007 divide  1     3    ->  0.3333333333333333 Inexact Rounded
37dddiv008 divide  2     3    ->  0.6666666666666667 Inexact Rounded
38dddiv009 divide  3     3    ->  1
39
40dddiv010 divide  2.4   1    ->  2.4
41dddiv011 divide  2.4   -1   ->  -2.4
42dddiv012 divide  -2.4  1    ->  -2.4
43dddiv013 divide  -2.4  -1   ->  2.4
44dddiv014 divide  2.40  1    ->  2.40
45dddiv015 divide  2.400 1    ->  2.400
46dddiv016 divide  2.4   2    ->  1.2
47dddiv017 divide  2.400 2    ->  1.200
48dddiv018 divide  2.    2    ->  1
49dddiv019 divide  20    20   ->  1
50
51dddiv020 divide  187   187    ->  1
52dddiv021 divide  5     2      ->  2.5
53dddiv022 divide  50    20     ->  2.5
54dddiv023 divide  500   200    ->  2.5
55dddiv024 divide  50.0  20.0   ->  2.5
56dddiv025 divide  5.00  2.00   ->  2.5
57dddiv026 divide  5     2.0    ->  2.5
58dddiv027 divide  5     2.000  ->  2.5
59dddiv028 divide  5     0.20   ->  25
60dddiv029 divide  5     0.200  ->  25
61dddiv030 divide  10    1      ->  10
62dddiv031 divide  100   1      ->  100
63dddiv032 divide  1000  1      ->  1000
64dddiv033 divide  1000  100    ->  10
65
66dddiv035 divide  1     2      ->  0.5
67dddiv036 divide  1     4      ->  0.25
68dddiv037 divide  1     8      ->  0.125
69dddiv038 divide  1     16     ->  0.0625
70dddiv039 divide  1     32     ->  0.03125
71dddiv040 divide  1     64     ->  0.015625
72dddiv041 divide  1    -2      ->  -0.5
73dddiv042 divide  1    -4      ->  -0.25
74dddiv043 divide  1    -8      ->  -0.125
75dddiv044 divide  1    -16     ->  -0.0625
76dddiv045 divide  1    -32     ->  -0.03125
77dddiv046 divide  1    -64     ->  -0.015625
78dddiv047 divide -1     2      ->  -0.5
79dddiv048 divide -1     4      ->  -0.25
80dddiv049 divide -1     8      ->  -0.125
81dddiv050 divide -1     16     ->  -0.0625
82dddiv051 divide -1     32     ->  -0.03125
83dddiv052 divide -1     64     ->  -0.015625
84dddiv053 divide -1    -2      ->  0.5
85dddiv054 divide -1    -4      ->  0.25
86dddiv055 divide -1    -8      ->  0.125
87dddiv056 divide -1    -16     ->  0.0625
88dddiv057 divide -1    -32     ->  0.03125
89dddiv058 divide -1    -64     ->  0.015625
90
91-- bcdTime
92dddiv060 divide  1 7                   -> 0.1428571428571429 Inexact Rounded
93dddiv061 divide 1.2345678  1.9876543   -> 0.6211179680490717 Inexact Rounded
94
95--               1234567890123456
96dddiv071 divide  9999999999999999 1  ->  9999999999999999
97dddiv072 divide  999999999999999  1  ->  999999999999999
98dddiv073 divide  99999999999999   1  ->  99999999999999
99dddiv074 divide  9999999999999    1  ->  9999999999999
100dddiv075 divide  999999999999     1  ->  999999999999
101dddiv076 divide  99999999999      1  ->  99999999999
102dddiv077 divide  9999999999       1  ->  9999999999
103dddiv078 divide  999999999        1  ->  999999999
104dddiv079 divide  99999999         1  ->  99999999
105dddiv080 divide  9999999          1  ->  9999999
106dddiv081 divide  999999           1  ->  999999
107dddiv082 divide  99999            1  ->  99999
108dddiv083 divide  9999             1  ->  9999
109dddiv084 divide  999              1  ->  999
110dddiv085 divide  99               1  ->  99
111dddiv086 divide  9                1  ->  9
112
113dddiv090 divide  0.            1    ->  0
114dddiv091 divide  .0            1    ->  0.0
115dddiv092 divide  0.00          1    ->  0.00
116dddiv093 divide  0.00E+9       1    ->  0E+7
117dddiv094 divide  0.0000E-50    1    ->  0E-54
118
119dddiv095 divide  1            1E-8  ->  1E+8
120dddiv096 divide  1            1E-9  ->  1E+9
121dddiv097 divide  1            1E-10 ->  1E+10
122dddiv098 divide  1            1E-11 ->  1E+11
123dddiv099 divide  1            1E-12 ->  1E+12
124
125dddiv100 divide  1  1   -> 1
126dddiv101 divide  1  2   -> 0.5
127dddiv102 divide  1  3   -> 0.3333333333333333 Inexact Rounded
128dddiv103 divide  1  4   -> 0.25
129dddiv104 divide  1  5   -> 0.2
130dddiv105 divide  1  6   -> 0.1666666666666667 Inexact Rounded
131dddiv106 divide  1  7   -> 0.1428571428571429 Inexact Rounded
132dddiv107 divide  1  8   -> 0.125
133dddiv108 divide  1  9   -> 0.1111111111111111 Inexact Rounded
134dddiv109 divide  1  10  -> 0.1
135dddiv110 divide  1  1   -> 1
136dddiv111 divide  2  1   -> 2
137dddiv112 divide  3  1   -> 3
138dddiv113 divide  4  1   -> 4
139dddiv114 divide  5  1   -> 5
140dddiv115 divide  6  1   -> 6
141dddiv116 divide  7  1   -> 7
142dddiv117 divide  8  1   -> 8
143dddiv118 divide  9  1   -> 9
144dddiv119 divide  10 1   -> 10
145
146dddiv120 divide  3E+1 0.001  -> 3E+4
147dddiv121 divide  2.200 2     -> 1.100
148
149dddiv130 divide  12345  4.999  ->  2469.493898779756    Inexact Rounded
150dddiv131 divide  12345  4.99   ->  2473.947895791583    Inexact Rounded
151dddiv132 divide  12345  4.9    ->  2519.387755102041    Inexact Rounded
152dddiv133 divide  12345  5      ->  2469
153dddiv134 divide  12345  5.1    ->  2420.588235294118    Inexact Rounded
154dddiv135 divide  12345  5.01   ->  2464.071856287425    Inexact Rounded
155dddiv136 divide  12345  5.001  ->  2468.506298740252    Inexact Rounded
156
157-- test possibly imprecise results
158dddiv220 divide 391   597 ->  0.6549413735343384  Inexact Rounded
159dddiv221 divide 391  -597 -> -0.6549413735343384  Inexact Rounded
160dddiv222 divide -391  597 -> -0.6549413735343384  Inexact Rounded
161dddiv223 divide -391 -597 ->  0.6549413735343384  Inexact Rounded
162
163-- test some cases that are close to exponent overflow, some with coefficient padding
164dddiv270 divide 1 1e384                  -> 1E-384                 Subnormal
165dddiv271 divide 1 0.9e384                -> 1.11111111111111E-384  Rounded Inexact Subnormal Underflow
166dddiv272 divide 1 0.99e384               -> 1.01010101010101E-384  Rounded Inexact Subnormal Underflow
167dddiv273 divide 1 0.9999999999999999e384 -> 1.00000000000000E-384  Rounded Inexact Subnormal Underflow
168dddiv274 divide 9e384    1               -> 9.000000000000000E+384 Clamped
169dddiv275 divide 9.9e384  1               -> 9.900000000000000E+384 Clamped
170dddiv276 divide 9.99e384 1               -> 9.990000000000000E+384 Clamped
171dddiv277 divide 9.9999999999999e384 1    -> 9.999999999999900E+384 Clamped
172dddiv278 divide 9.99999999999999e384 1   -> 9.999999999999990E+384 Clamped
173dddiv279 divide 9.999999999999999e384 1  -> 9.999999999999999E+384
174
175dddiv285 divide 9.9e384  1.1              -> 9.000000000000000E+384 Clamped
176dddiv286 divide 9.99e384 1.1              -> 9.081818181818182E+384 Inexact Rounded
177dddiv287 divide 9.9999999999999e384 1.1   -> 9.090909090909000E+384 Clamped
178dddiv288 divide 9.99999999999999e384 1.1  -> 9.090909090909082E+384 Inexact Rounded
179dddiv289 divide 9.999999999999999e384 1.1 -> 9.090909090909090E+384 Clamped
180
181
182-- Divide into 0 tests
183dddiv301 divide    0    7     -> 0
184dddiv302 divide    0    7E-5  -> 0E+5
185dddiv303 divide    0    7E-1  -> 0E+1
186dddiv304 divide    0    7E+1  -> 0.0
187dddiv305 divide    0    7E+5  -> 0.00000
188dddiv306 divide    0    7E+6  -> 0.000000
189dddiv307 divide    0    7E+7  -> 0E-7
190dddiv308 divide    0   70E-5  -> 0E+5
191dddiv309 divide    0   70E-1  -> 0E+1
192dddiv310 divide    0   70E+0  -> 0
193dddiv311 divide    0   70E+1  -> 0.0
194dddiv312 divide    0   70E+5  -> 0.00000
195dddiv313 divide    0   70E+6  -> 0.000000
196dddiv314 divide    0   70E+7  -> 0E-7
197dddiv315 divide    0  700E-5  -> 0E+5
198dddiv316 divide    0  700E-1  -> 0E+1
199dddiv317 divide    0  700E+0  -> 0
200dddiv318 divide    0  700E+1  -> 0.0
201dddiv319 divide    0  700E+5  -> 0.00000
202dddiv320 divide    0  700E+6  -> 0.000000
203dddiv321 divide    0  700E+7  -> 0E-7
204dddiv322 divide    0  700E+77 -> 0E-77
205
206dddiv331 divide 0E-3    7E-5  -> 0E+2
207dddiv332 divide 0E-3    7E-1  -> 0.00
208dddiv333 divide 0E-3    7E+1  -> 0.0000
209dddiv334 divide 0E-3    7E+5  -> 0E-8
210dddiv335 divide 0E-1    7E-5  -> 0E+4
211dddiv336 divide 0E-1    7E-1  -> 0
212dddiv337 divide 0E-1    7E+1  -> 0.00
213dddiv338 divide 0E-1    7E+5  -> 0.000000
214dddiv339 divide 0E+1    7E-5  -> 0E+6
215dddiv340 divide 0E+1    7E-1  -> 0E+2
216dddiv341 divide 0E+1    7E+1  -> 0
217dddiv342 divide 0E+1    7E+5  -> 0.0000
218dddiv343 divide 0E+3    7E-5  -> 0E+8
219dddiv344 divide 0E+3    7E-1  -> 0E+4
220dddiv345 divide 0E+3    7E+1  -> 0E+2
221dddiv346 divide 0E+3    7E+5  -> 0.00
222
223-- These were 'input rounding'
224dddiv441 divide 12345678000 1 -> 12345678000
225dddiv442 divide 1 12345678000 -> 8.100000664200054E-11 Inexact Rounded
226dddiv443 divide 1234567800  1 -> 1234567800
227dddiv444 divide 1 1234567800  -> 8.100000664200054E-10 Inexact Rounded
228dddiv445 divide 1234567890  1 -> 1234567890
229dddiv446 divide 1 1234567890  -> 8.100000073710001E-10 Inexact Rounded
230dddiv447 divide 1234567891  1 -> 1234567891
231dddiv448 divide 1 1234567891  -> 8.100000067149001E-10 Inexact Rounded
232dddiv449 divide 12345678901 1 -> 12345678901
233dddiv450 divide 1 12345678901 -> 8.100000073053901E-11 Inexact Rounded
234dddiv451 divide 1234567896  1 -> 1234567896
235dddiv452 divide 1 1234567896  -> 8.100000034344000E-10 Inexact Rounded
236
237-- high-lows
238dddiv453 divide 1e+1   1    ->   1E+1
239dddiv454 divide 1e+1   1.0  ->   1E+1
240dddiv455 divide 1e+1   1.00 ->   1E+1
241dddiv456 divide 1e+2   2    ->   5E+1
242dddiv457 divide 1e+2   2.0  ->   5E+1
243dddiv458 divide 1e+2   2.00 ->   5E+1
244
245-- some from IEEE discussions
246dddiv460 divide 3e0      2e0     -> 1.5
247dddiv461 divide 30e-1    2e0     -> 1.5
248dddiv462 divide 300e-2   2e0     -> 1.50
249dddiv464 divide 3000e-3  2e0     -> 1.500
250dddiv465 divide 3e0      20e-1   -> 1.5
251dddiv466 divide 30e-1    20e-1   -> 1.5
252dddiv467 divide 300e-2   20e-1   -> 1.5
253dddiv468 divide 3000e-3  20e-1   -> 1.50
254dddiv469 divide 3e0      200e-2  -> 1.5
255dddiv470 divide 30e-1    200e-2  -> 1.5
256dddiv471 divide 300e-2   200e-2  -> 1.5
257dddiv472 divide 3000e-3  200e-2  -> 1.5
258dddiv473 divide 3e0      2000e-3 -> 1.5
259dddiv474 divide 30e-1    2000e-3 -> 1.5
260dddiv475 divide 300e-2   2000e-3 -> 1.5
261dddiv476 divide 3000e-3  2000e-3 -> 1.5
262
263-- some reciprocals
264dddiv480 divide 1        1.0E+33 -> 1E-33
265dddiv481 divide 1        10E+33  -> 1E-34
266dddiv482 divide 1        1.0E-33 -> 1E+33
267dddiv483 divide 1        10E-33  -> 1E+32
268
269-- RMS discussion table
270dddiv484 divide 0e5     1e3 ->   0E+2
271dddiv485 divide 0e5     2e3 ->   0E+2
272dddiv486 divide 0e5    10e2 ->   0E+3
273dddiv487 divide 0e5    20e2 ->   0E+3
274dddiv488 divide 0e5   100e1 ->   0E+4
275dddiv489 divide 0e5   200e1 ->   0E+4
276
277dddiv491 divide 1e5     1e3 ->   1E+2
278dddiv492 divide 1e5     2e3 ->   5E+1
279dddiv493 divide 1e5    10e2 ->   1E+2
280dddiv494 divide 1e5    20e2 ->   5E+1
281dddiv495 divide 1e5   100e1 ->   1E+2
282dddiv496 divide 1e5   200e1 ->   5E+1
283
284-- tryzeros cases
285rounding:    half_up
286dddiv497  divide  0E+380 1000E-13  -> 0E+369 Clamped
287dddiv498  divide  0E-390 1000E+13  -> 0E-398 Clamped
288
289rounding:    half_up
290
291-- focus on trailing zeros issues
292dddiv500 divide  1      9.9    ->  0.1010101010101010  Inexact Rounded
293dddiv501 divide  1      9.09   ->  0.1100110011001100  Inexact Rounded
294dddiv502 divide  1      9.009  ->  0.1110001110001110  Inexact Rounded
295
296dddiv511 divide 1         2    -> 0.5
297dddiv512 divide 1.0       2    -> 0.5
298dddiv513 divide 1.00      2    -> 0.50
299dddiv514 divide 1.000     2    -> 0.500
300dddiv515 divide 1.0000    2    -> 0.5000
301dddiv516 divide 1.00000   2    -> 0.50000
302dddiv517 divide 1.000000  2    -> 0.500000
303dddiv518 divide 1.0000000 2    -> 0.5000000
304dddiv519 divide 1.00      2.00 -> 0.5
305
306dddiv521 divide 2    1         -> 2
307dddiv522 divide 2    1.0       -> 2
308dddiv523 divide 2    1.00      -> 2
309dddiv524 divide 2    1.000     -> 2
310dddiv525 divide 2    1.0000    -> 2
311dddiv526 divide 2    1.00000   -> 2
312dddiv527 divide 2    1.000000  -> 2
313dddiv528 divide 2    1.0000000 -> 2
314dddiv529 divide 2.00 1.00      -> 2
315
316dddiv530 divide  2.40   2      ->  1.20
317dddiv531 divide  2.40   4      ->  0.60
318dddiv532 divide  2.40  10      ->  0.24
319dddiv533 divide  2.40   2.0    ->  1.2
320dddiv534 divide  2.40   4.0    ->  0.6
321dddiv535 divide  2.40  10.0    ->  0.24
322dddiv536 divide  2.40   2.00   ->  1.2
323dddiv537 divide  2.40   4.00   ->  0.6
324dddiv538 divide  2.40  10.00   ->  0.24
325dddiv539 divide  0.9    0.1    ->  9
326dddiv540 divide  0.9    0.01   ->  9E+1
327dddiv541 divide  0.9    0.001  ->  9E+2
328dddiv542 divide  5      2      ->  2.5
329dddiv543 divide  5      2.0    ->  2.5
330dddiv544 divide  5      2.00   ->  2.5
331dddiv545 divide  5      20     ->  0.25
332dddiv546 divide  5      20.0   ->  0.25
333dddiv547 divide  2.400  2      ->  1.200
334dddiv548 divide  2.400  2.0    ->  1.20
335dddiv549 divide  2.400  2.400  ->  1
336
337dddiv550 divide  240    1      ->  240
338dddiv551 divide  240    10     ->  24
339dddiv552 divide  240    100    ->  2.4
340dddiv553 divide  240    1000   ->  0.24
341dddiv554 divide  2400   1      ->  2400
342dddiv555 divide  2400   10     ->  240
343dddiv556 divide  2400   100    ->  24
344dddiv557 divide  2400   1000   ->  2.4
345
346-- +ve exponent
347dddiv600 divide  2.4E+9     2  ->  1.2E+9
348dddiv601 divide  2.40E+9    2  ->  1.20E+9
349dddiv602 divide  2.400E+9   2  ->  1.200E+9
350dddiv603 divide  2.4000E+9  2  ->  1.2000E+9
351dddiv604 divide  24E+8      2  ->  1.2E+9
352dddiv605 divide  240E+7     2  ->  1.20E+9
353dddiv606 divide  2400E+6    2  ->  1.200E+9
354dddiv607 divide  24000E+5   2  ->  1.2000E+9
355
356-- more zeros, etc.
357dddiv731 divide 5.00 1E-3    -> 5.00E+3
358dddiv732 divide 00.00 0.000  -> NaN Division_undefined
359dddiv733 divide 00.00 0E-3   -> NaN Division_undefined
360dddiv734 divide  0    -0     -> NaN Division_undefined
361dddiv735 divide -0     0     -> NaN Division_undefined
362dddiv736 divide -0    -0     -> NaN Division_undefined
363
364dddiv741 divide  0    -1     -> -0
365dddiv742 divide -0    -1     ->  0
366dddiv743 divide  0     1     ->  0
367dddiv744 divide -0     1     -> -0
368dddiv745 divide -1     0     -> -Infinity Division_by_zero
369dddiv746 divide -1    -0     ->  Infinity Division_by_zero
370dddiv747 divide  1     0     ->  Infinity Division_by_zero
371dddiv748 divide  1    -0     -> -Infinity Division_by_zero
372
373dddiv751 divide  0.0  -1     -> -0.0
374dddiv752 divide -0.0  -1     ->  0.0
375dddiv753 divide  0.0   1     ->  0.0
376dddiv754 divide -0.0   1     -> -0.0
377dddiv755 divide -1.0   0     -> -Infinity Division_by_zero
378dddiv756 divide -1.0  -0     ->  Infinity Division_by_zero
379dddiv757 divide  1.0   0     ->  Infinity Division_by_zero
380dddiv758 divide  1.0  -0     -> -Infinity Division_by_zero
381
382dddiv761 divide  0    -1.0   -> -0E+1
383dddiv762 divide -0    -1.0   ->  0E+1
384dddiv763 divide  0     1.0   ->  0E+1
385dddiv764 divide -0     1.0   -> -0E+1
386dddiv765 divide -1     0.0   -> -Infinity Division_by_zero
387dddiv766 divide -1    -0.0   ->  Infinity Division_by_zero
388dddiv767 divide  1     0.0   ->  Infinity Division_by_zero
389dddiv768 divide  1    -0.0   -> -Infinity Division_by_zero
390
391dddiv771 divide  0.0  -1.0   -> -0
392dddiv772 divide -0.0  -1.0   ->  0
393dddiv773 divide  0.0   1.0   ->  0
394dddiv774 divide -0.0   1.0   -> -0
395dddiv775 divide -1.0   0.0   -> -Infinity Division_by_zero
396dddiv776 divide -1.0  -0.0   ->  Infinity Division_by_zero
397dddiv777 divide  1.0   0.0   ->  Infinity Division_by_zero
398dddiv778 divide  1.0  -0.0   -> -Infinity Division_by_zero
399
400-- Specials
401dddiv780 divide  Inf  -Inf   ->  NaN Invalid_operation
402dddiv781 divide  Inf  -1000  -> -Infinity
403dddiv782 divide  Inf  -1     -> -Infinity
404dddiv783 divide  Inf  -0     -> -Infinity
405dddiv784 divide  Inf   0     ->  Infinity
406dddiv785 divide  Inf   1     ->  Infinity
407dddiv786 divide  Inf   1000  ->  Infinity
408dddiv787 divide  Inf   Inf   ->  NaN Invalid_operation
409dddiv788 divide -1000  Inf   -> -0E-398 Clamped
410dddiv789 divide -Inf   Inf   ->  NaN Invalid_operation
411dddiv790 divide -1     Inf   -> -0E-398 Clamped
412dddiv791 divide -0     Inf   -> -0E-398 Clamped
413dddiv792 divide  0     Inf   ->  0E-398 Clamped
414dddiv793 divide  1     Inf   ->  0E-398 Clamped
415dddiv794 divide  1000  Inf   ->  0E-398 Clamped
416dddiv795 divide  Inf   Inf   ->  NaN Invalid_operation
417
418dddiv800 divide -Inf  -Inf   ->  NaN Invalid_operation
419dddiv801 divide -Inf  -1000  ->  Infinity
420dddiv802 divide -Inf  -1     ->  Infinity
421dddiv803 divide -Inf  -0     ->  Infinity
422dddiv804 divide -Inf   0     -> -Infinity
423dddiv805 divide -Inf   1     -> -Infinity
424dddiv806 divide -Inf   1000  -> -Infinity
425dddiv807 divide -Inf   Inf   ->  NaN Invalid_operation
426dddiv808 divide -1000  Inf   -> -0E-398 Clamped
427dddiv809 divide -Inf  -Inf   ->  NaN Invalid_operation
428dddiv810 divide -1    -Inf   ->  0E-398 Clamped
429dddiv811 divide -0    -Inf   ->  0E-398 Clamped
430dddiv812 divide  0    -Inf   -> -0E-398 Clamped
431dddiv813 divide  1    -Inf   -> -0E-398 Clamped
432dddiv814 divide  1000 -Inf   -> -0E-398 Clamped
433dddiv815 divide  Inf  -Inf   ->  NaN Invalid_operation
434
435dddiv821 divide  NaN -Inf    ->  NaN
436dddiv822 divide  NaN -1000   ->  NaN
437dddiv823 divide  NaN -1      ->  NaN
438dddiv824 divide  NaN -0      ->  NaN
439dddiv825 divide  NaN  0      ->  NaN
440dddiv826 divide  NaN  1      ->  NaN
441dddiv827 divide  NaN  1000   ->  NaN
442dddiv828 divide  NaN  Inf    ->  NaN
443dddiv829 divide  NaN  NaN    ->  NaN
444dddiv830 divide -Inf  NaN    ->  NaN
445dddiv831 divide -1000 NaN    ->  NaN
446dddiv832 divide -1    NaN    ->  NaN
447dddiv833 divide -0    NaN    ->  NaN
448dddiv834 divide  0    NaN    ->  NaN
449dddiv835 divide  1    NaN    ->  NaN
450dddiv836 divide  1000 NaN    ->  NaN
451dddiv837 divide  Inf  NaN    ->  NaN
452
453dddiv841 divide  sNaN -Inf   ->  NaN  Invalid_operation
454dddiv842 divide  sNaN -1000  ->  NaN  Invalid_operation
455dddiv843 divide  sNaN -1     ->  NaN  Invalid_operation
456dddiv844 divide  sNaN -0     ->  NaN  Invalid_operation
457dddiv845 divide  sNaN  0     ->  NaN  Invalid_operation
458dddiv846 divide  sNaN  1     ->  NaN  Invalid_operation
459dddiv847 divide  sNaN  1000  ->  NaN  Invalid_operation
460dddiv848 divide  sNaN  NaN   ->  NaN  Invalid_operation
461dddiv849 divide  sNaN sNaN   ->  NaN  Invalid_operation
462dddiv850 divide  NaN  sNaN   ->  NaN  Invalid_operation
463dddiv851 divide -Inf  sNaN   ->  NaN  Invalid_operation
464dddiv852 divide -1000 sNaN   ->  NaN  Invalid_operation
465dddiv853 divide -1    sNaN   ->  NaN  Invalid_operation
466dddiv854 divide -0    sNaN   ->  NaN  Invalid_operation
467dddiv855 divide  0    sNaN   ->  NaN  Invalid_operation
468dddiv856 divide  1    sNaN   ->  NaN  Invalid_operation
469dddiv857 divide  1000 sNaN   ->  NaN  Invalid_operation
470dddiv858 divide  Inf  sNaN   ->  NaN  Invalid_operation
471dddiv859 divide  NaN  sNaN   ->  NaN  Invalid_operation
472
473-- propagating NaNs
474dddiv861 divide  NaN9 -Inf   ->  NaN9
475dddiv862 divide  NaN8  1000  ->  NaN8
476dddiv863 divide  NaN7  Inf   ->  NaN7
477dddiv864 divide  NaN6  NaN5  ->  NaN6
478dddiv865 divide -Inf   NaN4  ->  NaN4
479dddiv866 divide -1000  NaN3  ->  NaN3
480dddiv867 divide  Inf   NaN2  ->  NaN2
481
482dddiv871 divide  sNaN99 -Inf    ->  NaN99 Invalid_operation
483dddiv872 divide  sNaN98 -1      ->  NaN98 Invalid_operation
484dddiv873 divide  sNaN97  NaN    ->  NaN97 Invalid_operation
485dddiv874 divide  sNaN96 sNaN94  ->  NaN96 Invalid_operation
486dddiv875 divide  NaN95  sNaN93  ->  NaN93 Invalid_operation
487dddiv876 divide -Inf    sNaN92  ->  NaN92 Invalid_operation
488dddiv877 divide  0      sNaN91  ->  NaN91 Invalid_operation
489dddiv878 divide  Inf    sNaN90  ->  NaN90 Invalid_operation
490dddiv879 divide  NaN    sNaN89  ->  NaN89 Invalid_operation
491
492dddiv881 divide  -NaN9  -Inf   ->  -NaN9
493dddiv882 divide  -NaN8   1000  ->  -NaN8
494dddiv883 divide  -NaN7   Inf   ->  -NaN7
495dddiv884 divide  -NaN6  -NaN5  ->  -NaN6
496dddiv885 divide  -Inf   -NaN4  ->  -NaN4
497dddiv886 divide  -1000  -NaN3  ->  -NaN3
498dddiv887 divide   Inf   -NaN2  ->  -NaN2
499
500dddiv891 divide -sNaN99 -Inf    -> -NaN99 Invalid_operation
501dddiv892 divide -sNaN98 -1      -> -NaN98 Invalid_operation
502dddiv893 divide -sNaN97  NaN    -> -NaN97 Invalid_operation
503dddiv894 divide -sNaN96 -sNaN94 -> -NaN96 Invalid_operation
504dddiv895 divide -NaN95  -sNaN93 -> -NaN93 Invalid_operation
505dddiv896 divide -Inf    -sNaN92 -> -NaN92 Invalid_operation
506dddiv897 divide  0      -sNaN91 -> -NaN91 Invalid_operation
507dddiv898 divide  Inf    -sNaN90 -> -NaN90 Invalid_operation
508dddiv899 divide -NaN    -sNaN89 -> -NaN89 Invalid_operation
509
510-- Various flavours of divide by 0
511dddiv901 divide    0       0   ->  NaN Division_undefined
512dddiv902 divide    0.0E5   0   ->  NaN Division_undefined
513dddiv903 divide    0.000   0   ->  NaN Division_undefined
514dddiv904 divide    0.0001  0   ->  Infinity Division_by_zero
515dddiv905 divide    0.01    0   ->  Infinity Division_by_zero
516dddiv906 divide    0.1     0   ->  Infinity Division_by_zero
517dddiv907 divide    1       0   ->  Infinity Division_by_zero
518dddiv908 divide    1       0.0 ->  Infinity Division_by_zero
519dddiv909 divide   10       0.0 ->  Infinity Division_by_zero
520dddiv910 divide   1E+100   0.0 ->  Infinity Division_by_zero
521dddiv911 divide   1E+100   0   ->  Infinity Division_by_zero
522
523dddiv921 divide   -0.0001  0   -> -Infinity Division_by_zero
524dddiv922 divide   -0.01    0   -> -Infinity Division_by_zero
525dddiv923 divide   -0.1     0   -> -Infinity Division_by_zero
526dddiv924 divide   -1       0   -> -Infinity Division_by_zero
527dddiv925 divide   -1       0.0 -> -Infinity Division_by_zero
528dddiv926 divide  -10       0.0 -> -Infinity Division_by_zero
529dddiv927 divide  -1E+100   0.0 -> -Infinity Division_by_zero
530dddiv928 divide  -1E+100   0   -> -Infinity Division_by_zero
531
532dddiv931 divide    0.0001 -0   -> -Infinity Division_by_zero
533dddiv932 divide    0.01   -0   -> -Infinity Division_by_zero
534dddiv933 divide    0.1    -0   -> -Infinity Division_by_zero
535dddiv934 divide    1      -0   -> -Infinity Division_by_zero
536dddiv935 divide    1      -0.0 -> -Infinity Division_by_zero
537dddiv936 divide   10      -0.0 -> -Infinity Division_by_zero
538dddiv937 divide   1E+100  -0.0 -> -Infinity Division_by_zero
539dddiv938 divide   1E+100  -0   -> -Infinity Division_by_zero
540
541dddiv941 divide   -0.0001 -0   ->  Infinity Division_by_zero
542dddiv942 divide   -0.01   -0   ->  Infinity Division_by_zero
543dddiv943 divide   -0.1    -0   ->  Infinity Division_by_zero
544dddiv944 divide   -1      -0   ->  Infinity Division_by_zero
545dddiv945 divide   -1      -0.0 ->  Infinity Division_by_zero
546dddiv946 divide  -10      -0.0 ->  Infinity Division_by_zero
547dddiv947 divide  -1E+100  -0.0 ->  Infinity Division_by_zero
548dddiv948 divide  -1E+100  -0   ->  Infinity Division_by_zero
549
550-- Examples from SQL proposal (Krishna Kulkarni)
551dddiv1021  divide 1E0          1E0 -> 1
552dddiv1022  divide 1E0          2E0 -> 0.5
553dddiv1023  divide 1E0          3E0 -> 0.3333333333333333 Inexact Rounded
554dddiv1024  divide 100E-2   1000E-3 -> 1
555dddiv1025  divide 24E-1        2E0 -> 1.2
556dddiv1026  divide 2400E-3      2E0 -> 1.200
557dddiv1027  divide 5E0          2E0 -> 2.5
558dddiv1028  divide 5E0        20E-1 -> 2.5
559dddiv1029  divide 5E0      2000E-3 -> 2.5
560dddiv1030  divide 5E0         2E-1 -> 25
561dddiv1031  divide 5E0        20E-2 -> 25
562dddiv1032  divide 480E-2       3E0 -> 1.60
563dddiv1033  divide 47E-1        2E0 -> 2.35
564
565-- ECMAScript bad examples
566rounding:    half_down
567dddiv1040  divide 5 9  -> 0.5555555555555556 Inexact Rounded
568rounding:    half_even
569dddiv1041  divide 6 11 -> 0.5454545454545455 Inexact Rounded
570
571-- overflow and underflow tests .. note subnormal results
572-- signs
573dddiv1051 divide  1e+277  1e-311 ->  Infinity Overflow Inexact Rounded
574dddiv1052 divide  1e+277 -1e-311 -> -Infinity Overflow Inexact Rounded
575dddiv1053 divide -1e+277  1e-311 -> -Infinity Overflow Inexact Rounded
576dddiv1054 divide -1e+277 -1e-311 ->  Infinity Overflow Inexact Rounded
577dddiv1055 divide  1e-277  1e+311 ->  0E-398 Underflow Subnormal Inexact Rounded Clamped
578dddiv1056 divide  1e-277 -1e+311 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
579dddiv1057 divide -1e-277  1e+311 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
580dddiv1058 divide -1e-277 -1e+311 ->  0E-398 Underflow Subnormal Inexact Rounded Clamped
581
582-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
583dddiv1060 divide 1e-291 1e+101 -> 1E-392 Subnormal
584dddiv1061 divide 1e-291 1e+102 -> 1E-393 Subnormal
585dddiv1062 divide 1e-291 1e+103 -> 1E-394 Subnormal
586dddiv1063 divide 1e-291 1e+104 -> 1E-395 Subnormal
587dddiv1064 divide 1e-291 1e+105 -> 1E-396 Subnormal
588dddiv1065 divide 1e-291 1e+106 -> 1E-397 Subnormal
589dddiv1066 divide 1e-291 1e+107 -> 1E-398 Subnormal
590dddiv1067 divide 1e-291 1e+108 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
591dddiv1068 divide 1e-291 1e+109 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
592dddiv1069 divide 1e-291 1e+110 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
593-- [no equivalent of 'subnormal' for overflow]
594dddiv1070 divide 1e+60 1e-321 -> 1.000000000000E+381  Clamped
595dddiv1071 divide 1e+60 1e-322 -> 1.0000000000000E+382  Clamped
596dddiv1072 divide 1e+60 1e-323 -> 1.00000000000000E+383  Clamped
597dddiv1073 divide 1e+60 1e-324 -> 1.000000000000000E+384  Clamped
598dddiv1074 divide 1e+60 1e-325 -> Infinity Overflow Inexact Rounded
599dddiv1075 divide 1e+60 1e-326 -> Infinity Overflow Inexact Rounded
600dddiv1076 divide 1e+60 1e-327 -> Infinity Overflow Inexact Rounded
601dddiv1077 divide 1e+60 1e-328 -> Infinity Overflow Inexact Rounded
602dddiv1078 divide 1e+60 1e-329 -> Infinity Overflow Inexact Rounded
603dddiv1079 divide 1e+60 1e-330 -> Infinity Overflow Inexact Rounded
604
605dddiv1101 divide  1.0000E-394  1     -> 1.0000E-394 Subnormal
606dddiv1102 divide  1.000E-394   1e+1  -> 1.000E-395  Subnormal
607dddiv1103 divide  1.00E-394    1e+2  -> 1.00E-396   Subnormal
608dddiv1104 divide  1.0E-394     1e+3  -> 1.0E-397    Subnormal
609dddiv1105 divide  1.0E-394     1e+4  -> 1E-398     Subnormal Rounded
610dddiv1106 divide  1.3E-394     1e+4  -> 1E-398     Underflow Subnormal Inexact Rounded
611dddiv1107 divide  1.5E-394     1e+4  -> 2E-398     Underflow Subnormal Inexact Rounded
612dddiv1108 divide  1.7E-394     1e+4  -> 2E-398     Underflow Subnormal Inexact Rounded
613dddiv1109 divide  2.3E-394     1e+4  -> 2E-398     Underflow Subnormal Inexact Rounded
614dddiv1110 divide  2.5E-394     1e+4  -> 2E-398     Underflow Subnormal Inexact Rounded
615dddiv1111 divide  2.7E-394     1e+4  -> 3E-398     Underflow Subnormal Inexact Rounded
616dddiv1112 divide  1.49E-394    1e+4  -> 1E-398     Underflow Subnormal Inexact Rounded
617dddiv1113 divide  1.50E-394    1e+4  -> 2E-398     Underflow Subnormal Inexact Rounded
618dddiv1114 divide  1.51E-394    1e+4  -> 2E-398     Underflow Subnormal Inexact Rounded
619dddiv1115 divide  2.49E-394    1e+4  -> 2E-398     Underflow Subnormal Inexact Rounded
620dddiv1116 divide  2.50E-394    1e+4  -> 2E-398     Underflow Subnormal Inexact Rounded
621dddiv1117 divide  2.51E-394    1e+4  -> 3E-398     Underflow Subnormal Inexact Rounded
622
623dddiv1118 divide  1E-394       1e+4  -> 1E-398     Subnormal
624dddiv1119 divide  3E-394       1e+5  -> 0E-398     Underflow Subnormal Inexact Rounded Clamped
625dddiv1120 divide  5E-394       1e+5  -> 0E-398     Underflow Subnormal Inexact Rounded Clamped
626dddiv1121 divide  7E-394       1e+5  -> 1E-398     Underflow Subnormal Inexact Rounded
627dddiv1122 divide  9E-394       1e+5  -> 1E-398     Underflow Subnormal Inexact Rounded
628dddiv1123 divide  9.9E-394     1e+5  -> 1E-398     Underflow Subnormal Inexact Rounded
629
630dddiv1124 divide  1E-394      -1e+4  -> -1E-398    Subnormal
631dddiv1125 divide  3E-394      -1e+5  -> -0E-398    Underflow Subnormal Inexact Rounded Clamped
632dddiv1126 divide -5E-394       1e+5  -> -0E-398    Underflow Subnormal Inexact Rounded Clamped
633dddiv1127 divide  7E-394      -1e+5  -> -1E-398    Underflow Subnormal Inexact Rounded
634dddiv1128 divide -9E-394       1e+5  -> -1E-398    Underflow Subnormal Inexact Rounded
635dddiv1129 divide  9.9E-394    -1e+5  -> -1E-398    Underflow Subnormal Inexact Rounded
636dddiv1130 divide  3.0E-394    -1e+5  -> -0E-398    Underflow Subnormal Inexact Rounded Clamped
637
638dddiv1131 divide  1.0E-199     1e+200 -> 0E-398    Underflow Subnormal Inexact Rounded Clamped
639dddiv1132 divide  1.0E-199     1e+199 -> 1E-398    Subnormal Rounded
640dddiv1133 divide  1.0E-199     1e+198 -> 1.0E-397  Subnormal
641dddiv1134 divide  2.0E-199     2e+198 -> 1.0E-397  Subnormal
642dddiv1135 divide  4.0E-199     4e+198 -> 1.0E-397  Subnormal
643dddiv1136 divide 10.0E-199    10e+198 -> 1.0E-397  Subnormal
644dddiv1137 divide 30.0E-199    30e+198 -> 1.0E-397  Subnormal
645
646-- randoms
647dddiv2010  divide  -3.303226714900711E-35   8.796578842713183E+73   ->  -3.755126594058783E-109 Inexact Rounded
648dddiv2011  divide   933153327821073.6       68782181090246.25       ->   13.56678885475763 Inexact Rounded
649dddiv2012  divide   5.04752436057906E-72   -8.179481771238642E+64   ->  -6.170958627632835E-137 Inexact Rounded
650dddiv2013  divide  -3707613309582318        3394911196503.048       ->  -1092.109070010836 Inexact Rounded
651dddiv2014  divide   99689.0555190461       -4.735208553891464       ->  -21052.72753765411 Inexact Rounded
652dddiv2015  divide  -1447915775613329        269750797.8184875       ->  -5367605.164925653 Inexact Rounded
653dddiv2016  divide  -9.394881304225258E-19  -830585.0252671636       ->   1.131116143251358E-24 Inexact Rounded
654dddiv2017  divide  -1.056283432738934       88.58754555124013       ->  -0.01192361100159352 Inexact Rounded
655dddiv2018  divide   5763220933343.081       689089567025052.1       ->   0.008363529516524456 Inexact Rounded
656dddiv2019  divide   873819.122103216        9.740612494523300E-49   ->   8.970884763093948E+53 Inexact Rounded
657dddiv2020  divide   8022914.838533576       6178.566801742713       ->   1298.507420243583 Inexact Rounded
658dddiv2021  divide   203982.7605650363      -2158.283639053435       ->  -94.51156320422168 Inexact Rounded
659dddiv2022  divide   803.6310547013030       7101143795399.238       ->   1.131692411611166E-10 Inexact Rounded
660dddiv2023  divide   9.251697842123399E-82  -1.342350220606119E-7    ->  -6.892163982321936E-75 Inexact Rounded
661dddiv2024  divide  -1.980600645637992E-53  -5.474262753214457E+77   ->   3.618022617703168E-131 Inexact Rounded
662dddiv2025  divide  -210.0322996351690      -8.580951835872843E+80   ->   2.447657365434971E-79 Inexact Rounded
663dddiv2026  divide  -1.821980314020370E+85  -3.018915267138165       ->   6.035215144503042E+84 Inexact Rounded
664dddiv2027  divide  -772264503601.1047       5.158258271408988E-86   ->  -1.497141986630614E+97 Inexact Rounded
665dddiv2028  divide  -767.0532415847106       2.700027228028939E-59   ->  -2.840909282772941E+61 Inexact Rounded
666dddiv2029  divide   496724.8548250093       7.32700588163100E+66    ->   6.779370220929013E-62 Inexact Rounded
667dddiv2030  divide  -304232651447703.9      -108.9730808657440       ->   2791814721862.565 Inexact Rounded
668dddiv2031  divide  -7.233817192699405E+42  -5711302004.149411       ->   1.266579352211430E+33 Inexact Rounded
669dddiv2032  divide  -9.999221444912745E+96   4010569406446197        ->  -2.493217404202250E+81 Inexact Rounded
670dddiv2033  divide  -1837272.061937622       8.356322838066762       ->  -219866.0939196882 Inexact Rounded
671dddiv2034  divide   2168.517555606529       209.1910258615061       ->   10.36620737756784 Inexact Rounded
672dddiv2035  divide  -1.884389790576371E+88   2.95181953870583E+20    ->  -6.383824505079828E+67 Inexact Rounded
673dddiv2036  divide   732263.6037438196       961222.3634446889       ->   0.7618045850698269 Inexact Rounded
674dddiv2037  divide  -813461419.0348336       5.376293753809143E+84   ->  -1.513052404285927E-76 Inexact Rounded
675dddiv2038  divide  -45562133508108.50      -9.776843494690107E+51   ->   4.660208945029519E-39 Inexact Rounded
676dddiv2039  divide  -6.489393172441016E+80  -9101965.097852113       ->   7.129661674897421E+73 Inexact Rounded
677dddiv2040  divide   3.694576237117349E+93   6683512.012622003       ->   5.527896456443912E+86 Inexact Rounded
678dddiv2041  divide  -2.252877726403272E+19  -7451913256.181367       ->   3023220546.125531 Inexact Rounded
679dddiv2042  divide   518303.1989111842       50.01587020474133       ->   10362.77479107123 Inexact Rounded
680dddiv2043  divide   2.902087881880103E+24   33.32400992305702       ->   8.708699488989578E+22 Inexact Rounded
681dddiv2044  divide   549619.4559510557       1660824845196338        ->   3.309316196351104E-10 Inexact Rounded
682dddiv2045  divide  -6775670774684043        8292152023.077262       ->  -817118.4941891062 Inexact Rounded
683dddiv2046  divide  -77.50923921524079      -5.636882655425815E+74   ->   1.375037302588405E-73 Inexact Rounded
684dddiv2047  divide  -2.984889459605149E-10  -88106156784122.99       ->   3.387833005721384E-24 Inexact Rounded
685dddiv2048  divide   0.949517293997085       44767115.96450998       ->   2.121015110175589E-8 Inexact Rounded
686dddiv2049  divide  -2760937211.084521      -1087015876975408        ->   0.000002539923537057024 Inexact Rounded
687dddiv2050  divide   28438351.85030536      -4.209397904088624E-47   ->  -6.755919135770688E+53 Inexact Rounded
688dddiv2051  divide  -85562731.6820956       -7.166045442530185E+45   ->   1.194002080621542E-38 Inexact Rounded
689dddiv2052  divide   2533802852165.25        7154.119606235955       ->   354173957.3317501 Inexact Rounded
690dddiv2053  divide  -8858831346851.474       97.59734208801716       ->  -90769186509.83577 Inexact Rounded
691dddiv2054  divide   176783629801387.5       840073263.3109817       ->   210438.3480848206 Inexact Rounded
692dddiv2055  divide  -493506471796175.6       79733894790822.03       ->  -6.189418854940746 Inexact Rounded
693dddiv2056  divide   790.1682542103445       829.9449370367435       ->   0.9520731062371214 Inexact Rounded
694dddiv2057  divide  -8920459838.583164      -4767.889187899214       ->   1870945.294035581 Inexact Rounded
695dddiv2058  divide   53536687164422.1        53137.5007032689        ->   1007512330.385698 Inexact Rounded
696dddiv2059  divide   4.051532311146561E-74  -2.343089768972261E+94   ->  -1.729140882606332E-168 Inexact Rounded
697dddiv2060  divide  -14847758778636.88       3.062543516383807E-43   ->  -4.848178874587497E+55 Inexact Rounded
698
699-- Division probably has pre-rounding, so need to test rounding
700-- explicitly rather than assume included through other tests;
701-- tests include simple rounding and also the tricky cases of sticky
702-- bits following two zeros
703--
704--   1/99999 gives 0.0000100001000010000100001000010000100001
705--                       1234567890123456
706--
707--   1/999999 gives 0.000001000001000001000001000001000001000001
708--                         1234567890123456
709
710rounding: ceiling
711dddiv3001  divide  1     3    ->  0.3333333333333334 Inexact Rounded
712dddiv3002  divide  2     3    ->  0.6666666666666667 Inexact Rounded
713dddiv3003  divide  1 99999    ->  0.00001000010000100002  Inexact Rounded
714dddiv3004  divide  1 999999   ->  0.000001000001000001001 Inexact Rounded
715
716rounding: floor
717dddiv3011  divide  1     3    ->  0.3333333333333333 Inexact Rounded
718dddiv3012  divide  2     3    ->  0.6666666666666666 Inexact Rounded
719dddiv3013  divide  1 99999    ->  0.00001000010000100001  Inexact Rounded
720dddiv3014  divide  1 999999   ->  0.000001000001000001000 Inexact Rounded
721
722rounding: up
723dddiv3021  divide  1     3    ->  0.3333333333333334 Inexact Rounded
724dddiv3022  divide  2     3    ->  0.6666666666666667 Inexact Rounded
725dddiv3023  divide  1 99999    ->  0.00001000010000100002  Inexact Rounded
726dddiv3024  divide  1 999999   ->  0.000001000001000001001 Inexact Rounded
727
728rounding: down
729dddiv3031  divide  1     3    ->  0.3333333333333333 Inexact Rounded
730dddiv3032  divide  2     3    ->  0.6666666666666666 Inexact Rounded
731dddiv3033  divide  1 99999    ->  0.00001000010000100001  Inexact Rounded
732dddiv3034  divide  1 999999   ->  0.000001000001000001000 Inexact Rounded
733
734rounding: half_up
735dddiv3041  divide  1     3    ->  0.3333333333333333 Inexact Rounded
736dddiv3042  divide  2     3    ->  0.6666666666666667 Inexact Rounded
737dddiv3043  divide  1 99999    ->  0.00001000010000100001  Inexact Rounded
738dddiv3044  divide  1 999999   ->  0.000001000001000001000 Inexact Rounded
739
740rounding: half_down
741dddiv3051  divide  1     3    ->  0.3333333333333333 Inexact Rounded
742dddiv3052  divide  2     3    ->  0.6666666666666667 Inexact Rounded
743dddiv3053  divide  1 99999    ->  0.00001000010000100001  Inexact Rounded
744dddiv3054  divide  1 999999   ->  0.000001000001000001000 Inexact Rounded
745
746rounding: half_even
747dddiv3061  divide  1     3    ->  0.3333333333333333 Inexact Rounded
748dddiv3062  divide  2     3    ->  0.6666666666666667 Inexact Rounded
749dddiv3063  divide  1 99999    ->  0.00001000010000100001  Inexact Rounded
750dddiv3064  divide  1 999999   ->  0.000001000001000001000 Inexact Rounded
751
752rounding: 05up
753dddiv3071  divide  1     3    ->  0.3333333333333333 Inexact Rounded
754dddiv3072  divide  2     3    ->  0.6666666666666666 Inexact Rounded
755dddiv3073  divide  1 99999    ->  0.00001000010000100001  Inexact Rounded
756dddiv3074  divide  1 999999   ->  0.000001000001000001001 Inexact Rounded
757
758-- random divide tests with result near 1
759rounding: half_even
760dddiv4001 divide  3195385192916917   3195385192946695  ->  0.9999999999906809  Inexact Rounded
761dddiv4002 divide  1393723067526993   1393723067519475  ->  1.000000000005394  Inexact Rounded
762dddiv4003 divide   759985543702302    759985543674015  ->  1.000000000037220  Inexact Rounded
763dddiv4004 divide  9579158456027302   9579158456036864  ->  0.9999999999990018  Inexact Rounded
764dddiv4005 divide  7079398299143569   7079398299156904  ->  0.9999999999981164  Inexact Rounded
765dddiv4006 divide  6636169255366598   6636169255336386  ->  1.000000000004553  Inexact Rounded
766dddiv4007 divide  6964813971340090   6964813971321554  ->  1.000000000002661  Inexact Rounded
767dddiv4008 divide  4182275225480784   4182275225454009  ->  1.000000000006402  Inexact Rounded
768dddiv4009 divide  9228325124938029   9228325124918730  ->  1.000000000002091  Inexact Rounded
769dddiv4010 divide  3428346338630192   3428346338609843  ->  1.000000000005936  Inexact Rounded
770dddiv4011 divide  2143511550722893   2143511550751754  ->  0.9999999999865356  Inexact Rounded
771dddiv4012 divide  1672732924396785   1672732924401811  ->  0.9999999999969953  Inexact Rounded
772dddiv4013 divide  4190714611948216   4190714611948664  ->  0.9999999999998931  Inexact Rounded
773dddiv4014 divide  3942254800848877   3942254800814556  ->  1.000000000008706  Inexact Rounded
774dddiv4015 divide  2854459826952334   2854459826960762  ->  0.9999999999970474  Inexact Rounded
775dddiv4016 divide  2853258953664731   2853258953684471  ->  0.9999999999930816  Inexact Rounded
776dddiv4017 divide  9453512638125978   9453512638146425  ->  0.9999999999978371  Inexact Rounded
777dddiv4018 divide   339476633940369    339476633912887  ->  1.000000000080954  Inexact Rounded
778dddiv4019 divide  4542181492688467   4542181492697735  ->  0.9999999999979596  Inexact Rounded
779dddiv4020 divide  7312600192399197   7312600192395424  ->  1.000000000000516  Inexact Rounded
780dddiv4021 divide  1811674985570111   1811674985603935  ->  0.9999999999813300  Inexact Rounded
781dddiv4022 divide  1706462639003481   1706462639017740  ->  0.9999999999916441  Inexact Rounded
782dddiv4023 divide  6697052654940368   6697052654934110  ->  1.000000000000934  Inexact Rounded
783dddiv4024 divide  5015283664277539   5015283664310719  ->  0.9999999999933842  Inexact Rounded
784dddiv4025 divide  2359501561537464   2359501561502464  ->  1.000000000014834  Inexact Rounded
785dddiv4026 divide  2669850227909157   2669850227901548  ->  1.000000000002850  Inexact Rounded
786dddiv4027 divide  9329725546974648   9329725547002445  ->  0.9999999999970206  Inexact Rounded
787dddiv4028 divide  3228562867071248   3228562867106206  ->  0.9999999999891723  Inexact Rounded
788dddiv4029 divide  4862226644921175   4862226644909380  ->  1.000000000002426  Inexact Rounded
789dddiv4030 divide  1022267997054529   1022267997071329  ->  0.9999999999835660  Inexact Rounded
790dddiv4031 divide  1048777482023719   1048777482000948  ->  1.000000000021712  Inexact Rounded
791dddiv4032 divide  9980113777337098   9980113777330539  ->  1.000000000000657  Inexact Rounded
792dddiv4033 divide  7506839167963908   7506839167942901  ->  1.000000000002798  Inexact Rounded
793dddiv4034 divide   231119751977860    231119751962453  ->  1.000000000066662  Inexact Rounded
794dddiv4035 divide  4034903664762962   4034903664795526  ->  0.9999999999919294  Inexact Rounded
795dddiv4036 divide  5700122152274696   5700122152251386  ->  1.000000000004089  Inexact Rounded
796dddiv4037 divide  6869599590293110   6869599590293495  ->  0.9999999999999440  Inexact Rounded
797dddiv4038 divide  5576281960092797   5576281960105579  ->  0.9999999999977078  Inexact Rounded
798dddiv4039 divide  2304844888381318   2304844888353073  ->  1.000000000012255  Inexact Rounded
799dddiv4040 divide  3265933651656452   3265933651682779  ->  0.9999999999919389  Inexact Rounded
800dddiv4041 divide  5235714985079914   5235714985066131  ->  1.000000000002632  Inexact Rounded
801dddiv4042 divide  5578481572827551   5578481572822945  ->  1.000000000000826  Inexact Rounded
802dddiv4043 divide  4909616081396134   4909616081373076  ->  1.000000000004696  Inexact Rounded
803dddiv4044 divide   636447224349537    636447224338757  ->  1.000000000016938  Inexact Rounded
804dddiv4045 divide  1539373428396640   1539373428364727  ->  1.000000000020731  Inexact Rounded
805dddiv4046 divide  2028786707377893   2028786707378866  ->  0.9999999999995204  Inexact Rounded
806dddiv4047 divide   137643260486222    137643260487419  ->  0.9999999999913036  Inexact Rounded
807dddiv4048 divide   247451519746765    247451519752267  ->  0.9999999999777653  Inexact Rounded
808dddiv4049 divide  7877858475022054   7877858474999794  ->  1.000000000002826  Inexact Rounded
809dddiv4050 divide  7333242694766258   7333242694744628  ->  1.000000000002950  Inexact Rounded
810dddiv4051 divide   124051503698592    124051503699397  ->  0.9999999999935108  Inexact Rounded
811dddiv4052 divide  8944737432385188   8944737432406860  ->  0.9999999999975771  Inexact Rounded
812dddiv4053 divide  9883948923406874   9883948923424843  ->  0.9999999999981820  Inexact Rounded
813dddiv4054 divide  6829178741654284   6829178741671973  ->  0.9999999999974098  Inexact Rounded
814dddiv4055 divide  7342752479768122   7342752479793385  ->  0.9999999999965595  Inexact Rounded
815dddiv4056 divide  8066426579008783   8066426578977563  ->  1.000000000003870  Inexact Rounded
816dddiv4057 divide  8992775071383295   8992775071352712  ->  1.000000000003401  Inexact Rounded
817dddiv4058 divide  5485011755545641   5485011755543611  ->  1.000000000000370  Inexact Rounded
818dddiv4059 divide  5779983054353918   5779983054365300  ->  0.9999999999980308  Inexact Rounded
819dddiv4060 divide  9502265102713774   9502265102735208  ->  0.9999999999977443  Inexact Rounded
820dddiv4061 divide  2109558399130981   2109558399116281  ->  1.000000000006968  Inexact Rounded
821dddiv4062 divide  5296182636350471   5296182636351521  ->  0.9999999999998017  Inexact Rounded
822dddiv4063 divide  1440019225591883   1440019225601844  ->  0.9999999999930827  Inexact Rounded
823dddiv4064 divide  8182110791881341   8182110791847174  ->  1.000000000004176  Inexact Rounded
824dddiv4065 divide   489098235512060    489098235534516  ->  0.9999999999540869  Inexact Rounded
825dddiv4066 divide  6475687084782038   6475687084756089  ->  1.000000000004007  Inexact Rounded
826dddiv4067 divide  8094348555736948   8094348555759236  ->  0.9999999999972465  Inexact Rounded
827dddiv4068 divide  1982766816291543   1982766816309463  ->  0.9999999999909621  Inexact Rounded
828dddiv4069 divide  9277314300113251   9277314300084467  ->  1.000000000003103  Inexact Rounded
829dddiv4070 divide  4335532959318934   4335532959293167  ->  1.000000000005943  Inexact Rounded
830dddiv4071 divide  7767113032981348   7767113032968132  ->  1.000000000001702  Inexact Rounded
831dddiv4072 divide  1578548053342868   1578548053370448  ->  0.9999999999825282  Inexact Rounded
832dddiv4073 divide  3790420686666898   3790420686636315  ->  1.000000000008068  Inexact Rounded
833dddiv4074 divide   871682421955147    871682421976441  ->  0.9999999999755714  Inexact Rounded
834dddiv4075 divide   744141054479940    744141054512329  ->  0.9999999999564746  Inexact Rounded
835dddiv4076 divide  8956824183670735   8956824183641741  ->  1.000000000003237  Inexact Rounded
836dddiv4077 divide  8337291694485682   8337291694451193  ->  1.000000000004137  Inexact Rounded
837dddiv4078 divide  4107775944683669   4107775944657097  ->  1.000000000006469  Inexact Rounded
838dddiv4079 divide  8691900057964648   8691900057997555  ->  0.9999999999962141  Inexact Rounded
839dddiv4080 divide  2229528520536462   2229528520502337  ->  1.000000000015306  Inexact Rounded
840dddiv4081 divide   398442083774322    398442083746273  ->  1.000000000070397  Inexact Rounded
841dddiv4082 divide  5319819776808759   5319819776838313  ->  0.9999999999944445  Inexact Rounded
842dddiv4083 divide  7710491299066855   7710491299041858  ->  1.000000000003242  Inexact Rounded
843dddiv4084 divide  9083231296087266   9083231296058160  ->  1.000000000003204  Inexact Rounded
844dddiv4085 divide  3566873574904559   3566873574890328  ->  1.000000000003990  Inexact Rounded
845dddiv4086 divide   596343290550525    596343290555614  ->  0.9999999999914663  Inexact Rounded
846dddiv4087 divide   278227925093192    278227925068104  ->  1.000000000090171  Inexact Rounded
847dddiv4088 divide  3292902958490649   3292902958519881  ->  0.9999999999911227  Inexact Rounded
848dddiv4089 divide  5521871364245881   5521871364229536  ->  1.000000000002960  Inexact Rounded
849dddiv4090 divide  2406505602883617   2406505602857997  ->  1.000000000010646  Inexact Rounded
850dddiv4091 divide  7741146984869208   7741146984867255  ->  1.000000000000252  Inexact Rounded
851dddiv4092 divide  4576041832414909   4576041832405102  ->  1.000000000002143  Inexact Rounded
852dddiv4093 divide  9183756982878057   9183756982901934  ->  0.9999999999974001  Inexact Rounded
853dddiv4094 divide  6215736513855159   6215736513870342  ->  0.9999999999975573  Inexact Rounded
854dddiv4095 divide   248554968534533    248554968551417  ->  0.9999999999320714  Inexact Rounded
855dddiv4096 divide   376314165668645    376314165659755  ->  1.000000000023624  Inexact Rounded
856dddiv4097 divide  5513569249809718   5513569249808906  ->  1.000000000000147  Inexact Rounded
857dddiv4098 divide  3367992242167904   3367992242156228  ->  1.000000000003467  Inexact Rounded
858dddiv4099 divide  6134869538966967   6134869538985986  ->  0.9999999999968999  Inexact Rounded
859
860-- Null tests
861dddiv9998 divide 10  # -> NaN Invalid_operation
862dddiv9999 divide  # 10 -> NaN Invalid_operation
863
864