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