ddMultiply.decTest 28 KB

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