PageRenderTime 354ms CodeModel.GetById 155ms app.highlight 9ms RepoModel.GetById 178ms app.codeStats 0ms

/Lib/test/decimaltestdata/ddDivide.decTest

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