multiply.decTest 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  1. ------------------------------------------------------------------------
  2. -- multiply.decTest -- decimal 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. extended: 1
  22. precision: 9
  23. rounding: half_up
  24. maxExponent: 384
  25. minexponent: -383
  26. -- sanity checks (as base, above)
  27. mulx000 multiply 2 2 -> 4
  28. mulx001 multiply 2 3 -> 6
  29. mulx002 multiply 5 1 -> 5
  30. mulx003 multiply 5 2 -> 10
  31. mulx004 multiply 1.20 2 -> 2.40
  32. mulx005 multiply 1.20 0 -> 0.00
  33. mulx006 multiply 1.20 -2 -> -2.40
  34. mulx007 multiply -1.20 2 -> -2.40
  35. mulx008 multiply -1.20 0 -> -0.00
  36. mulx009 multiply -1.20 -2 -> 2.40
  37. mulx010 multiply 5.09 7.1 -> 36.139
  38. mulx011 multiply 2.5 4 -> 10.0
  39. mulx012 multiply 2.50 4 -> 10.00
  40. mulx013 multiply 1.23456789 1.00000000 -> 1.23456789 Rounded
  41. mulx014 multiply 9.999999999 9.999999999 -> 100.000000 Inexact Rounded
  42. mulx015 multiply 2.50 4 -> 10.00
  43. precision: 6
  44. mulx016 multiply 2.50 4 -> 10.00
  45. mulx017 multiply 9.999999999 9.999999999 -> 100.000 Inexact Rounded
  46. mulx018 multiply 9.999999999 -9.999999999 -> -100.000 Inexact Rounded
  47. mulx019 multiply -9.999999999 9.999999999 -> -100.000 Inexact Rounded
  48. mulx020 multiply -9.999999999 -9.999999999 -> 100.000 Inexact Rounded
  49. -- 1999.12.21: next one is a edge case if intermediate longs are used
  50. precision: 15
  51. mulx059 multiply 999999999999 9765625 -> 9.76562499999023E+18 Inexact Rounded
  52. precision: 30
  53. mulx160 multiply 999999999999 9765625 -> 9765624999990234375
  54. precision: 9
  55. -----
  56. -- zeros, etc.
  57. mulx021 multiply 0 0 -> 0
  58. mulx022 multiply 0 -0 -> -0
  59. mulx023 multiply -0 0 -> -0
  60. mulx024 multiply -0 -0 -> 0
  61. mulx025 multiply -0.0 -0.0 -> 0.00
  62. mulx026 multiply -0.0 -0.0 -> 0.00
  63. mulx027 multiply -0.0 -0.0 -> 0.00
  64. mulx028 multiply -0.0 -0.0 -> 0.00
  65. mulx030 multiply 5.00 1E-3 -> 0.00500
  66. mulx031 multiply 00.00 0.000 -> 0.00000
  67. mulx032 multiply 00.00 0E-3 -> 0.00000 -- rhs is 0
  68. mulx033 multiply 0E-3 00.00 -> 0.00000 -- lhs is 0
  69. mulx034 multiply -5.00 1E-3 -> -0.00500
  70. mulx035 multiply -00.00 0.000 -> -0.00000
  71. mulx036 multiply -00.00 0E-3 -> -0.00000 -- rhs is 0
  72. mulx037 multiply -0E-3 00.00 -> -0.00000 -- lhs is 0
  73. mulx038 multiply 5.00 -1E-3 -> -0.00500
  74. mulx039 multiply 00.00 -0.000 -> -0.00000
  75. mulx040 multiply 00.00 -0E-3 -> -0.00000 -- rhs is 0
  76. mulx041 multiply 0E-3 -00.00 -> -0.00000 -- lhs is 0
  77. mulx042 multiply -5.00 -1E-3 -> 0.00500
  78. mulx043 multiply -00.00 -0.000 -> 0.00000
  79. mulx044 multiply -00.00 -0E-3 -> 0.00000 -- rhs is 0
  80. mulx045 multiply -0E-3 -00.00 -> 0.00000 -- lhs is 0
  81. -- examples from decarith
  82. mulx050 multiply 1.20 3 -> 3.60
  83. mulx051 multiply 7 3 -> 21
  84. mulx052 multiply 0.9 0.8 -> 0.72
  85. mulx053 multiply 0.9 -0 -> -0.0
  86. mulx054 multiply 654321 654321 -> 4.28135971E+11 Inexact Rounded
  87. mulx060 multiply 123.45 1e7 -> 1.2345E+9
  88. mulx061 multiply 123.45 1e8 -> 1.2345E+10
  89. mulx062 multiply 123.45 1e+9 -> 1.2345E+11
  90. mulx063 multiply 123.45 1e10 -> 1.2345E+12
  91. mulx064 multiply 123.45 1e11 -> 1.2345E+13
  92. mulx065 multiply 123.45 1e12 -> 1.2345E+14
  93. mulx066 multiply 123.45 1e13 -> 1.2345E+15
  94. -- test some intermediate lengths
  95. precision: 9
  96. mulx080 multiply 0.1 123456789 -> 12345678.9
  97. mulx081 multiply 0.1 1234567891 -> 123456789 Inexact Rounded
  98. mulx082 multiply 0.1 12345678912 -> 1.23456789E+9 Inexact Rounded
  99. mulx083 multiply 0.1 12345678912345 -> 1.23456789E+12 Inexact Rounded
  100. mulx084 multiply 0.1 123456789 -> 12345678.9
  101. precision: 8
  102. mulx085 multiply 0.1 12345678912 -> 1.2345679E+9 Inexact Rounded
  103. mulx086 multiply 0.1 12345678912345 -> 1.2345679E+12 Inexact Rounded
  104. precision: 7
  105. mulx087 multiply 0.1 12345678912 -> 1.234568E+9 Inexact Rounded
  106. mulx088 multiply 0.1 12345678912345 -> 1.234568E+12 Inexact Rounded
  107. precision: 9
  108. mulx090 multiply 123456789 0.1 -> 12345678.9
  109. mulx091 multiply 1234567891 0.1 -> 123456789 Inexact Rounded
  110. mulx092 multiply 12345678912 0.1 -> 1.23456789E+9 Inexact Rounded
  111. mulx093 multiply 12345678912345 0.1 -> 1.23456789E+12 Inexact Rounded
  112. mulx094 multiply 123456789 0.1 -> 12345678.9
  113. precision: 8
  114. mulx095 multiply 12345678912 0.1 -> 1.2345679E+9 Inexact Rounded
  115. mulx096 multiply 12345678912345 0.1 -> 1.2345679E+12 Inexact Rounded
  116. precision: 7
  117. mulx097 multiply 12345678912 0.1 -> 1.234568E+9 Inexact Rounded
  118. mulx098 multiply 12345678912345 0.1 -> 1.234568E+12 Inexact Rounded
  119. -- test some more edge cases and carries
  120. maxexponent: 9999
  121. minexponent: -9999
  122. precision: 33
  123. mulx101 multiply 9 9 -> 81
  124. mulx102 multiply 9 90 -> 810
  125. mulx103 multiply 9 900 -> 8100
  126. mulx104 multiply 9 9000 -> 81000
  127. mulx105 multiply 9 90000 -> 810000
  128. mulx106 multiply 9 900000 -> 8100000
  129. mulx107 multiply 9 9000000 -> 81000000
  130. mulx108 multiply 9 90000000 -> 810000000
  131. mulx109 multiply 9 900000000 -> 8100000000
  132. mulx110 multiply 9 9000000000 -> 81000000000
  133. mulx111 multiply 9 90000000000 -> 810000000000
  134. mulx112 multiply 9 900000000000 -> 8100000000000
  135. mulx113 multiply 9 9000000000000 -> 81000000000000
  136. mulx114 multiply 9 90000000000000 -> 810000000000000
  137. mulx115 multiply 9 900000000000000 -> 8100000000000000
  138. mulx116 multiply 9 9000000000000000 -> 81000000000000000
  139. mulx117 multiply 9 90000000000000000 -> 810000000000000000
  140. mulx118 multiply 9 900000000000000000 -> 8100000000000000000
  141. mulx119 multiply 9 9000000000000000000 -> 81000000000000000000
  142. mulx120 multiply 9 90000000000000000000 -> 810000000000000000000
  143. mulx121 multiply 9 900000000000000000000 -> 8100000000000000000000
  144. mulx122 multiply 9 9000000000000000000000 -> 81000000000000000000000
  145. mulx123 multiply 9 90000000000000000000000 -> 810000000000000000000000
  146. -- test some more edge cases without carries
  147. mulx131 multiply 3 3 -> 9
  148. mulx132 multiply 3 30 -> 90
  149. mulx133 multiply 3 300 -> 900
  150. mulx134 multiply 3 3000 -> 9000
  151. mulx135 multiply 3 30000 -> 90000
  152. mulx136 multiply 3 300000 -> 900000
  153. mulx137 multiply 3 3000000 -> 9000000
  154. mulx138 multiply 3 30000000 -> 90000000
  155. mulx139 multiply 3 300000000 -> 900000000
  156. mulx140 multiply 3 3000000000 -> 9000000000
  157. mulx141 multiply 3 30000000000 -> 90000000000
  158. mulx142 multiply 3 300000000000 -> 900000000000
  159. mulx143 multiply 3 3000000000000 -> 9000000000000
  160. mulx144 multiply 3 30000000000000 -> 90000000000000
  161. mulx145 multiply 3 300000000000000 -> 900000000000000
  162. mulx146 multiply 3 3000000000000000 -> 9000000000000000
  163. mulx147 multiply 3 30000000000000000 -> 90000000000000000
  164. mulx148 multiply 3 300000000000000000 -> 900000000000000000
  165. mulx149 multiply 3 3000000000000000000 -> 9000000000000000000
  166. mulx150 multiply 3 30000000000000000000 -> 90000000000000000000
  167. mulx151 multiply 3 300000000000000000000 -> 900000000000000000000
  168. mulx152 multiply 3 3000000000000000000000 -> 9000000000000000000000
  169. mulx153 multiply 3 30000000000000000000000 -> 90000000000000000000000
  170. maxexponent: 999999999
  171. minexponent: -999999999
  172. precision: 9
  173. -- test some cases that are close to exponent overflow/underflow
  174. mulx170 multiply 1 9e999999999 -> 9E+999999999
  175. mulx171 multiply 1 9.9e999999999 -> 9.9E+999999999
  176. mulx172 multiply 1 9.99e999999999 -> 9.99E+999999999
  177. mulx173 multiply 9e999999999 1 -> 9E+999999999
  178. mulx174 multiply 9.9e999999999 1 -> 9.9E+999999999
  179. mulx176 multiply 9.99e999999999 1 -> 9.99E+999999999
  180. mulx177 multiply 1 9.99999999e999999999 -> 9.99999999E+999999999
  181. mulx178 multiply 9.99999999e999999999 1 -> 9.99999999E+999999999
  182. mulx180 multiply 0.1 9e-999999998 -> 9E-999999999
  183. mulx181 multiply 0.1 99e-999999998 -> 9.9E-999999998
  184. mulx182 multiply 0.1 999e-999999998 -> 9.99E-999999997
  185. mulx183 multiply 0.1 9e-999999998 -> 9E-999999999
  186. mulx184 multiply 0.1 99e-999999998 -> 9.9E-999999998
  187. mulx185 multiply 0.1 999e-999999998 -> 9.99E-999999997
  188. mulx186 multiply 0.1 999e-999999997 -> 9.99E-999999996
  189. mulx187 multiply 0.1 9999e-999999997 -> 9.999E-999999995
  190. mulx188 multiply 0.1 99999e-999999997 -> 9.9999E-999999994
  191. mulx190 multiply 1 9e-999999998 -> 9E-999999998
  192. mulx191 multiply 1 99e-999999998 -> 9.9E-999999997
  193. mulx192 multiply 1 999e-999999998 -> 9.99E-999999996
  194. mulx193 multiply 9e-999999998 1 -> 9E-999999998
  195. mulx194 multiply 99e-999999998 1 -> 9.9E-999999997
  196. mulx195 multiply 999e-999999998 1 -> 9.99E-999999996
  197. mulx196 multiply 1e-599999999 1e-400000000 -> 1E-999999999
  198. mulx197 multiply 1e-600000000 1e-399999999 -> 1E-999999999
  199. mulx198 multiply 1.2e-599999999 1.2e-400000000 -> 1.44E-999999999
  200. mulx199 multiply 1.2e-600000000 1.2e-399999999 -> 1.44E-999999999
  201. mulx201 multiply 1e599999999 1e400000000 -> 1E+999999999
  202. mulx202 multiply 1e600000000 1e399999999 -> 1E+999999999
  203. mulx203 multiply 1.2e599999999 1.2e400000000 -> 1.44E+999999999
  204. mulx204 multiply 1.2e600000000 1.2e399999999 -> 1.44E+999999999
  205. -- long operand triangle
  206. precision: 33
  207. mulx246 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.290801193369671916511992830 Inexact Rounded
  208. precision: 32
  209. mulx247 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.29080119336967191651199283 Inexact Rounded
  210. precision: 31
  211. mulx248 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.2908011933696719165119928 Inexact Rounded
  212. precision: 30
  213. mulx249 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.290801193369671916511993 Inexact Rounded
  214. precision: 29
  215. mulx250 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.29080119336967191651199 Inexact Rounded
  216. precision: 28
  217. mulx251 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.2908011933696719165120 Inexact Rounded
  218. precision: 27
  219. mulx252 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.290801193369671916512 Inexact Rounded
  220. precision: 26
  221. mulx253 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.29080119336967191651 Inexact Rounded
  222. precision: 25
  223. mulx254 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.2908011933696719165 Inexact Rounded
  224. precision: 24
  225. mulx255 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.290801193369671917 Inexact Rounded
  226. precision: 23
  227. mulx256 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.29080119336967192 Inexact Rounded
  228. precision: 22
  229. mulx257 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.2908011933696719 Inexact Rounded
  230. precision: 21
  231. mulx258 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.290801193369672 Inexact Rounded
  232. precision: 20
  233. mulx259 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.29080119336967 Inexact Rounded
  234. precision: 19
  235. mulx260 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.2908011933697 Inexact Rounded
  236. precision: 18
  237. mulx261 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.290801193370 Inexact Rounded
  238. precision: 17
  239. mulx262 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.29080119337 Inexact Rounded
  240. precision: 16
  241. mulx263 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.2908011934 Inexact Rounded
  242. precision: 15
  243. mulx264 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.290801193 Inexact Rounded
  244. precision: 14
  245. mulx265 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.29080119 Inexact Rounded
  246. precision: 13
  247. mulx266 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.2908012 Inexact Rounded
  248. precision: 12
  249. mulx267 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.290801 Inexact Rounded
  250. precision: 11
  251. mulx268 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.29080 Inexact Rounded
  252. precision: 10
  253. mulx269 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.2908 Inexact Rounded
  254. precision: 9
  255. mulx270 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.291 Inexact Rounded
  256. precision: 8
  257. mulx271 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.29 Inexact Rounded
  258. precision: 7
  259. mulx272 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433.3 Inexact Rounded
  260. precision: 6
  261. mulx273 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 145433 Inexact Rounded
  262. precision: 5
  263. mulx274 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 1.4543E+5 Inexact Rounded
  264. precision: 4
  265. mulx275 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 1.454E+5 Inexact Rounded
  266. precision: 3
  267. mulx276 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 1.45E+5 Inexact Rounded
  268. precision: 2
  269. mulx277 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 1.5E+5 Inexact Rounded
  270. precision: 1
  271. mulx278 multiply 30269.587755640502150977251770554 4.8046009735990873395936309640543 -> 1E+5 Inexact Rounded
  272. -- test some edge cases with exact rounding
  273. maxexponent: 9999
  274. minexponent: -9999
  275. precision: 9
  276. mulx301 multiply 9 9 -> 81
  277. mulx302 multiply 9 90 -> 810
  278. mulx303 multiply 9 900 -> 8100
  279. mulx304 multiply 9 9000 -> 81000
  280. mulx305 multiply 9 90000 -> 810000
  281. mulx306 multiply 9 900000 -> 8100000
  282. mulx307 multiply 9 9000000 -> 81000000
  283. mulx308 multiply 9 90000000 -> 810000000
  284. mulx309 multiply 9 900000000 -> 8.10000000E+9 Rounded
  285. mulx310 multiply 9 9000000000 -> 8.10000000E+10 Rounded
  286. mulx311 multiply 9 90000000000 -> 8.10000000E+11 Rounded
  287. mulx312 multiply 9 900000000000 -> 8.10000000E+12 Rounded
  288. mulx313 multiply 9 9000000000000 -> 8.10000000E+13 Rounded
  289. mulx314 multiply 9 90000000000000 -> 8.10000000E+14 Rounded
  290. mulx315 multiply 9 900000000000000 -> 8.10000000E+15 Rounded
  291. mulx316 multiply 9 9000000000000000 -> 8.10000000E+16 Rounded
  292. mulx317 multiply 9 90000000000000000 -> 8.10000000E+17 Rounded
  293. mulx318 multiply 9 900000000000000000 -> 8.10000000E+18 Rounded
  294. mulx319 multiply 9 9000000000000000000 -> 8.10000000E+19 Rounded
  295. mulx320 multiply 9 90000000000000000000 -> 8.10000000E+20 Rounded
  296. mulx321 multiply 9 900000000000000000000 -> 8.10000000E+21 Rounded
  297. mulx322 multiply 9 9000000000000000000000 -> 8.10000000E+22 Rounded
  298. mulx323 multiply 9 90000000000000000000000 -> 8.10000000E+23 Rounded
  299. -- fastpath breakers
  300. precision: 29
  301. mulx330 multiply 1.491824697641270317824852952837224 1.105170918075647624811707826490246514675628614562883537345747603 -> 1.6487212707001281468486507878 Inexact Rounded
  302. precision: 55
  303. mulx331 multiply 0.8958341352965282506768545828765117803873717284891040428 0.8958341352965282506768545828765117803873717284891040428 -> 0.8025187979624784829842553829934069955890983696752228299 Inexact Rounded
  304. -- tryzeros cases
  305. precision: 7
  306. rounding: half_up
  307. maxExponent: 92
  308. minexponent: -92
  309. mulx504 multiply 0E-60 1000E-60 -> 0E-98 Clamped
  310. mulx505 multiply 100E+60 0E+60 -> 0E+92 Clamped
  311. -- mixed with zeros
  312. maxexponent: 999999999
  313. minexponent: -999999999
  314. precision: 9
  315. mulx541 multiply 0 -1 -> -0
  316. mulx542 multiply -0 -1 -> 0
  317. mulx543 multiply 0 1 -> 0
  318. mulx544 multiply -0 1 -> -0
  319. mulx545 multiply -1 0 -> -0
  320. mulx546 multiply -1 -0 -> 0
  321. mulx547 multiply 1 0 -> 0
  322. mulx548 multiply 1 -0 -> -0
  323. mulx551 multiply 0.0 -1 -> -0.0
  324. mulx552 multiply -0.0 -1 -> 0.0
  325. mulx553 multiply 0.0 1 -> 0.0
  326. mulx554 multiply -0.0 1 -> -0.0
  327. mulx555 multiply -1.0 0 -> -0.0
  328. mulx556 multiply -1.0 -0 -> 0.0
  329. mulx557 multiply 1.0 0 -> 0.0
  330. mulx558 multiply 1.0 -0 -> -0.0
  331. mulx561 multiply 0 -1.0 -> -0.0
  332. mulx562 multiply -0 -1.0 -> 0.0
  333. mulx563 multiply 0 1.0 -> 0.0
  334. mulx564 multiply -0 1.0 -> -0.0
  335. mulx565 multiply -1 0.0 -> -0.0
  336. mulx566 multiply -1 -0.0 -> 0.0
  337. mulx567 multiply 1 0.0 -> 0.0
  338. mulx568 multiply 1 -0.0 -> -0.0
  339. mulx571 multiply 0.0 -1.0 -> -0.00
  340. mulx572 multiply -0.0 -1.0 -> 0.00
  341. mulx573 multiply 0.0 1.0 -> 0.00
  342. mulx574 multiply -0.0 1.0 -> -0.00
  343. mulx575 multiply -1.0 0.0 -> -0.00
  344. mulx576 multiply -1.0 -0.0 -> 0.00
  345. mulx577 multiply 1.0 0.0 -> 0.00
  346. mulx578 multiply 1.0 -0.0 -> -0.00
  347. -- Specials
  348. mulx580 multiply Inf -Inf -> -Infinity
  349. mulx581 multiply Inf -1000 -> -Infinity
  350. mulx582 multiply Inf -1 -> -Infinity
  351. mulx583 multiply Inf -0 -> NaN Invalid_operation
  352. mulx584 multiply Inf 0 -> NaN Invalid_operation
  353. mulx585 multiply Inf 1 -> Infinity
  354. mulx586 multiply Inf 1000 -> Infinity
  355. mulx587 multiply Inf Inf -> Infinity
  356. mulx588 multiply -1000 Inf -> -Infinity
  357. mulx589 multiply -Inf Inf -> -Infinity
  358. mulx590 multiply -1 Inf -> -Infinity
  359. mulx591 multiply -0 Inf -> NaN Invalid_operation
  360. mulx592 multiply 0 Inf -> NaN Invalid_operation
  361. mulx593 multiply 1 Inf -> Infinity
  362. mulx594 multiply 1000 Inf -> Infinity
  363. mulx595 multiply Inf Inf -> Infinity
  364. mulx600 multiply -Inf -Inf -> Infinity
  365. mulx601 multiply -Inf -1000 -> Infinity
  366. mulx602 multiply -Inf -1 -> Infinity
  367. mulx603 multiply -Inf -0 -> NaN Invalid_operation
  368. mulx604 multiply -Inf 0 -> NaN Invalid_operation
  369. mulx605 multiply -Inf 1 -> -Infinity
  370. mulx606 multiply -Inf 1000 -> -Infinity
  371. mulx607 multiply -Inf Inf -> -Infinity
  372. mulx608 multiply -1000 Inf -> -Infinity
  373. mulx609 multiply -Inf -Inf -> Infinity
  374. mulx610 multiply -1 -Inf -> Infinity
  375. mulx611 multiply -0 -Inf -> NaN Invalid_operation
  376. mulx612 multiply 0 -Inf -> NaN Invalid_operation
  377. mulx613 multiply 1 -Inf -> -Infinity
  378. mulx614 multiply 1000 -Inf -> -Infinity
  379. mulx615 multiply Inf -Inf -> -Infinity
  380. mulx621 multiply NaN -Inf -> NaN
  381. mulx622 multiply NaN -1000 -> NaN
  382. mulx623 multiply NaN -1 -> NaN
  383. mulx624 multiply NaN -0 -> NaN
  384. mulx625 multiply NaN 0 -> NaN
  385. mulx626 multiply NaN 1 -> NaN
  386. mulx627 multiply NaN 1000 -> NaN
  387. mulx628 multiply NaN Inf -> NaN
  388. mulx629 multiply NaN NaN -> NaN
  389. mulx630 multiply -Inf NaN -> NaN
  390. mulx631 multiply -1000 NaN -> NaN
  391. mulx632 multiply -1 NaN -> NaN
  392. mulx633 multiply -0 NaN -> NaN
  393. mulx634 multiply 0 NaN -> NaN
  394. mulx635 multiply 1 NaN -> NaN
  395. mulx636 multiply 1000 NaN -> NaN
  396. mulx637 multiply Inf NaN -> NaN
  397. mulx641 multiply sNaN -Inf -> NaN Invalid_operation
  398. mulx642 multiply sNaN -1000 -> NaN Invalid_operation
  399. mulx643 multiply sNaN -1 -> NaN Invalid_operation
  400. mulx644 multiply sNaN -0 -> NaN Invalid_operation
  401. mulx645 multiply sNaN 0 -> NaN Invalid_operation
  402. mulx646 multiply sNaN 1 -> NaN Invalid_operation
  403. mulx647 multiply sNaN 1000 -> NaN Invalid_operation
  404. mulx648 multiply sNaN NaN -> NaN Invalid_operation
  405. mulx649 multiply sNaN sNaN -> NaN Invalid_operation
  406. mulx650 multiply NaN sNaN -> NaN Invalid_operation
  407. mulx651 multiply -Inf sNaN -> NaN Invalid_operation
  408. mulx652 multiply -1000 sNaN -> NaN Invalid_operation
  409. mulx653 multiply -1 sNaN -> NaN Invalid_operation
  410. mulx654 multiply -0 sNaN -> NaN Invalid_operation
  411. mulx655 multiply 0 sNaN -> NaN Invalid_operation
  412. mulx656 multiply 1 sNaN -> NaN Invalid_operation
  413. mulx657 multiply 1000 sNaN -> NaN Invalid_operation
  414. mulx658 multiply Inf sNaN -> NaN Invalid_operation
  415. mulx659 multiply NaN sNaN -> NaN Invalid_operation
  416. -- propagating NaNs
  417. mulx661 multiply NaN9 -Inf -> NaN9
  418. mulx662 multiply NaN8 999 -> NaN8
  419. mulx663 multiply NaN71 Inf -> NaN71
  420. mulx664 multiply NaN6 NaN5 -> NaN6
  421. mulx665 multiply -Inf NaN4 -> NaN4
  422. mulx666 multiply -999 NaN33 -> NaN33
  423. mulx667 multiply Inf NaN2 -> NaN2
  424. mulx671 multiply sNaN99 -Inf -> NaN99 Invalid_operation
  425. mulx672 multiply sNaN98 -11 -> NaN98 Invalid_operation
  426. mulx673 multiply sNaN97 NaN -> NaN97 Invalid_operation
  427. mulx674 multiply sNaN16 sNaN94 -> NaN16 Invalid_operation
  428. mulx675 multiply NaN95 sNaN93 -> NaN93 Invalid_operation
  429. mulx676 multiply -Inf sNaN92 -> NaN92 Invalid_operation
  430. mulx677 multiply 088 sNaN91 -> NaN91 Invalid_operation
  431. mulx678 multiply Inf sNaN90 -> NaN90 Invalid_operation
  432. mulx679 multiply NaN sNaN89 -> NaN89 Invalid_operation
  433. mulx681 multiply -NaN9 -Inf -> -NaN9
  434. mulx682 multiply -NaN8 999 -> -NaN8
  435. mulx683 multiply -NaN71 Inf -> -NaN71
  436. mulx684 multiply -NaN6 -NaN5 -> -NaN6
  437. mulx685 multiply -Inf -NaN4 -> -NaN4
  438. mulx686 multiply -999 -NaN33 -> -NaN33
  439. mulx687 multiply Inf -NaN2 -> -NaN2
  440. mulx691 multiply -sNaN99 -Inf -> -NaN99 Invalid_operation
  441. mulx692 multiply -sNaN98 -11 -> -NaN98 Invalid_operation
  442. mulx693 multiply -sNaN97 NaN -> -NaN97 Invalid_operation
  443. mulx694 multiply -sNaN16 -sNaN94 -> -NaN16 Invalid_operation
  444. mulx695 multiply -NaN95 -sNaN93 -> -NaN93 Invalid_operation
  445. mulx696 multiply -Inf -sNaN92 -> -NaN92 Invalid_operation
  446. mulx697 multiply 088 -sNaN91 -> -NaN91 Invalid_operation
  447. mulx698 multiply Inf -sNaN90 -> -NaN90 Invalid_operation
  448. mulx699 multiply -NaN -sNaN89 -> -NaN89 Invalid_operation
  449. mulx701 multiply -NaN -Inf -> -NaN
  450. mulx702 multiply -NaN 999 -> -NaN
  451. mulx703 multiply -NaN Inf -> -NaN
  452. mulx704 multiply -NaN -NaN -> -NaN
  453. mulx705 multiply -Inf -NaN0 -> -NaN
  454. mulx706 multiply -999 -NaN -> -NaN
  455. mulx707 multiply Inf -NaN -> -NaN
  456. mulx711 multiply -sNaN -Inf -> -NaN Invalid_operation
  457. mulx712 multiply -sNaN -11 -> -NaN Invalid_operation
  458. mulx713 multiply -sNaN00 NaN -> -NaN Invalid_operation
  459. mulx714 multiply -sNaN -sNaN -> -NaN Invalid_operation
  460. mulx715 multiply -NaN -sNaN -> -NaN Invalid_operation
  461. mulx716 multiply -Inf -sNaN -> -NaN Invalid_operation
  462. mulx717 multiply 088 -sNaN -> -NaN Invalid_operation
  463. mulx718 multiply Inf -sNaN -> -NaN Invalid_operation
  464. mulx719 multiply -NaN -sNaN -> -NaN Invalid_operation
  465. -- overflow and underflow tests .. note subnormal results
  466. maxexponent: 999999999
  467. minexponent: -999999999
  468. mulx730 multiply +1.23456789012345E-0 9E+999999999 -> Infinity Inexact Overflow Rounded
  469. mulx731 multiply 9E+999999999 +1.23456789012345E-0 -> Infinity Inexact Overflow Rounded
  470. mulx732 multiply +0.100 9E-999999999 -> 9.00E-1000000000 Subnormal
  471. mulx733 multiply 9E-999999999 +0.100 -> 9.00E-1000000000 Subnormal
  472. mulx735 multiply -1.23456789012345E-0 9E+999999999 -> -Infinity Inexact Overflow Rounded
  473. mulx736 multiply 9E+999999999 -1.23456789012345E-0 -> -Infinity Inexact Overflow Rounded
  474. mulx737 multiply -0.100 9E-999999999 -> -9.00E-1000000000 Subnormal
  475. mulx738 multiply 9E-999999999 -0.100 -> -9.00E-1000000000 Subnormal
  476. mulx739 multiply 1e-599999999 1e-400000001 -> 1E-1000000000 Subnormal
  477. mulx740 multiply 1e-599999999 1e-400000000 -> 1E-999999999
  478. mulx741 multiply 1e-600000000 1e-400000000 -> 1E-1000000000 Subnormal
  479. mulx742 multiply 9e-999999998 0.01 -> 9E-1000000000 Subnormal
  480. mulx743 multiply 9e-999999998 0.1 -> 9E-999999999
  481. mulx744 multiply 0.01 9e-999999998 -> 9E-1000000000 Subnormal
  482. mulx745 multiply 1e599999999 1e400000001 -> Infinity Overflow Inexact Rounded
  483. mulx746 multiply 1e599999999 1e400000000 -> 1E+999999999
  484. mulx747 multiply 1e600000000 1e400000000 -> Infinity Overflow Inexact Rounded
  485. mulx748 multiply 9e999999998 100 -> Infinity Overflow Inexact Rounded
  486. mulx749 multiply 9e999999998 10 -> 9.0E+999999999
  487. mulx750 multiply 100 9e999999998 -> Infinity Overflow Inexact Rounded
  488. -- signs
  489. mulx751 multiply 1e+777777777 1e+411111111 -> Infinity Overflow Inexact Rounded
  490. mulx752 multiply 1e+777777777 -1e+411111111 -> -Infinity Overflow Inexact Rounded
  491. mulx753 multiply -1e+777777777 1e+411111111 -> -Infinity Overflow Inexact Rounded
  492. mulx754 multiply -1e+777777777 -1e+411111111 -> Infinity Overflow Inexact Rounded
  493. mulx755 multiply 1e-777777777 1e-411111111 -> 0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
  494. mulx756 multiply 1e-777777777 -1e-411111111 -> -0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
  495. mulx757 multiply -1e-777777777 1e-411111111 -> -0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
  496. mulx758 multiply -1e-777777777 -1e-411111111 -> 0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
  497. -- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
  498. precision: 9
  499. mulx760 multiply 1e-600000000 1e-400000001 -> 1E-1000000001 Subnormal
  500. mulx761 multiply 1e-600000000 1e-400000002 -> 1E-1000000002 Subnormal
  501. mulx762 multiply 1e-600000000 1e-400000003 -> 1E-1000000003 Subnormal
  502. mulx763 multiply 1e-600000000 1e-400000004 -> 1E-1000000004 Subnormal
  503. mulx764 multiply 1e-600000000 1e-400000005 -> 1E-1000000005 Subnormal
  504. mulx765 multiply 1e-600000000 1e-400000006 -> 1E-1000000006 Subnormal
  505. mulx766 multiply 1e-600000000 1e-400000007 -> 1E-1000000007 Subnormal
  506. mulx767 multiply 1e-600000000 1e-400000008 -> 0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
  507. mulx768 multiply 1e-600000000 1e-400000009 -> 0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
  508. mulx769 multiply 1e-600000000 1e-400000010 -> 0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
  509. -- [no equivalent of 'subnormal' for overflow]
  510. mulx770 multiply 1e+600000000 1e+400000001 -> Infinity Overflow Inexact Rounded
  511. mulx771 multiply 1e+600000000 1e+400000002 -> Infinity Overflow Inexact Rounded
  512. mulx772 multiply 1e+600000000 1e+400000003 -> Infinity Overflow Inexact Rounded
  513. mulx773 multiply 1e+600000000 1e+400000004 -> Infinity Overflow Inexact Rounded
  514. mulx774 multiply 1e+600000000 1e+400000005 -> Infinity Overflow Inexact Rounded
  515. mulx775 multiply 1e+600000000 1e+400000006 -> Infinity Overflow Inexact Rounded
  516. mulx776 multiply 1e+600000000 1e+400000007 -> Infinity Overflow Inexact Rounded
  517. mulx777 multiply 1e+600000000 1e+400000008 -> Infinity Overflow Inexact Rounded
  518. mulx778 multiply 1e+600000000 1e+400000009 -> Infinity Overflow Inexact Rounded
  519. mulx779 multiply 1e+600000000 1e+400000010 -> Infinity Overflow Inexact Rounded
  520. -- 'subnormal' test edge condition at higher precisions
  521. precision: 99
  522. mulx780 multiply 1e-600000000 1e-400000007 -> 1E-1000000007 Subnormal
  523. mulx781 multiply 1e-600000000 1e-400000008 -> 1E-1000000008 Subnormal
  524. mulx782 multiply 1e-600000000 1e-400000097 -> 1E-1000000097 Subnormal
  525. mulx783 multiply 1e-600000000 1e-400000098 -> 0E-1000000097 Underflow Subnormal Inexact Rounded Clamped
  526. precision: 999
  527. mulx784 multiply 1e-600000000 1e-400000997 -> 1E-1000000997 Subnormal
  528. mulx785 multiply 1e-600000000 1e-400000998 -> 0E-1000000997 Underflow Subnormal Inexact Rounded Clamped
  529. -- following testcases [through mulx800] not yet run against code
  530. precision: 9999
  531. mulx786 multiply 1e-600000000 1e-400009997 -> 1E-1000009997 Subnormal
  532. mulx787 multiply 1e-600000000 1e-400009998 -> 0E-1000009997 Underflow Subnormal Inexact Rounded Clamped
  533. precision: 99999
  534. mulx788 multiply 1e-600000000 1e-400099997 -> 1E-1000099997 Subnormal
  535. mulx789 multiply 1e-600000000 1e-400099998 -> 0E-1000099997 Underflow Subnormal Inexact Rounded Clamped
  536. precision: 999999
  537. mulx790 multiply 1e-600000000 1e-400999997 -> 1E-1000999997 Subnormal
  538. mulx791 multiply 1e-600000000 1e-400999998 -> 0E-1000999997 Underflow Subnormal Inexact Rounded Clamped
  539. precision: 9999999
  540. mulx792 multiply 1e-600000000 1e-409999997 -> 1E-1009999997 Subnormal
  541. mulx793 multiply 1e-600000000 1e-409999998 -> 0E-1009999997 Underflow Subnormal Inexact Rounded Clamped
  542. precision: 99999999
  543. mulx794 multiply 1e-600000000 1e-499999997 -> 1E-1099999997 Subnormal
  544. mulx795 multiply 1e-600000000 1e-499999998 -> 0E-1099999997 Underflow Subnormal Inexact Rounded Clamped
  545. precision: 999999999
  546. mulx796 multiply 1e-999999999 1e-999999997 -> 1E-1999999996 Subnormal
  547. mulx797 multiply 1e-999999999 1e-999999998 -> 1E-1999999997 Subnormal
  548. mulx798 multiply 1e-999999999 1e-999999999 -> 0E-1999999997 Underflow Subnormal Inexact Rounded Clamped
  549. mulx799 multiply 1e-600000000 1e-400000007 -> 1E-1000000007 Subnormal
  550. mulx800 multiply 1e-600000000 1e-400000008 -> 1E-1000000008 Subnormal
  551. -- test subnormals rounding
  552. precision: 5
  553. maxExponent: 999
  554. minexponent: -999
  555. rounding: half_even
  556. mulx801 multiply 1.0000E-999 1 -> 1.0000E-999
  557. mulx802 multiply 1.000E-999 1e-1 -> 1.000E-1000 Subnormal
  558. mulx803 multiply 1.00E-999 1e-2 -> 1.00E-1001 Subnormal
  559. mulx804 multiply 1.0E-999 1e-3 -> 1.0E-1002 Subnormal
  560. mulx805 multiply 1.0E-999 1e-4 -> 1E-1003 Subnormal Rounded
  561. mulx806 multiply 1.3E-999 1e-4 -> 1E-1003 Underflow Subnormal Inexact Rounded
  562. mulx807 multiply 1.5E-999 1e-4 -> 2E-1003 Underflow Subnormal Inexact Rounded
  563. mulx808 multiply 1.7E-999 1e-4 -> 2E-1003 Underflow Subnormal Inexact Rounded
  564. mulx809 multiply 2.3E-999 1e-4 -> 2E-1003 Underflow Subnormal Inexact Rounded
  565. mulx810 multiply 2.5E-999 1e-4 -> 2E-1003 Underflow Subnormal Inexact Rounded
  566. mulx811 multiply 2.7E-999 1e-4 -> 3E-1003 Underflow Subnormal Inexact Rounded
  567. mulx812 multiply 1.49E-999 1e-4 -> 1E-1003 Underflow Subnormal Inexact Rounded
  568. mulx813 multiply 1.50E-999 1e-4 -> 2E-1003 Underflow Subnormal Inexact Rounded
  569. mulx814 multiply 1.51E-999 1e-4 -> 2E-1003 Underflow Subnormal Inexact Rounded
  570. mulx815 multiply 2.49E-999 1e-4 -> 2E-1003 Underflow Subnormal Inexact Rounded
  571. mulx816 multiply 2.50E-999 1e-4 -> 2E-1003 Underflow Subnormal Inexact Rounded
  572. mulx817 multiply 2.51E-999 1e-4 -> 3E-1003 Underflow Subnormal Inexact Rounded
  573. mulx818 multiply 1E-999 1e-4 -> 1E-1003 Subnormal
  574. mulx819 multiply 3E-999 1e-5 -> 0E-1003 Underflow Subnormal Inexact Rounded Clamped
  575. mulx820 multiply 5E-999 1e-5 -> 0E-1003 Underflow Subnormal Inexact Rounded Clamped
  576. mulx821 multiply 7E-999 1e-5 -> 1E-1003 Underflow Subnormal Inexact Rounded
  577. mulx822 multiply 9E-999 1e-5 -> 1E-1003 Underflow Subnormal Inexact Rounded
  578. mulx823 multiply 9.9E-999 1e-5 -> 1E-1003 Underflow Subnormal Inexact Rounded
  579. mulx824 multiply 1E-999 -1e-4 -> -1E-1003 Subnormal
  580. mulx825 multiply 3E-999 -1e-5 -> -0E-1003 Underflow Subnormal Inexact Rounded Clamped
  581. mulx826 multiply -5E-999 1e-5 -> -0E-1003 Underflow Subnormal Inexact Rounded Clamped
  582. mulx827 multiply 7E-999 -1e-5 -> -1E-1003 Underflow Subnormal Inexact Rounded
  583. mulx828 multiply -9E-999 1e-5 -> -1E-1003 Underflow Subnormal Inexact Rounded
  584. mulx829 multiply 9.9E-999 -1e-5 -> -1E-1003 Underflow Subnormal Inexact Rounded
  585. mulx830 multiply 3.0E-999 -1e-5 -> -0E-1003 Underflow Subnormal Inexact Rounded Clamped
  586. mulx831 multiply 1.0E-501 1e-501 -> 1.0E-1002 Subnormal
  587. mulx832 multiply 2.0E-501 2e-501 -> 4.0E-1002 Subnormal
  588. mulx833 multiply 4.0E-501 4e-501 -> 1.60E-1001 Subnormal
  589. mulx834 multiply 10.0E-501 10e-501 -> 1.000E-1000 Subnormal
  590. mulx835 multiply 30.0E-501 30e-501 -> 9.000E-1000 Subnormal
  591. mulx836 multiply 40.0E-501 40e-501 -> 1.6000E-999
  592. -- squares
  593. mulx840 multiply 1E-502 1e-502 -> 0E-1003 Underflow Subnormal Inexact Rounded Clamped
  594. mulx841 multiply 1E-501 1e-501 -> 1E-1002 Subnormal
  595. mulx842 multiply 2E-501 2e-501 -> 4E-1002 Subnormal
  596. mulx843 multiply 4E-501 4e-501 -> 1.6E-1001 Subnormal
  597. mulx844 multiply 10E-501 10e-501 -> 1.00E-1000 Subnormal
  598. mulx845 multiply 30E-501 30e-501 -> 9.00E-1000 Subnormal
  599. mulx846 multiply 40E-501 40e-501 -> 1.600E-999
  600. -- cubes
  601. mulx850 multiply 1E-670 1e-335 -> 0E-1003 Underflow Subnormal Inexact Rounded Clamped
  602. mulx851 multiply 1E-668 1e-334 -> 1E-1002 Subnormal
  603. mulx852 multiply 4E-668 2e-334 -> 8E-1002 Subnormal
  604. mulx853 multiply 9E-668 3e-334 -> 2.7E-1001 Subnormal
  605. mulx854 multiply 16E-668 4e-334 -> 6.4E-1001 Subnormal
  606. mulx855 multiply 25E-668 5e-334 -> 1.25E-1000 Subnormal
  607. mulx856 multiply 10E-668 100e-334 -> 1.000E-999
  608. -- test derived from result of 0.099 ** 999 at 15 digits with unlimited exponent
  609. precision: 19
  610. mulx860 multiply 6636851557994578716E-520 6636851557994578716E-520 -> 4.40477986028551E-1003 Underflow Subnormal Inexact Rounded
  611. -- Long operand overflow may be a different path
  612. precision: 3
  613. maxExponent: 999999999
  614. minexponent: -999999999
  615. mulx870 multiply 1 9.999E+999999999 -> Infinity Inexact Overflow Rounded
  616. mulx871 multiply 1 -9.999E+999999999 -> -Infinity Inexact Overflow Rounded
  617. mulx872 multiply 9.999E+999999999 1 -> Infinity Inexact Overflow Rounded
  618. mulx873 multiply -9.999E+999999999 1 -> -Infinity Inexact Overflow Rounded
  619. -- check for double-rounded subnormals
  620. precision: 5
  621. maxexponent: 79
  622. minexponent: -79
  623. mulx881 multiply 1.2347E-40 1.2347E-40 -> 1.524E-80 Inexact Rounded Subnormal Underflow
  624. mulx882 multiply 1.234E-40 1.234E-40 -> 1.523E-80 Inexact Rounded Subnormal Underflow
  625. mulx883 multiply 1.23E-40 1.23E-40 -> 1.513E-80 Inexact Rounded Subnormal Underflow
  626. mulx884 multiply 1.2E-40 1.2E-40 -> 1.44E-80 Subnormal
  627. mulx885 multiply 1.2E-40 1.2E-41 -> 1.44E-81 Subnormal
  628. mulx886 multiply 1.2E-40 1.2E-42 -> 1.4E-82 Subnormal Inexact Rounded Underflow
  629. mulx887 multiply 1.2E-40 1.3E-42 -> 1.6E-82 Subnormal Inexact Rounded Underflow
  630. mulx888 multiply 1.3E-40 1.3E-42 -> 1.7E-82 Subnormal Inexact Rounded Underflow
  631. mulx889 multiply 1.3E-40 1.3E-43 -> 2E-83 Subnormal Inexact Rounded Underflow
  632. mulx890 multiply 1.3E-41 1.3E-43 -> 0E-83 Clamped Subnormal Inexact Rounded Underflow
  633. mulx891 multiply 1.2345E-39 1.234E-40 -> 1.5234E-79 Inexact Rounded
  634. mulx892 multiply 1.23456E-39 1.234E-40 -> 1.5234E-79 Inexact Rounded
  635. mulx893 multiply 1.2345E-40 1.234E-40 -> 1.523E-80 Inexact Rounded Subnormal Underflow
  636. mulx894 multiply 1.23456E-40 1.234E-40 -> 1.523E-80 Inexact Rounded Subnormal Underflow
  637. mulx895 multiply 1.2345E-41 1.234E-40 -> 1.52E-81 Inexact Rounded Subnormal Underflow
  638. mulx896 multiply 1.23456E-41 1.234E-40 -> 1.52E-81 Inexact Rounded Subnormal Underflow
  639. -- Now explore the case where we get a normal result with Underflow
  640. precision: 16
  641. rounding: half_up
  642. maxExponent: 384
  643. minExponent: -383
  644. mulx900 multiply 0.3000000000E-191 0.3000000000E-191 -> 9.00000000000000E-384 Subnormal Rounded
  645. mulx901 multiply 0.3000000001E-191 0.3000000001E-191 -> 9.00000000600000E-384 Underflow Inexact Subnormal Rounded
  646. mulx902 multiply 9.999999999999999E-383 0.0999999999999 -> 9.99999999999000E-384 Underflow Inexact Subnormal Rounded
  647. mulx903 multiply 9.999999999999999E-383 0.09999999999999 -> 9.99999999999900E-384 Underflow Inexact Subnormal Rounded
  648. mulx904 multiply 9.999999999999999E-383 0.099999999999999 -> 9.99999999999990E-384 Underflow Inexact Subnormal Rounded
  649. mulx905 multiply 9.999999999999999E-383 0.0999999999999999 -> 9.99999999999999E-384 Underflow Inexact Subnormal Rounded
  650. -- prove operands are exact
  651. mulx906 multiply 9.999999999999999E-383 1 -> 9.999999999999999E-383
  652. mulx907 multiply 1 0.09999999999999999 -> 0.09999999999999999
  653. -- the next rounds to Nmin
  654. mulx908 multiply 9.999999999999999E-383 0.09999999999999999 -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded
  655. mulx909 multiply 9.999999999999999E-383 0.099999999999999999 -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded
  656. mulx910 multiply 9.999999999999999E-383 0.0999999999999999999 -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded
  657. mulx911 multiply 9.999999999999999E-383 0.09999999999999999999 -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded
  658. -- Examples from SQL proposal (Krishna Kulkarni)
  659. precision: 34
  660. rounding: half_up
  661. maxExponent: 6144
  662. minExponent: -6143
  663. mulx1001 multiply 130E-2 120E-2 -> 1.5600
  664. mulx1002 multiply 130E-2 12E-1 -> 1.560
  665. mulx1003 multiply 130E-2 1E0 -> 1.30
  666. mulx1004 multiply 1E2 1E4 -> 1E+6
  667. -- payload decapitate
  668. precision: 5
  669. mulx1010 multiply 11 -sNaN1234567890 -> -NaN67890 Invalid_operation
  670. -- Null tests
  671. mulx990 multiply 10 # -> NaN Invalid_operation
  672. mulx991 multiply # 10 -> NaN Invalid_operation