• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1------------------------------------------------------------------------
2-- ddMultiply.decTest -- decDouble multiplication                     --
3-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
4------------------------------------------------------------------------
5-- Please see the document "General Decimal Arithmetic Testcases"     --
6-- at http://www2.hursley.ibm.com/decimal for the description of      --
7-- these testcases.                                                   --
8--                                                                    --
9-- These testcases are experimental ('beta' versions), and they       --
10-- may contain errors.  They are offered on an as-is basis.  In       --
11-- particular, achieving the same results as the tests here is not    --
12-- a guarantee that an implementation complies with any Standard      --
13-- or specification.  The tests are not exhaustive.                   --
14--                                                                    --
15-- Please send comments, suggestions, and corrections to the author:  --
16--   Mike Cowlishaw, IBM Fellow                                       --
17--   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
18--   mfc@uk.ibm.com                                                   --
19------------------------------------------------------------------------
20version: 2.59
21
22-- This set of tests are for decDoubles only; all arguments are
23-- representable in a decDouble
24precision:   16
25maxExponent: 384
26minExponent: -383
27extended:    1
28clamp:       1
29rounding:    half_even
30
31-- sanity checks
32ddmul000 multiply 2      2 -> 4
33ddmul001 multiply 2      3 -> 6
34ddmul002 multiply 5      1 -> 5
35ddmul003 multiply 5      2 -> 10
36ddmul004 multiply 1.20   2 -> 2.40
37ddmul005 multiply 1.20   0 -> 0.00
38ddmul006 multiply 1.20  -2 -> -2.40
39ddmul007 multiply -1.20  2 -> -2.40
40ddmul008 multiply -1.20  0 -> -0.00
41ddmul009 multiply -1.20 -2 -> 2.40
42ddmul010 multiply 5.09 7.1 -> 36.139
43ddmul011 multiply 2.5    4 -> 10.0
44ddmul012 multiply 2.50   4 -> 10.00
45ddmul013 multiply 1.23456789 1.00000000 -> 1.234567890000000 Rounded
46ddmul015 multiply 2.50   4 -> 10.00
47ddmul016 multiply  9.999999999  9.999999999 ->  99.99999998000000 Inexact Rounded
48ddmul017 multiply  9.999999999 -9.999999999 -> -99.99999998000000 Inexact Rounded
49ddmul018 multiply -9.999999999  9.999999999 -> -99.99999998000000 Inexact Rounded
50ddmul019 multiply -9.999999999 -9.999999999 ->  99.99999998000000 Inexact Rounded
51
52-- zeros, etc.
53ddmul021 multiply  0      0     ->  0
54ddmul022 multiply  0     -0     -> -0
55ddmul023 multiply -0      0     -> -0
56ddmul024 multiply -0     -0     ->  0
57ddmul025 multiply -0.0   -0.0   ->  0.00
58ddmul026 multiply -0.0   -0.0   ->  0.00
59ddmul027 multiply -0.0   -0.0   ->  0.00
60ddmul028 multiply -0.0   -0.0   ->  0.00
61ddmul030 multiply  5.00   1E-3  ->  0.00500
62ddmul031 multiply  00.00  0.000 ->  0.00000
63ddmul032 multiply  00.00  0E-3  ->  0.00000     -- rhs is 0
64ddmul033 multiply  0E-3   00.00 ->  0.00000     -- lhs is 0
65ddmul034 multiply -5.00   1E-3  -> -0.00500
66ddmul035 multiply -00.00  0.000 -> -0.00000
67ddmul036 multiply -00.00  0E-3  -> -0.00000     -- rhs is 0
68ddmul037 multiply -0E-3   00.00 -> -0.00000     -- lhs is 0
69ddmul038 multiply  5.00  -1E-3  -> -0.00500
70ddmul039 multiply  00.00 -0.000 -> -0.00000
71ddmul040 multiply  00.00 -0E-3  -> -0.00000     -- rhs is 0
72ddmul041 multiply  0E-3  -00.00 -> -0.00000     -- lhs is 0
73ddmul042 multiply -5.00  -1E-3  ->  0.00500
74ddmul043 multiply -00.00 -0.000 ->  0.00000
75ddmul044 multiply -00.00 -0E-3  ->  0.00000     -- rhs is 0
76ddmul045 multiply -0E-3  -00.00 ->  0.00000     -- lhs is 0
77
78-- examples from decarith
79ddmul050 multiply 1.20 3        -> 3.60
80ddmul051 multiply 7    3        -> 21
81ddmul052 multiply 0.9  0.8      -> 0.72
82ddmul053 multiply 0.9  -0       -> -0.0
83ddmul054 multiply 654321 654321 -> 428135971041
84
85ddmul060 multiply 123.45 1e7  ->  1.2345E+9
86ddmul061 multiply 123.45 1e8  ->  1.2345E+10
87ddmul062 multiply 123.45 1e+9 ->  1.2345E+11
88ddmul063 multiply 123.45 1e10 ->  1.2345E+12
89ddmul064 multiply 123.45 1e11 ->  1.2345E+13
90ddmul065 multiply 123.45 1e12 ->  1.2345E+14
91ddmul066 multiply 123.45 1e13 ->  1.2345E+15
92
93
94-- test some intermediate lengths
95--                    1234567890123456
96ddmul080 multiply 0.1 1230123456456789     -> 123012345645678.9
97ddmul084 multiply 0.1 1230123456456789     -> 123012345645678.9
98ddmul090 multiply 1230123456456789     0.1 -> 123012345645678.9
99ddmul094 multiply 1230123456456789     0.1 -> 123012345645678.9
100
101-- test some more edge cases and carries
102ddmul101 multiply 9 9   -> 81
103ddmul102 multiply 9 90   -> 810
104ddmul103 multiply 9 900   -> 8100
105ddmul104 multiply 9 9000   -> 81000
106ddmul105 multiply 9 90000   -> 810000
107ddmul106 multiply 9 900000   -> 8100000
108ddmul107 multiply 9 9000000   -> 81000000
109ddmul108 multiply 9 90000000   -> 810000000
110ddmul109 multiply 9 900000000   -> 8100000000
111ddmul110 multiply 9 9000000000   -> 81000000000
112ddmul111 multiply 9 90000000000   -> 810000000000
113ddmul112 multiply 9 900000000000   -> 8100000000000
114ddmul113 multiply 9 9000000000000   -> 81000000000000
115ddmul114 multiply 9 90000000000000   -> 810000000000000
116ddmul115 multiply 9 900000000000000   -> 8100000000000000
117--ddmul116 multiply 9 9000000000000000   -> 81000000000000000
118--ddmul117 multiply 9 90000000000000000   -> 810000000000000000
119--ddmul118 multiply 9 900000000000000000   -> 8100000000000000000
120--ddmul119 multiply 9 9000000000000000000   -> 81000000000000000000
121--ddmul120 multiply 9 90000000000000000000   -> 810000000000000000000
122--ddmul121 multiply 9 900000000000000000000   -> 8100000000000000000000
123--ddmul122 multiply 9 9000000000000000000000   -> 81000000000000000000000
124--ddmul123 multiply 9 90000000000000000000000   -> 810000000000000000000000
125-- test some more edge cases without carries
126ddmul131 multiply 3 3   -> 9
127ddmul132 multiply 3 30   -> 90
128ddmul133 multiply 3 300   -> 900
129ddmul134 multiply 3 3000   -> 9000
130ddmul135 multiply 3 30000   -> 90000
131ddmul136 multiply 3 300000   -> 900000
132ddmul137 multiply 3 3000000   -> 9000000
133ddmul138 multiply 3 30000000   -> 90000000
134ddmul139 multiply 3 300000000   -> 900000000
135ddmul140 multiply 3 3000000000   -> 9000000000
136ddmul141 multiply 3 30000000000   -> 90000000000
137ddmul142 multiply 3 300000000000   -> 900000000000
138ddmul143 multiply 3 3000000000000   -> 9000000000000
139ddmul144 multiply 3 30000000000000   -> 90000000000000
140ddmul145 multiply 3 300000000000000   -> 900000000000000
141
142-- test some edge cases with exact rounding
143ddmul301 multiply 9 9   -> 81
144ddmul302 multiply 9 90   -> 810
145ddmul303 multiply 9 900   -> 8100
146ddmul304 multiply 9 9000   -> 81000
147ddmul305 multiply 9 90000   -> 810000
148ddmul306 multiply 9 900000   -> 8100000
149ddmul307 multiply 9 9000000   -> 81000000
150ddmul308 multiply 9 90000000   -> 810000000
151ddmul309 multiply 9 900000000   -> 8100000000
152ddmul310 multiply 9 9000000000   -> 81000000000
153ddmul311 multiply 9 90000000000   -> 810000000000
154ddmul312 multiply 9 900000000000   -> 8100000000000
155ddmul313 multiply 9 9000000000000   -> 81000000000000
156ddmul314 multiply 9 90000000000000   -> 810000000000000
157ddmul315 multiply 9 900000000000000   -> 8100000000000000
158ddmul316 multiply 9 9000000000000000   -> 8.100000000000000E+16  Rounded
159ddmul317 multiply 90 9000000000000000   -> 8.100000000000000E+17  Rounded
160ddmul318 multiply 900 9000000000000000   -> 8.100000000000000E+18  Rounded
161ddmul319 multiply 9000 9000000000000000   -> 8.100000000000000E+19  Rounded
162ddmul320 multiply 90000 9000000000000000   -> 8.100000000000000E+20  Rounded
163ddmul321 multiply 900000 9000000000000000   -> 8.100000000000000E+21  Rounded
164ddmul322 multiply 9000000 9000000000000000   -> 8.100000000000000E+22  Rounded
165ddmul323 multiply 90000000 9000000000000000   -> 8.100000000000000E+23  Rounded
166
167-- tryzeros cases
168ddmul504  multiply  0E-260 1000E-260  -> 0E-398 Clamped
169ddmul505  multiply  100E+260 0E+260   -> 0E+369 Clamped
170-- 65K-1 case
171ddmul506 multiply 77.1 850 -> 65535.0
172
173-- mixed with zeros
174ddmul541 multiply  0    -1     -> -0
175ddmul542 multiply -0    -1     ->  0
176ddmul543 multiply  0     1     ->  0
177ddmul544 multiply -0     1     -> -0
178ddmul545 multiply -1     0     -> -0
179ddmul546 multiply -1    -0     ->  0
180ddmul547 multiply  1     0     ->  0
181ddmul548 multiply  1    -0     -> -0
182
183ddmul551 multiply  0.0  -1     -> -0.0
184ddmul552 multiply -0.0  -1     ->  0.0
185ddmul553 multiply  0.0   1     ->  0.0
186ddmul554 multiply -0.0   1     -> -0.0
187ddmul555 multiply -1.0   0     -> -0.0
188ddmul556 multiply -1.0  -0     ->  0.0
189ddmul557 multiply  1.0   0     ->  0.0
190ddmul558 multiply  1.0  -0     -> -0.0
191
192ddmul561 multiply  0    -1.0   -> -0.0
193ddmul562 multiply -0    -1.0   ->  0.0
194ddmul563 multiply  0     1.0   ->  0.0
195ddmul564 multiply -0     1.0   -> -0.0
196ddmul565 multiply -1     0.0   -> -0.0
197ddmul566 multiply -1    -0.0   ->  0.0
198ddmul567 multiply  1     0.0   ->  0.0
199ddmul568 multiply  1    -0.0   -> -0.0
200
201ddmul571 multiply  0.0  -1.0   -> -0.00
202ddmul572 multiply -0.0  -1.0   ->  0.00
203ddmul573 multiply  0.0   1.0   ->  0.00
204ddmul574 multiply -0.0   1.0   -> -0.00
205ddmul575 multiply -1.0   0.0   -> -0.00
206ddmul576 multiply -1.0  -0.0   ->  0.00
207ddmul577 multiply  1.0   0.0   ->  0.00
208ddmul578 multiply  1.0  -0.0   -> -0.00
209
210
211-- Specials
212ddmul580 multiply  Inf  -Inf   -> -Infinity
213ddmul581 multiply  Inf  -1000  -> -Infinity
214ddmul582 multiply  Inf  -1     -> -Infinity
215ddmul583 multiply  Inf  -0     ->  NaN  Invalid_operation
216ddmul584 multiply  Inf   0     ->  NaN  Invalid_operation
217ddmul585 multiply  Inf   1     ->  Infinity
218ddmul586 multiply  Inf   1000  ->  Infinity
219ddmul587 multiply  Inf   Inf   ->  Infinity
220ddmul588 multiply -1000  Inf   -> -Infinity
221ddmul589 multiply -Inf   Inf   -> -Infinity
222ddmul590 multiply -1     Inf   -> -Infinity
223ddmul591 multiply -0     Inf   ->  NaN  Invalid_operation
224ddmul592 multiply  0     Inf   ->  NaN  Invalid_operation
225ddmul593 multiply  1     Inf   ->  Infinity
226ddmul594 multiply  1000  Inf   ->  Infinity
227ddmul595 multiply  Inf   Inf   ->  Infinity
228
229ddmul600 multiply -Inf  -Inf   ->  Infinity
230ddmul601 multiply -Inf  -1000  ->  Infinity
231ddmul602 multiply -Inf  -1     ->  Infinity
232ddmul603 multiply -Inf  -0     ->  NaN  Invalid_operation
233ddmul604 multiply -Inf   0     ->  NaN  Invalid_operation
234ddmul605 multiply -Inf   1     -> -Infinity
235ddmul606 multiply -Inf   1000  -> -Infinity
236ddmul607 multiply -Inf   Inf   -> -Infinity
237ddmul608 multiply -1000  Inf   -> -Infinity
238ddmul609 multiply -Inf  -Inf   ->  Infinity
239ddmul610 multiply -1    -Inf   ->  Infinity
240ddmul611 multiply -0    -Inf   ->  NaN  Invalid_operation
241ddmul612 multiply  0    -Inf   ->  NaN  Invalid_operation
242ddmul613 multiply  1    -Inf   -> -Infinity
243ddmul614 multiply  1000 -Inf   -> -Infinity
244ddmul615 multiply  Inf  -Inf   -> -Infinity
245
246ddmul621 multiply  NaN -Inf    ->  NaN
247ddmul622 multiply  NaN -1000   ->  NaN
248ddmul623 multiply  NaN -1      ->  NaN
249ddmul624 multiply  NaN -0      ->  NaN
250ddmul625 multiply  NaN  0      ->  NaN
251ddmul626 multiply  NaN  1      ->  NaN
252ddmul627 multiply  NaN  1000   ->  NaN
253ddmul628 multiply  NaN  Inf    ->  NaN
254ddmul629 multiply  NaN  NaN    ->  NaN
255ddmul630 multiply -Inf  NaN    ->  NaN
256ddmul631 multiply -1000 NaN    ->  NaN
257ddmul632 multiply -1    NaN    ->  NaN
258ddmul633 multiply -0    NaN    ->  NaN
259ddmul634 multiply  0    NaN    ->  NaN
260ddmul635 multiply  1    NaN    ->  NaN
261ddmul636 multiply  1000 NaN    ->  NaN
262ddmul637 multiply  Inf  NaN    ->  NaN
263
264ddmul641 multiply  sNaN -Inf   ->  NaN  Invalid_operation
265ddmul642 multiply  sNaN -1000  ->  NaN  Invalid_operation
266ddmul643 multiply  sNaN -1     ->  NaN  Invalid_operation
267ddmul644 multiply  sNaN -0     ->  NaN  Invalid_operation
268ddmul645 multiply  sNaN  0     ->  NaN  Invalid_operation
269ddmul646 multiply  sNaN  1     ->  NaN  Invalid_operation
270ddmul647 multiply  sNaN  1000  ->  NaN  Invalid_operation
271ddmul648 multiply  sNaN  NaN   ->  NaN  Invalid_operation
272ddmul649 multiply  sNaN sNaN   ->  NaN  Invalid_operation
273ddmul650 multiply  NaN  sNaN   ->  NaN  Invalid_operation
274ddmul651 multiply -Inf  sNaN   ->  NaN  Invalid_operation
275ddmul652 multiply -1000 sNaN   ->  NaN  Invalid_operation
276ddmul653 multiply -1    sNaN   ->  NaN  Invalid_operation
277ddmul654 multiply -0    sNaN   ->  NaN  Invalid_operation
278ddmul655 multiply  0    sNaN   ->  NaN  Invalid_operation
279ddmul656 multiply  1    sNaN   ->  NaN  Invalid_operation
280ddmul657 multiply  1000 sNaN   ->  NaN  Invalid_operation
281ddmul658 multiply  Inf  sNaN   ->  NaN  Invalid_operation
282ddmul659 multiply  NaN  sNaN   ->  NaN  Invalid_operation
283
284-- propagating NaNs
285ddmul661 multiply  NaN9 -Inf   ->  NaN9
286ddmul662 multiply  NaN8  999   ->  NaN8
287ddmul663 multiply  NaN71 Inf   ->  NaN71
288ddmul664 multiply  NaN6  NaN5  ->  NaN6
289ddmul665 multiply -Inf   NaN4  ->  NaN4
290ddmul666 multiply -999   NaN33 ->  NaN33
291ddmul667 multiply  Inf   NaN2  ->  NaN2
292
293ddmul671 multiply  sNaN99 -Inf    ->  NaN99 Invalid_operation
294ddmul672 multiply  sNaN98 -11     ->  NaN98 Invalid_operation
295ddmul673 multiply  sNaN97  NaN    ->  NaN97 Invalid_operation
296ddmul674 multiply  sNaN16 sNaN94  ->  NaN16 Invalid_operation
297ddmul675 multiply  NaN95  sNaN93  ->  NaN93 Invalid_operation
298ddmul676 multiply -Inf    sNaN92  ->  NaN92 Invalid_operation
299ddmul677 multiply  088    sNaN91  ->  NaN91 Invalid_operation
300ddmul678 multiply  Inf    sNaN90  ->  NaN90 Invalid_operation
301ddmul679 multiply  NaN    sNaN89  ->  NaN89 Invalid_operation
302
303ddmul681 multiply -NaN9 -Inf   -> -NaN9
304ddmul682 multiply -NaN8  999   -> -NaN8
305ddmul683 multiply -NaN71 Inf   -> -NaN71
306ddmul684 multiply -NaN6 -NaN5  -> -NaN6
307ddmul685 multiply -Inf  -NaN4  -> -NaN4
308ddmul686 multiply -999  -NaN33 -> -NaN33
309ddmul687 multiply  Inf  -NaN2  -> -NaN2
310
311ddmul691 multiply -sNaN99 -Inf    -> -NaN99 Invalid_operation
312ddmul692 multiply -sNaN98 -11     -> -NaN98 Invalid_operation
313ddmul693 multiply -sNaN97  NaN    -> -NaN97 Invalid_operation
314ddmul694 multiply -sNaN16 -sNaN94 -> -NaN16 Invalid_operation
315ddmul695 multiply -NaN95  -sNaN93 -> -NaN93 Invalid_operation
316ddmul696 multiply -Inf    -sNaN92 -> -NaN92 Invalid_operation
317ddmul697 multiply  088    -sNaN91 -> -NaN91 Invalid_operation
318ddmul698 multiply  Inf    -sNaN90 -> -NaN90 Invalid_operation
319ddmul699 multiply -NaN    -sNaN89 -> -NaN89 Invalid_operation
320
321ddmul701 multiply -NaN  -Inf   -> -NaN
322ddmul702 multiply -NaN   999   -> -NaN
323ddmul703 multiply -NaN   Inf   -> -NaN
324ddmul704 multiply -NaN  -NaN   -> -NaN
325ddmul705 multiply -Inf  -NaN0  -> -NaN
326ddmul706 multiply -999  -NaN   -> -NaN
327ddmul707 multiply  Inf  -NaN   -> -NaN
328
329ddmul711 multiply -sNaN   -Inf    -> -NaN Invalid_operation
330ddmul712 multiply -sNaN   -11     -> -NaN Invalid_operation
331ddmul713 multiply -sNaN00  NaN    -> -NaN Invalid_operation
332ddmul714 multiply -sNaN   -sNaN   -> -NaN Invalid_operation
333ddmul715 multiply -NaN    -sNaN   -> -NaN Invalid_operation
334ddmul716 multiply -Inf    -sNaN   -> -NaN Invalid_operation
335ddmul717 multiply  088    -sNaN   -> -NaN Invalid_operation
336ddmul718 multiply  Inf    -sNaN   -> -NaN Invalid_operation
337ddmul719 multiply -NaN    -sNaN   -> -NaN Invalid_operation
338
339-- overflow and underflow tests .. note subnormal results
340-- signs
341ddmul751 multiply  1e+277  1e+311 ->  Infinity Overflow Inexact Rounded
342ddmul752 multiply  1e+277 -1e+311 -> -Infinity Overflow Inexact Rounded
343ddmul753 multiply -1e+277  1e+311 -> -Infinity Overflow Inexact Rounded
344ddmul754 multiply -1e+277 -1e+311 ->  Infinity Overflow Inexact Rounded
345ddmul755 multiply  1e-277  1e-311 ->  0E-398 Underflow Subnormal Inexact Rounded Clamped
346ddmul756 multiply  1e-277 -1e-311 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
347ddmul757 multiply -1e-277  1e-311 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
348ddmul758 multiply -1e-277 -1e-311 ->  0E-398 Underflow Subnormal Inexact Rounded Clamped
349
350-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
351ddmul760 multiply 1e-291 1e-101 -> 1E-392 Subnormal
352ddmul761 multiply 1e-291 1e-102 -> 1E-393 Subnormal
353ddmul762 multiply 1e-291 1e-103 -> 1E-394 Subnormal
354ddmul763 multiply 1e-291 1e-104 -> 1E-395 Subnormal
355ddmul764 multiply 1e-291 1e-105 -> 1E-396 Subnormal
356ddmul765 multiply 1e-291 1e-106 -> 1E-397 Subnormal
357ddmul766 multiply 1e-291 1e-107 -> 1E-398 Subnormal
358ddmul767 multiply 1e-291 1e-108 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
359ddmul768 multiply 1e-291 1e-109 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
360ddmul769 multiply 1e-291 1e-110 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
361-- [no equivalent of 'subnormal' for overflow]
362ddmul770 multiply 1e+60 1e+321 -> 1.000000000000E+381  Clamped
363ddmul771 multiply 1e+60 1e+322 -> 1.0000000000000E+382  Clamped
364ddmul772 multiply 1e+60 1e+323 -> 1.00000000000000E+383  Clamped
365ddmul773 multiply 1e+60 1e+324 -> 1.000000000000000E+384  Clamped
366ddmul774 multiply 1e+60 1e+325 -> Infinity Overflow Inexact Rounded
367ddmul775 multiply 1e+60 1e+326 -> Infinity Overflow Inexact Rounded
368ddmul776 multiply 1e+60 1e+327 -> Infinity Overflow Inexact Rounded
369ddmul777 multiply 1e+60 1e+328 -> Infinity Overflow Inexact Rounded
370ddmul778 multiply 1e+60 1e+329 -> Infinity Overflow Inexact Rounded
371ddmul779 multiply 1e+60 1e+330 -> Infinity Overflow Inexact Rounded
372
373ddmul801 multiply  1.0000E-394  1     -> 1.0000E-394 Subnormal
374ddmul802 multiply  1.000E-394   1e-1  -> 1.000E-395  Subnormal
375ddmul803 multiply  1.00E-394    1e-2  -> 1.00E-396   Subnormal
376ddmul804 multiply  1.0E-394     1e-3  -> 1.0E-397    Subnormal
377ddmul805 multiply  1.0E-394     1e-4  -> 1E-398     Subnormal Rounded
378ddmul806 multiply  1.3E-394     1e-4  -> 1E-398     Underflow Subnormal Inexact Rounded
379ddmul807 multiply  1.5E-394     1e-4  -> 2E-398     Underflow Subnormal Inexact Rounded
380ddmul808 multiply  1.7E-394     1e-4  -> 2E-398     Underflow Subnormal Inexact Rounded
381ddmul809 multiply  2.3E-394     1e-4  -> 2E-398     Underflow Subnormal Inexact Rounded
382ddmul810 multiply  2.5E-394     1e-4  -> 2E-398     Underflow Subnormal Inexact Rounded
383ddmul811 multiply  2.7E-394     1e-4  -> 3E-398     Underflow Subnormal Inexact Rounded
384ddmul812 multiply  1.49E-394    1e-4  -> 1E-398     Underflow Subnormal Inexact Rounded
385ddmul813 multiply  1.50E-394    1e-4  -> 2E-398     Underflow Subnormal Inexact Rounded
386ddmul814 multiply  1.51E-394    1e-4  -> 2E-398     Underflow Subnormal Inexact Rounded
387ddmul815 multiply  2.49E-394    1e-4  -> 2E-398     Underflow Subnormal Inexact Rounded
388ddmul816 multiply  2.50E-394    1e-4  -> 2E-398     Underflow Subnormal Inexact Rounded
389ddmul817 multiply  2.51E-394    1e-4  -> 3E-398     Underflow Subnormal Inexact Rounded
390
391ddmul818 multiply  1E-394       1e-4  -> 1E-398     Subnormal
392ddmul819 multiply  3E-394       1e-5  -> 0E-398     Underflow Subnormal Inexact Rounded Clamped
393ddmul820 multiply  5E-394       1e-5  -> 0E-398     Underflow Subnormal Inexact Rounded Clamped
394ddmul821 multiply  7E-394       1e-5  -> 1E-398     Underflow Subnormal Inexact Rounded
395ddmul822 multiply  9E-394       1e-5  -> 1E-398     Underflow Subnormal Inexact Rounded
396ddmul823 multiply  9.9E-394     1e-5  -> 1E-398     Underflow Subnormal Inexact Rounded
397
398ddmul824 multiply  1E-394      -1e-4  -> -1E-398    Subnormal
399ddmul825 multiply  3E-394      -1e-5  -> -0E-398    Underflow Subnormal Inexact Rounded Clamped
400ddmul826 multiply -5E-394       1e-5  -> -0E-398    Underflow Subnormal Inexact Rounded Clamped
401ddmul827 multiply  7E-394      -1e-5  -> -1E-398    Underflow Subnormal Inexact Rounded
402ddmul828 multiply -9E-394       1e-5  -> -1E-398    Underflow Subnormal Inexact Rounded
403ddmul829 multiply  9.9E-394    -1e-5  -> -1E-398    Underflow Subnormal Inexact Rounded
404ddmul830 multiply  3.0E-394    -1e-5  -> -0E-398    Underflow Subnormal Inexact Rounded Clamped
405
406ddmul831 multiply  1.0E-199     1e-200 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
407ddmul832 multiply  1.0E-199     1e-199 -> 1E-398    Subnormal Rounded
408ddmul833 multiply  1.0E-199     1e-198 -> 1.0E-397    Subnormal
409ddmul834 multiply  2.0E-199     2e-198 -> 4.0E-397    Subnormal
410ddmul835 multiply  4.0E-199     4e-198 -> 1.60E-396   Subnormal
411ddmul836 multiply 10.0E-199    10e-198 -> 1.000E-395  Subnormal
412ddmul837 multiply 30.0E-199    30e-198 -> 9.000E-395  Subnormal
413ddmul838 multiply 40.0E-199    40e-188 -> 1.6000E-384 Subnormal
414ddmul839 multiply 40.0E-199    40e-187 -> 1.6000E-383
415ddmul840 multiply 40.0E-199    40e-186 -> 1.6000E-382
416
417-- Long operand overflow may be a different path
418ddmul870 multiply 100  9.999E+383         ->  Infinity Inexact Overflow Rounded
419ddmul871 multiply 100 -9.999E+383     -> -Infinity Inexact Overflow Rounded
420ddmul872 multiply      9.999E+383 100 ->  Infinity Inexact Overflow Rounded
421ddmul873 multiply     -9.999E+383 100 -> -Infinity Inexact Overflow Rounded
422
423-- check for double-rounded subnormals
424ddmul881 multiply  1.2347E-355 1.2347E-40  ->  1.524E-395 Inexact Rounded Subnormal Underflow
425ddmul882 multiply  1.234E-355 1.234E-40    ->  1.523E-395 Inexact Rounded Subnormal Underflow
426ddmul883 multiply  1.23E-355  1.23E-40     ->  1.513E-395 Inexact Rounded Subnormal Underflow
427ddmul884 multiply  1.2E-355   1.2E-40      ->  1.44E-395  Subnormal
428ddmul885 multiply  1.2E-355   1.2E-41      ->  1.44E-396  Subnormal
429ddmul886 multiply  1.2E-355   1.2E-42      ->  1.4E-397   Subnormal Inexact Rounded Underflow
430ddmul887 multiply  1.2E-355   1.3E-42      ->  1.6E-397   Subnormal Inexact Rounded Underflow
431ddmul888 multiply  1.3E-355   1.3E-42      ->  1.7E-397   Subnormal Inexact Rounded Underflow
432ddmul889 multiply  1.3E-355   1.3E-43      ->    2E-398   Subnormal Inexact Rounded Underflow
433ddmul890 multiply  1.3E-356   1.3E-43      ->    0E-398   Clamped Subnormal Inexact Rounded Underflow
434
435ddmul891 multiply  1.2345E-39   1.234E-355 ->  1.5234E-394 Inexact Rounded Subnormal Underflow
436ddmul892 multiply  1.23456E-39  1.234E-355 ->  1.5234E-394 Inexact Rounded Subnormal Underflow
437ddmul893 multiply  1.2345E-40   1.234E-355 ->  1.523E-395  Inexact Rounded Subnormal Underflow
438ddmul894 multiply  1.23456E-40  1.234E-355 ->  1.523E-395  Inexact Rounded Subnormal Underflow
439ddmul895 multiply  1.2345E-41   1.234E-355 ->  1.52E-396   Inexact Rounded Subnormal Underflow
440ddmul896 multiply  1.23456E-41  1.234E-355 ->  1.52E-396   Inexact Rounded Subnormal Underflow
441
442-- Now explore the case where we get a normal result with Underflow
443--                                                        1 234567890123456
444ddmul900 multiply  0.3000000000E-191 0.3000000000E-191 -> 9.00000000000000E-384 Subnormal Rounded
445ddmul901 multiply  0.3000000001E-191 0.3000000001E-191 -> 9.00000000600000E-384 Underflow Inexact Subnormal Rounded
446ddmul902 multiply  9.999999999999999E-383  0.0999999999999    -> 9.99999999999000E-384 Underflow Inexact Subnormal Rounded
447ddmul903 multiply  9.999999999999999E-383  0.09999999999999   -> 9.99999999999900E-384 Underflow Inexact Subnormal Rounded
448ddmul904 multiply  9.999999999999999E-383  0.099999999999999  -> 9.99999999999990E-384 Underflow Inexact Subnormal Rounded
449ddmul905 multiply  9.999999999999999E-383  0.0999999999999999 -> 9.99999999999999E-384 Underflow Inexact Subnormal Rounded
450-- The next rounds to Nmin (b**emin); this is the distinguishing case
451-- for detecting tininess (before or after rounding) -- if after
452-- rounding then the result would be the same, but the Underflow flag
453-- would not be set
454ddmul906 multiply  9.999999999999999E-383  0.09999999999999999     -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded
455-- prove those operands were exact
456ddmul907 multiply  9.999999999999999E-383  1                       -> 9.999999999999999E-383
457ddmul908 multiply                       1  0.09999999999999999     -> 0.09999999999999999
458
459-- reducing tiniest
460ddmul910 multiply 1e-398 0.99 -> 1E-398 Subnormal Inexact Rounded Underflow
461ddmul911 multiply 1e-398 0.75 -> 1E-398 Subnormal Inexact Rounded Underflow
462ddmul912 multiply 1e-398 0.5  -> 0E-398 Subnormal Inexact Rounded Underflow Clamped
463ddmul913 multiply 1e-398 0.25 -> 0E-398 Subnormal Inexact Rounded Underflow Clamped
464ddmul914 multiply 1e-398 0.01 -> 0E-398 Subnormal Inexact Rounded Underflow Clamped
465
466-- hugest
467ddmul920 multiply  9999999999999999 9999999999999999 -> 9.999999999999998E+31 Inexact Rounded
468
469-- power-of-ten edge cases
470ddmul1001 multiply  1      10               -> 10
471ddmul1002 multiply  1      100              -> 100
472ddmul1003 multiply  1      1000             -> 1000
473ddmul1004 multiply  1      10000            -> 10000
474ddmul1005 multiply  1      100000           -> 100000
475ddmul1006 multiply  1      1000000          -> 1000000
476ddmul1007 multiply  1      10000000         -> 10000000
477ddmul1008 multiply  1      100000000        -> 100000000
478ddmul1009 multiply  1      1000000000       -> 1000000000
479ddmul1010 multiply  1      10000000000      -> 10000000000
480ddmul1011 multiply  1      100000000000     -> 100000000000
481ddmul1012 multiply  1      1000000000000    -> 1000000000000
482ddmul1013 multiply  1      10000000000000   -> 10000000000000
483ddmul1014 multiply  1      100000000000000  -> 100000000000000
484ddmul1015 multiply  1      1000000000000000 -> 1000000000000000
485ddmul1021 multiply  10     1                -> 10
486ddmul1022 multiply  10     10               -> 100
487ddmul1023 multiply  10     100              -> 1000
488ddmul1024 multiply  10     1000             -> 10000
489ddmul1025 multiply  10     10000            -> 100000
490ddmul1026 multiply  10     100000           -> 1000000
491ddmul1027 multiply  10     1000000          -> 10000000
492ddmul1028 multiply  10     10000000         -> 100000000
493ddmul1029 multiply  10     100000000        -> 1000000000
494ddmul1030 multiply  10     1000000000       -> 10000000000
495ddmul1031 multiply  10     10000000000      -> 100000000000
496ddmul1032 multiply  10     100000000000     -> 1000000000000
497ddmul1033 multiply  10     1000000000000    -> 10000000000000
498ddmul1034 multiply  10     10000000000000   -> 100000000000000
499ddmul1035 multiply  10     100000000000000  -> 1000000000000000
500ddmul1041 multiply  100    0.1              -> 10.0
501ddmul1042 multiply  100    1                -> 100
502ddmul1043 multiply  100    10               -> 1000
503ddmul1044 multiply  100    100              -> 10000
504ddmul1045 multiply  100    1000             -> 100000
505ddmul1046 multiply  100    10000            -> 1000000
506ddmul1047 multiply  100    100000           -> 10000000
507ddmul1048 multiply  100    1000000          -> 100000000
508ddmul1049 multiply  100    10000000         -> 1000000000
509ddmul1050 multiply  100    100000000        -> 10000000000
510ddmul1051 multiply  100    1000000000       -> 100000000000
511ddmul1052 multiply  100    10000000000      -> 1000000000000
512ddmul1053 multiply  100    100000000000     -> 10000000000000
513ddmul1054 multiply  100    1000000000000    -> 100000000000000
514ddmul1055 multiply  100    10000000000000   -> 1000000000000000
515ddmul1061 multiply  1000   0.01             -> 10.00
516ddmul1062 multiply  1000   0.1              -> 100.0
517ddmul1063 multiply  1000   1                -> 1000
518ddmul1064 multiply  1000   10               -> 10000
519ddmul1065 multiply  1000   100              -> 100000
520ddmul1066 multiply  1000   1000             -> 1000000
521ddmul1067 multiply  1000   10000            -> 10000000
522ddmul1068 multiply  1000   100000           -> 100000000
523ddmul1069 multiply  1000   1000000          -> 1000000000
524ddmul1070 multiply  1000   10000000         -> 10000000000
525ddmul1071 multiply  1000   100000000        -> 100000000000
526ddmul1072 multiply  1000   1000000000       -> 1000000000000
527ddmul1073 multiply  1000   10000000000      -> 10000000000000
528ddmul1074 multiply  1000   100000000000     -> 100000000000000
529ddmul1075 multiply  1000   1000000000000    -> 1000000000000000
530ddmul1081 multiply  10000  0.001            -> 10.000
531ddmul1082 multiply  10000  0.01             -> 100.00
532ddmul1083 multiply  10000  0.1              -> 1000.0
533ddmul1084 multiply  10000  1                -> 10000
534ddmul1085 multiply  10000  10               -> 100000
535ddmul1086 multiply  10000  100              -> 1000000
536ddmul1087 multiply  10000  1000             -> 10000000
537ddmul1088 multiply  10000  10000            -> 100000000
538ddmul1089 multiply  10000  100000           -> 1000000000
539ddmul1090 multiply  10000  1000000          -> 10000000000
540ddmul1091 multiply  10000  10000000         -> 100000000000
541ddmul1092 multiply  10000  100000000        -> 1000000000000
542ddmul1093 multiply  10000  1000000000       -> 10000000000000
543ddmul1094 multiply  10000  10000000000      -> 100000000000000
544ddmul1095 multiply  10000  100000000000     -> 1000000000000000
545
546ddmul1097 multiply  10000   99999999999     ->  999999999990000
547ddmul1098 multiply  10000   99999999999     ->  999999999990000
548
549
550-- Null tests
551ddmul9990 multiply 10  # -> NaN Invalid_operation
552ddmul9991 multiply  # 10 -> NaN Invalid_operation
553
554