rounding.decTest 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303
  1. ------------------------------------------------------------------------
  2. -- rounding.decTest -- decimal rounding modes testcases --
  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. -- These tests require that implementations take account of residues in
  22. -- order to get correct results for some rounding modes. Rather than
  23. -- single rounding tests we therefore need tests for most operators.
  24. -- [We do assume add/minus/plus/subtract are common paths, however, as
  25. -- is rounding of negatives (if the latter works for addition, assume it
  26. -- works for the others, too).]
  27. --
  28. -- Round-for-reround (05UP) is tested as a separate block, mostly for
  29. -- 'historical' reasons.
  30. --
  31. -- Underflow Subnormal and overflow behaviours are tested under the
  32. -- individual operators.
  33. extended: 1
  34. precision: 5 -- for easier visual inspection
  35. maxExponent: 999
  36. minexponent: -999
  37. -- Addition operators -------------------------------------------------
  38. rounding: down
  39. radx100 add 12345 -0.1 -> 12344 Inexact Rounded
  40. radx101 add 12345 -0.01 -> 12344 Inexact Rounded
  41. radx102 add 12345 -0.001 -> 12344 Inexact Rounded
  42. radx103 add 12345 -0.00001 -> 12344 Inexact Rounded
  43. radx104 add 12345 -0.000001 -> 12344 Inexact Rounded
  44. radx105 add 12345 -0.0000001 -> 12344 Inexact Rounded
  45. radx106 add 12345 0 -> 12345
  46. radx107 add 12345 0.0000001 -> 12345 Inexact Rounded
  47. radx108 add 12345 0.000001 -> 12345 Inexact Rounded
  48. radx109 add 12345 0.00001 -> 12345 Inexact Rounded
  49. radx110 add 12345 0.0001 -> 12345 Inexact Rounded
  50. radx111 add 12345 0.001 -> 12345 Inexact Rounded
  51. radx112 add 12345 0.01 -> 12345 Inexact Rounded
  52. radx113 add 12345 0.1 -> 12345 Inexact Rounded
  53. radx115 add 12346 0.49999 -> 12346 Inexact Rounded
  54. radx116 add 12346 0.5 -> 12346 Inexact Rounded
  55. radx117 add 12346 0.50001 -> 12346 Inexact Rounded
  56. radx120 add 12345 0.4 -> 12345 Inexact Rounded
  57. radx121 add 12345 0.49 -> 12345 Inexact Rounded
  58. radx122 add 12345 0.499 -> 12345 Inexact Rounded
  59. radx123 add 12345 0.49999 -> 12345 Inexact Rounded
  60. radx124 add 12345 0.5 -> 12345 Inexact Rounded
  61. radx125 add 12345 0.50001 -> 12345 Inexact Rounded
  62. radx126 add 12345 0.5001 -> 12345 Inexact Rounded
  63. radx127 add 12345 0.501 -> 12345 Inexact Rounded
  64. radx128 add 12345 0.51 -> 12345 Inexact Rounded
  65. radx129 add 12345 0.6 -> 12345 Inexact Rounded
  66. rounding: half_down
  67. radx140 add 12345 -0.1 -> 12345 Inexact Rounded
  68. radx141 add 12345 -0.01 -> 12345 Inexact Rounded
  69. radx142 add 12345 -0.001 -> 12345 Inexact Rounded
  70. radx143 add 12345 -0.00001 -> 12345 Inexact Rounded
  71. radx144 add 12345 -0.000001 -> 12345 Inexact Rounded
  72. radx145 add 12345 -0.0000001 -> 12345 Inexact Rounded
  73. radx146 add 12345 0 -> 12345
  74. radx147 add 12345 0.0000001 -> 12345 Inexact Rounded
  75. radx148 add 12345 0.000001 -> 12345 Inexact Rounded
  76. radx149 add 12345 0.00001 -> 12345 Inexact Rounded
  77. radx150 add 12345 0.0001 -> 12345 Inexact Rounded
  78. radx151 add 12345 0.001 -> 12345 Inexact Rounded
  79. radx152 add 12345 0.01 -> 12345 Inexact Rounded
  80. radx153 add 12345 0.1 -> 12345 Inexact Rounded
  81. radx155 add 12346 0.49999 -> 12346 Inexact Rounded
  82. radx156 add 12346 0.5 -> 12346 Inexact Rounded
  83. radx157 add 12346 0.50001 -> 12347 Inexact Rounded
  84. radx160 add 12345 0.4 -> 12345 Inexact Rounded
  85. radx161 add 12345 0.49 -> 12345 Inexact Rounded
  86. radx162 add 12345 0.499 -> 12345 Inexact Rounded
  87. radx163 add 12345 0.49999 -> 12345 Inexact Rounded
  88. radx164 add 12345 0.5 -> 12345 Inexact Rounded
  89. radx165 add 12345 0.50001 -> 12346 Inexact Rounded
  90. radx166 add 12345 0.5001 -> 12346 Inexact Rounded
  91. radx167 add 12345 0.501 -> 12346 Inexact Rounded
  92. radx168 add 12345 0.51 -> 12346 Inexact Rounded
  93. radx169 add 12345 0.6 -> 12346 Inexact Rounded
  94. rounding: half_even
  95. radx170 add 12345 -0.1 -> 12345 Inexact Rounded
  96. radx171 add 12345 -0.01 -> 12345 Inexact Rounded
  97. radx172 add 12345 -0.001 -> 12345 Inexact Rounded
  98. radx173 add 12345 -0.00001 -> 12345 Inexact Rounded
  99. radx174 add 12345 -0.000001 -> 12345 Inexact Rounded
  100. radx175 add 12345 -0.0000001 -> 12345 Inexact Rounded
  101. radx176 add 12345 0 -> 12345
  102. radx177 add 12345 0.0000001 -> 12345 Inexact Rounded
  103. radx178 add 12345 0.000001 -> 12345 Inexact Rounded
  104. radx179 add 12345 0.00001 -> 12345 Inexact Rounded
  105. radx180 add 12345 0.0001 -> 12345 Inexact Rounded
  106. radx181 add 12345 0.001 -> 12345 Inexact Rounded
  107. radx182 add 12345 0.01 -> 12345 Inexact Rounded
  108. radx183 add 12345 0.1 -> 12345 Inexact Rounded
  109. radx185 add 12346 0.49999 -> 12346 Inexact Rounded
  110. radx186 add 12346 0.5 -> 12346 Inexact Rounded
  111. radx187 add 12346 0.50001 -> 12347 Inexact Rounded
  112. radx190 add 12345 0.4 -> 12345 Inexact Rounded
  113. radx191 add 12345 0.49 -> 12345 Inexact Rounded
  114. radx192 add 12345 0.499 -> 12345 Inexact Rounded
  115. radx193 add 12345 0.49999 -> 12345 Inexact Rounded
  116. radx194 add 12345 0.5 -> 12346 Inexact Rounded
  117. radx195 add 12345 0.50001 -> 12346 Inexact Rounded
  118. radx196 add 12345 0.5001 -> 12346 Inexact Rounded
  119. radx197 add 12345 0.501 -> 12346 Inexact Rounded
  120. radx198 add 12345 0.51 -> 12346 Inexact Rounded
  121. radx199 add 12345 0.6 -> 12346 Inexact Rounded
  122. rounding: half_up
  123. radx200 add 12345 -0.1 -> 12345 Inexact Rounded
  124. radx201 add 12345 -0.01 -> 12345 Inexact Rounded
  125. radx202 add 12345 -0.001 -> 12345 Inexact Rounded
  126. radx203 add 12345 -0.00001 -> 12345 Inexact Rounded
  127. radx204 add 12345 -0.000001 -> 12345 Inexact Rounded
  128. radx205 add 12345 -0.0000001 -> 12345 Inexact Rounded
  129. radx206 add 12345 0 -> 12345
  130. radx207 add 12345 0.0000001 -> 12345 Inexact Rounded
  131. radx208 add 12345 0.000001 -> 12345 Inexact Rounded
  132. radx209 add 12345 0.00001 -> 12345 Inexact Rounded
  133. radx210 add 12345 0.0001 -> 12345 Inexact Rounded
  134. radx211 add 12345 0.001 -> 12345 Inexact Rounded
  135. radx212 add 12345 0.01 -> 12345 Inexact Rounded
  136. radx213 add 12345 0.1 -> 12345 Inexact Rounded
  137. radx215 add 12346 0.49999 -> 12346 Inexact Rounded
  138. radx216 add 12346 0.5 -> 12347 Inexact Rounded
  139. radx217 add 12346 0.50001 -> 12347 Inexact Rounded
  140. radx220 add 12345 0.4 -> 12345 Inexact Rounded
  141. radx221 add 12345 0.49 -> 12345 Inexact Rounded
  142. radx222 add 12345 0.499 -> 12345 Inexact Rounded
  143. radx223 add 12345 0.49999 -> 12345 Inexact Rounded
  144. radx224 add 12345 0.5 -> 12346 Inexact Rounded
  145. radx225 add 12345 0.50001 -> 12346 Inexact Rounded
  146. radx226 add 12345 0.5001 -> 12346 Inexact Rounded
  147. radx227 add 12345 0.501 -> 12346 Inexact Rounded
  148. radx228 add 12345 0.51 -> 12346 Inexact Rounded
  149. radx229 add 12345 0.6 -> 12346 Inexact Rounded
  150. rounding: up
  151. radx230 add 12345 -0.1 -> 12345 Inexact Rounded
  152. radx231 add 12345 -0.01 -> 12345 Inexact Rounded
  153. radx232 add 12345 -0.001 -> 12345 Inexact Rounded
  154. radx233 add 12345 -0.00001 -> 12345 Inexact Rounded
  155. radx234 add 12345 -0.000001 -> 12345 Inexact Rounded
  156. radx235 add 12345 -0.0000001 -> 12345 Inexact Rounded
  157. radx236 add 12345 0 -> 12345
  158. radx237 add 12345 0.0000001 -> 12346 Inexact Rounded
  159. radx238 add 12345 0.000001 -> 12346 Inexact Rounded
  160. radx239 add 12345 0.00001 -> 12346 Inexact Rounded
  161. radx240 add 12345 0.0001 -> 12346 Inexact Rounded
  162. radx241 add 12345 0.001 -> 12346 Inexact Rounded
  163. radx242 add 12345 0.01 -> 12346 Inexact Rounded
  164. radx243 add 12345 0.1 -> 12346 Inexact Rounded
  165. radx245 add 12346 0.49999 -> 12347 Inexact Rounded
  166. radx246 add 12346 0.5 -> 12347 Inexact Rounded
  167. radx247 add 12346 0.50001 -> 12347 Inexact Rounded
  168. radx250 add 12345 0.4 -> 12346 Inexact Rounded
  169. radx251 add 12345 0.49 -> 12346 Inexact Rounded
  170. radx252 add 12345 0.499 -> 12346 Inexact Rounded
  171. radx253 add 12345 0.49999 -> 12346 Inexact Rounded
  172. radx254 add 12345 0.5 -> 12346 Inexact Rounded
  173. radx255 add 12345 0.50001 -> 12346 Inexact Rounded
  174. radx256 add 12345 0.5001 -> 12346 Inexact Rounded
  175. radx257 add 12345 0.501 -> 12346 Inexact Rounded
  176. radx258 add 12345 0.51 -> 12346 Inexact Rounded
  177. radx259 add 12345 0.6 -> 12346 Inexact Rounded
  178. rounding: floor
  179. radx300 add 12345 -0.1 -> 12344 Inexact Rounded
  180. radx301 add 12345 -0.01 -> 12344 Inexact Rounded
  181. radx302 add 12345 -0.001 -> 12344 Inexact Rounded
  182. radx303 add 12345 -0.00001 -> 12344 Inexact Rounded
  183. radx304 add 12345 -0.000001 -> 12344 Inexact Rounded
  184. radx305 add 12345 -0.0000001 -> 12344 Inexact Rounded
  185. radx306 add 12345 0 -> 12345
  186. radx307 add 12345 0.0000001 -> 12345 Inexact Rounded
  187. radx308 add 12345 0.000001 -> 12345 Inexact Rounded
  188. radx309 add 12345 0.00001 -> 12345 Inexact Rounded
  189. radx310 add 12345 0.0001 -> 12345 Inexact Rounded
  190. radx311 add 12345 0.001 -> 12345 Inexact Rounded
  191. radx312 add 12345 0.01 -> 12345 Inexact Rounded
  192. radx313 add 12345 0.1 -> 12345 Inexact Rounded
  193. radx315 add 12346 0.49999 -> 12346 Inexact Rounded
  194. radx316 add 12346 0.5 -> 12346 Inexact Rounded
  195. radx317 add 12346 0.50001 -> 12346 Inexact Rounded
  196. radx320 add 12345 0.4 -> 12345 Inexact Rounded
  197. radx321 add 12345 0.49 -> 12345 Inexact Rounded
  198. radx322 add 12345 0.499 -> 12345 Inexact Rounded
  199. radx323 add 12345 0.49999 -> 12345 Inexact Rounded
  200. radx324 add 12345 0.5 -> 12345 Inexact Rounded
  201. radx325 add 12345 0.50001 -> 12345 Inexact Rounded
  202. radx326 add 12345 0.5001 -> 12345 Inexact Rounded
  203. radx327 add 12345 0.501 -> 12345 Inexact Rounded
  204. radx328 add 12345 0.51 -> 12345 Inexact Rounded
  205. radx329 add 12345 0.6 -> 12345 Inexact Rounded
  206. rounding: ceiling
  207. radx330 add 12345 -0.1 -> 12345 Inexact Rounded
  208. radx331 add 12345 -0.01 -> 12345 Inexact Rounded
  209. radx332 add 12345 -0.001 -> 12345 Inexact Rounded
  210. radx333 add 12345 -0.00001 -> 12345 Inexact Rounded
  211. radx334 add 12345 -0.000001 -> 12345 Inexact Rounded
  212. radx335 add 12345 -0.0000001 -> 12345 Inexact Rounded
  213. radx336 add 12345 0 -> 12345
  214. radx337 add 12345 0.0000001 -> 12346 Inexact Rounded
  215. radx338 add 12345 0.000001 -> 12346 Inexact Rounded
  216. radx339 add 12345 0.00001 -> 12346 Inexact Rounded
  217. radx340 add 12345 0.0001 -> 12346 Inexact Rounded
  218. radx341 add 12345 0.001 -> 12346 Inexact Rounded
  219. radx342 add 12345 0.01 -> 12346 Inexact Rounded
  220. radx343 add 12345 0.1 -> 12346 Inexact Rounded
  221. radx345 add 12346 0.49999 -> 12347 Inexact Rounded
  222. radx346 add 12346 0.5 -> 12347 Inexact Rounded
  223. radx347 add 12346 0.50001 -> 12347 Inexact Rounded
  224. radx350 add 12345 0.4 -> 12346 Inexact Rounded
  225. radx351 add 12345 0.49 -> 12346 Inexact Rounded
  226. radx352 add 12345 0.499 -> 12346 Inexact Rounded
  227. radx353 add 12345 0.49999 -> 12346 Inexact Rounded
  228. radx354 add 12345 0.5 -> 12346 Inexact Rounded
  229. radx355 add 12345 0.50001 -> 12346 Inexact Rounded
  230. radx356 add 12345 0.5001 -> 12346 Inexact Rounded
  231. radx357 add 12345 0.501 -> 12346 Inexact Rounded
  232. radx358 add 12345 0.51 -> 12346 Inexact Rounded
  233. radx359 add 12345 0.6 -> 12346 Inexact Rounded
  234. -- negatives...
  235. rounding: down
  236. rsux100 add -12345 -0.1 -> -12345 Inexact Rounded
  237. rsux101 add -12345 -0.01 -> -12345 Inexact Rounded
  238. rsux102 add -12345 -0.001 -> -12345 Inexact Rounded
  239. rsux103 add -12345 -0.00001 -> -12345 Inexact Rounded
  240. rsux104 add -12345 -0.000001 -> -12345 Inexact Rounded
  241. rsux105 add -12345 -0.0000001 -> -12345 Inexact Rounded
  242. rsux106 add -12345 0 -> -12345
  243. rsux107 add -12345 0.0000001 -> -12344 Inexact Rounded
  244. rsux108 add -12345 0.000001 -> -12344 Inexact Rounded
  245. rsux109 add -12345 0.00001 -> -12344 Inexact Rounded
  246. rsux110 add -12345 0.0001 -> -12344 Inexact Rounded
  247. rsux111 add -12345 0.001 -> -12344 Inexact Rounded
  248. rsux112 add -12345 0.01 -> -12344 Inexact Rounded
  249. rsux113 add -12345 0.1 -> -12344 Inexact Rounded
  250. rsux115 add -12346 0.49999 -> -12345 Inexact Rounded
  251. rsux116 add -12346 0.5 -> -12345 Inexact Rounded
  252. rsux117 add -12346 0.50001 -> -12345 Inexact Rounded
  253. rsux120 add -12345 0.4 -> -12344 Inexact Rounded
  254. rsux121 add -12345 0.49 -> -12344 Inexact Rounded
  255. rsux122 add -12345 0.499 -> -12344 Inexact Rounded
  256. rsux123 add -12345 0.49999 -> -12344 Inexact Rounded
  257. rsux124 add -12345 0.5 -> -12344 Inexact Rounded
  258. rsux125 add -12345 0.50001 -> -12344 Inexact Rounded
  259. rsux126 add -12345 0.5001 -> -12344 Inexact Rounded
  260. rsux127 add -12345 0.501 -> -12344 Inexact Rounded
  261. rsux128 add -12345 0.51 -> -12344 Inexact Rounded
  262. rsux129 add -12345 0.6 -> -12344 Inexact Rounded
  263. rounding: half_down
  264. rsux140 add -12345 -0.1 -> -12345 Inexact Rounded
  265. rsux141 add -12345 -0.01 -> -12345 Inexact Rounded
  266. rsux142 add -12345 -0.001 -> -12345 Inexact Rounded
  267. rsux143 add -12345 -0.00001 -> -12345 Inexact Rounded
  268. rsux144 add -12345 -0.000001 -> -12345 Inexact Rounded
  269. rsux145 add -12345 -0.0000001 -> -12345 Inexact Rounded
  270. rsux146 add -12345 0 -> -12345
  271. rsux147 add -12345 0.0000001 -> -12345 Inexact Rounded
  272. rsux148 add -12345 0.000001 -> -12345 Inexact Rounded
  273. rsux149 add -12345 0.00001 -> -12345 Inexact Rounded
  274. rsux150 add -12345 0.0001 -> -12345 Inexact Rounded
  275. rsux151 add -12345 0.001 -> -12345 Inexact Rounded
  276. rsux152 add -12345 0.01 -> -12345 Inexact Rounded
  277. rsux153 add -12345 0.1 -> -12345 Inexact Rounded
  278. rsux155 add -12346 0.49999 -> -12346 Inexact Rounded
  279. rsux156 add -12346 0.5 -> -12345 Inexact Rounded
  280. rsux157 add -12346 0.50001 -> -12345 Inexact Rounded
  281. rsux160 add -12345 0.4 -> -12345 Inexact Rounded
  282. rsux161 add -12345 0.49 -> -12345 Inexact Rounded
  283. rsux162 add -12345 0.499 -> -12345 Inexact Rounded
  284. rsux163 add -12345 0.49999 -> -12345 Inexact Rounded
  285. rsux164 add -12345 0.5 -> -12344 Inexact Rounded
  286. rsux165 add -12345 0.50001 -> -12344 Inexact Rounded
  287. rsux166 add -12345 0.5001 -> -12344 Inexact Rounded
  288. rsux167 add -12345 0.501 -> -12344 Inexact Rounded
  289. rsux168 add -12345 0.51 -> -12344 Inexact Rounded
  290. rsux169 add -12345 0.6 -> -12344 Inexact Rounded
  291. rounding: half_even
  292. rsux170 add -12345 -0.1 -> -12345 Inexact Rounded
  293. rsux171 add -12345 -0.01 -> -12345 Inexact Rounded
  294. rsux172 add -12345 -0.001 -> -12345 Inexact Rounded
  295. rsux173 add -12345 -0.00001 -> -12345 Inexact Rounded
  296. rsux174 add -12345 -0.000001 -> -12345 Inexact Rounded
  297. rsux175 add -12345 -0.0000001 -> -12345 Inexact Rounded
  298. rsux176 add -12345 0 -> -12345
  299. rsux177 add -12345 0.0000001 -> -12345 Inexact Rounded
  300. rsux178 add -12345 0.000001 -> -12345 Inexact Rounded
  301. rsux179 add -12345 0.00001 -> -12345 Inexact Rounded
  302. rsux180 add -12345 0.0001 -> -12345 Inexact Rounded
  303. rsux181 add -12345 0.001 -> -12345 Inexact Rounded
  304. rsux182 add -12345 0.01 -> -12345 Inexact Rounded
  305. rsux183 add -12345 0.1 -> -12345 Inexact Rounded
  306. rsux185 add -12346 0.49999 -> -12346 Inexact Rounded
  307. rsux186 add -12346 0.5 -> -12346 Inexact Rounded
  308. rsux187 add -12346 0.50001 -> -12345 Inexact Rounded
  309. rsux190 add -12345 0.4 -> -12345 Inexact Rounded
  310. rsux191 add -12345 0.49 -> -12345 Inexact Rounded
  311. rsux192 add -12345 0.499 -> -12345 Inexact Rounded
  312. rsux193 add -12345 0.49999 -> -12345 Inexact Rounded
  313. rsux194 add -12345 0.5 -> -12344 Inexact Rounded
  314. rsux195 add -12345 0.50001 -> -12344 Inexact Rounded
  315. rsux196 add -12345 0.5001 -> -12344 Inexact Rounded
  316. rsux197 add -12345 0.501 -> -12344 Inexact Rounded
  317. rsux198 add -12345 0.51 -> -12344 Inexact Rounded
  318. rsux199 add -12345 0.6 -> -12344 Inexact Rounded
  319. rounding: half_up
  320. rsux200 add -12345 -0.1 -> -12345 Inexact Rounded
  321. rsux201 add -12345 -0.01 -> -12345 Inexact Rounded
  322. rsux202 add -12345 -0.001 -> -12345 Inexact Rounded
  323. rsux203 add -12345 -0.00001 -> -12345 Inexact Rounded
  324. rsux204 add -12345 -0.000001 -> -12345 Inexact Rounded
  325. rsux205 add -12345 -0.0000001 -> -12345 Inexact Rounded
  326. rsux206 add -12345 0 -> -12345
  327. rsux207 add -12345 0.0000001 -> -12345 Inexact Rounded
  328. rsux208 add -12345 0.000001 -> -12345 Inexact Rounded
  329. rsux209 add -12345 0.00001 -> -12345 Inexact Rounded
  330. rsux210 add -12345 0.0001 -> -12345 Inexact Rounded
  331. rsux211 add -12345 0.001 -> -12345 Inexact Rounded
  332. rsux212 add -12345 0.01 -> -12345 Inexact Rounded
  333. rsux213 add -12345 0.1 -> -12345 Inexact Rounded
  334. rsux215 add -12346 0.49999 -> -12346 Inexact Rounded
  335. rsux216 add -12346 0.5 -> -12346 Inexact Rounded
  336. rsux217 add -12346 0.50001 -> -12345 Inexact Rounded
  337. rsux220 add -12345 0.4 -> -12345 Inexact Rounded
  338. rsux221 add -12345 0.49 -> -12345 Inexact Rounded
  339. rsux222 add -12345 0.499 -> -12345 Inexact Rounded
  340. rsux223 add -12345 0.49999 -> -12345 Inexact Rounded
  341. rsux224 add -12345 0.5 -> -12345 Inexact Rounded
  342. rsux225 add -12345 0.50001 -> -12344 Inexact Rounded
  343. rsux226 add -12345 0.5001 -> -12344 Inexact Rounded
  344. rsux227 add -12345 0.501 -> -12344 Inexact Rounded
  345. rsux228 add -12345 0.51 -> -12344 Inexact Rounded
  346. rsux229 add -12345 0.6 -> -12344 Inexact Rounded
  347. rounding: up
  348. rsux230 add -12345 -0.1 -> -12346 Inexact Rounded
  349. rsux231 add -12345 -0.01 -> -12346 Inexact Rounded
  350. rsux232 add -12345 -0.001 -> -12346 Inexact Rounded
  351. rsux233 add -12345 -0.00001 -> -12346 Inexact Rounded
  352. rsux234 add -12345 -0.000001 -> -12346 Inexact Rounded
  353. rsux235 add -12345 -0.0000001 -> -12346 Inexact Rounded
  354. rsux236 add -12345 0 -> -12345
  355. rsux237 add -12345 0.0000001 -> -12345 Inexact Rounded
  356. rsux238 add -12345 0.000001 -> -12345 Inexact Rounded
  357. rsux239 add -12345 0.00001 -> -12345 Inexact Rounded
  358. rsux240 add -12345 0.0001 -> -12345 Inexact Rounded
  359. rsux241 add -12345 0.001 -> -12345 Inexact Rounded
  360. rsux242 add -12345 0.01 -> -12345 Inexact Rounded
  361. rsux243 add -12345 0.1 -> -12345 Inexact Rounded
  362. rsux245 add -12346 0.49999 -> -12346 Inexact Rounded
  363. rsux246 add -12346 0.5 -> -12346 Inexact Rounded
  364. rsux247 add -12346 0.50001 -> -12346 Inexact Rounded
  365. rsux250 add -12345 0.4 -> -12345 Inexact Rounded
  366. rsux251 add -12345 0.49 -> -12345 Inexact Rounded
  367. rsux252 add -12345 0.499 -> -12345 Inexact Rounded
  368. rsux253 add -12345 0.49999 -> -12345 Inexact Rounded
  369. rsux254 add -12345 0.5 -> -12345 Inexact Rounded
  370. rsux255 add -12345 0.50001 -> -12345 Inexact Rounded
  371. rsux256 add -12345 0.5001 -> -12345 Inexact Rounded
  372. rsux257 add -12345 0.501 -> -12345 Inexact Rounded
  373. rsux258 add -12345 0.51 -> -12345 Inexact Rounded
  374. rsux259 add -12345 0.6 -> -12345 Inexact Rounded
  375. rounding: floor
  376. rsux300 add -12345 -0.1 -> -12346 Inexact Rounded
  377. rsux301 add -12345 -0.01 -> -12346 Inexact Rounded
  378. rsux302 add -12345 -0.001 -> -12346 Inexact Rounded
  379. rsux303 add -12345 -0.00001 -> -12346 Inexact Rounded
  380. rsux304 add -12345 -0.000001 -> -12346 Inexact Rounded
  381. rsux305 add -12345 -0.0000001 -> -12346 Inexact Rounded
  382. rsux306 add -12345 0 -> -12345
  383. rsux307 add -12345 0.0000001 -> -12345 Inexact Rounded
  384. rsux308 add -12345 0.000001 -> -12345 Inexact Rounded
  385. rsux309 add -12345 0.00001 -> -12345 Inexact Rounded
  386. rsux310 add -12345 0.0001 -> -12345 Inexact Rounded
  387. rsux311 add -12345 0.001 -> -12345 Inexact Rounded
  388. rsux312 add -12345 0.01 -> -12345 Inexact Rounded
  389. rsux313 add -12345 0.1 -> -12345 Inexact Rounded
  390. rsux315 add -12346 0.49999 -> -12346 Inexact Rounded
  391. rsux316 add -12346 0.5 -> -12346 Inexact Rounded
  392. rsux317 add -12346 0.50001 -> -12346 Inexact Rounded
  393. rsux320 add -12345 0.4 -> -12345 Inexact Rounded
  394. rsux321 add -12345 0.49 -> -12345 Inexact Rounded
  395. rsux322 add -12345 0.499 -> -12345 Inexact Rounded
  396. rsux323 add -12345 0.49999 -> -12345 Inexact Rounded
  397. rsux324 add -12345 0.5 -> -12345 Inexact Rounded
  398. rsux325 add -12345 0.50001 -> -12345 Inexact Rounded
  399. rsux326 add -12345 0.5001 -> -12345 Inexact Rounded
  400. rsux327 add -12345 0.501 -> -12345 Inexact Rounded
  401. rsux328 add -12345 0.51 -> -12345 Inexact Rounded
  402. rsux329 add -12345 0.6 -> -12345 Inexact Rounded
  403. rounding: ceiling
  404. rsux330 add -12345 -0.1 -> -12345 Inexact Rounded
  405. rsux331 add -12345 -0.01 -> -12345 Inexact Rounded
  406. rsux332 add -12345 -0.001 -> -12345 Inexact Rounded
  407. rsux333 add -12345 -0.00001 -> -12345 Inexact Rounded
  408. rsux334 add -12345 -0.000001 -> -12345 Inexact Rounded
  409. rsux335 add -12345 -0.0000001 -> -12345 Inexact Rounded
  410. rsux336 add -12345 0 -> -12345
  411. rsux337 add -12345 0.0000001 -> -12344 Inexact Rounded
  412. rsux338 add -12345 0.000001 -> -12344 Inexact Rounded
  413. rsux339 add -12345 0.00001 -> -12344 Inexact Rounded
  414. rsux340 add -12345 0.0001 -> -12344 Inexact Rounded
  415. rsux341 add -12345 0.001 -> -12344 Inexact Rounded
  416. rsux342 add -12345 0.01 -> -12344 Inexact Rounded
  417. rsux343 add -12345 0.1 -> -12344 Inexact Rounded
  418. rsux345 add -12346 0.49999 -> -12345 Inexact Rounded
  419. rsux346 add -12346 0.5 -> -12345 Inexact Rounded
  420. rsux347 add -12346 0.50001 -> -12345 Inexact Rounded
  421. rsux350 add -12345 0.4 -> -12344 Inexact Rounded
  422. rsux351 add -12345 0.49 -> -12344 Inexact Rounded
  423. rsux352 add -12345 0.499 -> -12344 Inexact Rounded
  424. rsux353 add -12345 0.49999 -> -12344 Inexact Rounded
  425. rsux354 add -12345 0.5 -> -12344 Inexact Rounded
  426. rsux355 add -12345 0.50001 -> -12344 Inexact Rounded
  427. rsux356 add -12345 0.5001 -> -12344 Inexact Rounded
  428. rsux357 add -12345 0.501 -> -12344 Inexact Rounded
  429. rsux358 add -12345 0.51 -> -12344 Inexact Rounded
  430. rsux359 add -12345 0.6 -> -12344 Inexact Rounded
  431. -- Check cancellation subtractions
  432. -- (The IEEE 854 'curious rule' in $6.3)
  433. rounding: down
  434. rzex001 add 0 0 -> 0
  435. rzex002 add 0 -0 -> 0
  436. rzex003 add -0 0 -> 0
  437. rzex004 add -0 -0 -> -0
  438. rzex005 add 1 -1 -> 0
  439. rzex006 add -1 1 -> 0
  440. rzex007 add 1.5 -1.5 -> 0.0
  441. rzex008 add -1.5 1.5 -> 0.0
  442. rzex009 add 2 -2 -> 0
  443. rzex010 add -2 2 -> 0
  444. rounding: up
  445. rzex011 add 0 0 -> 0
  446. rzex012 add 0 -0 -> 0
  447. rzex013 add -0 0 -> 0
  448. rzex014 add -0 -0 -> -0
  449. rzex015 add 1 -1 -> 0
  450. rzex016 add -1 1 -> 0
  451. rzex017 add 1.5 -1.5 -> 0.0
  452. rzex018 add -1.5 1.5 -> 0.0
  453. rzex019 add 2 -2 -> 0
  454. rzex020 add -2 2 -> 0
  455. rounding: half_up
  456. rzex021 add 0 0 -> 0
  457. rzex022 add 0 -0 -> 0
  458. rzex023 add -0 0 -> 0
  459. rzex024 add -0 -0 -> -0
  460. rzex025 add 1 -1 -> 0
  461. rzex026 add -1 1 -> 0
  462. rzex027 add 1.5 -1.5 -> 0.0
  463. rzex028 add -1.5 1.5 -> 0.0
  464. rzex029 add 2 -2 -> 0
  465. rzex030 add -2 2 -> 0
  466. rounding: half_down
  467. rzex031 add 0 0 -> 0
  468. rzex032 add 0 -0 -> 0
  469. rzex033 add -0 0 -> 0
  470. rzex034 add -0 -0 -> -0
  471. rzex035 add 1 -1 -> 0
  472. rzex036 add -1 1 -> 0
  473. rzex037 add 1.5 -1.5 -> 0.0
  474. rzex038 add -1.5 1.5 -> 0.0
  475. rzex039 add 2 -2 -> 0
  476. rzex040 add -2 2 -> 0
  477. rounding: half_even
  478. rzex041 add 0 0 -> 0
  479. rzex042 add 0 -0 -> 0
  480. rzex043 add -0 0 -> 0
  481. rzex044 add -0 -0 -> -0
  482. rzex045 add 1 -1 -> 0
  483. rzex046 add -1 1 -> 0
  484. rzex047 add 1.5 -1.5 -> 0.0
  485. rzex048 add -1.5 1.5 -> 0.0
  486. rzex049 add 2 -2 -> 0
  487. rzex050 add -2 2 -> 0
  488. rounding: floor
  489. rzex051 add 0 0 -> 0
  490. rzex052 add 0 -0 -> -0 -- here are two 'curious'
  491. rzex053 add -0 0 -> -0 --
  492. rzex054 add -0 -0 -> -0
  493. rzex055 add 1 -1 -> -0 -- here are the rest
  494. rzex056 add -1 1 -> -0 -- ..
  495. rzex057 add 1.5 -1.5 -> -0.0 -- ..
  496. rzex058 add -1.5 1.5 -> -0.0 -- ..
  497. rzex059 add 2 -2 -> -0 -- ..
  498. rzex060 add -2 2 -> -0 -- ..
  499. rounding: ceiling
  500. rzex061 add 0 0 -> 0
  501. rzex062 add 0 -0 -> 0
  502. rzex063 add -0 0 -> 0
  503. rzex064 add -0 -0 -> -0
  504. rzex065 add 1 -1 -> 0
  505. rzex066 add -1 1 -> 0
  506. rzex067 add 1.5 -1.5 -> 0.0
  507. rzex068 add -1.5 1.5 -> 0.0
  508. rzex069 add 2 -2 -> 0
  509. rzex070 add -2 2 -> 0
  510. -- Division operators -------------------------------------------------
  511. rounding: down
  512. rdvx101 divide 12345 1 -> 12345
  513. rdvx102 divide 12345 1.0001 -> 12343 Inexact Rounded
  514. rdvx103 divide 12345 1.001 -> 12332 Inexact Rounded
  515. rdvx104 divide 12345 1.01 -> 12222 Inexact Rounded
  516. rdvx105 divide 12345 1.1 -> 11222 Inexact Rounded
  517. rdvx106 divide 12355 4 -> 3088.7 Inexact Rounded
  518. rdvx107 divide 12345 4 -> 3086.2 Inexact Rounded
  519. rdvx108 divide 12355 4.0001 -> 3088.6 Inexact Rounded
  520. rdvx109 divide 12345 4.0001 -> 3086.1 Inexact Rounded
  521. rdvx110 divide 12345 4.9 -> 2519.3 Inexact Rounded
  522. rdvx111 divide 12345 4.99 -> 2473.9 Inexact Rounded
  523. rdvx112 divide 12345 4.999 -> 2469.4 Inexact Rounded
  524. rdvx113 divide 12345 4.9999 -> 2469.0 Inexact Rounded
  525. rdvx114 divide 12345 5 -> 2469
  526. rdvx115 divide 12345 5.0001 -> 2468.9 Inexact Rounded
  527. rdvx116 divide 12345 5.001 -> 2468.5 Inexact Rounded
  528. rdvx117 divide 12345 5.01 -> 2464.0 Inexact Rounded
  529. rdvx118 divide 12345 5.1 -> 2420.5 Inexact Rounded
  530. rounding: half_down
  531. rdvx201 divide 12345 1 -> 12345
  532. rdvx202 divide 12345 1.0001 -> 12344 Inexact Rounded
  533. rdvx203 divide 12345 1.001 -> 12333 Inexact Rounded
  534. rdvx204 divide 12345 1.01 -> 12223 Inexact Rounded
  535. rdvx205 divide 12345 1.1 -> 11223 Inexact Rounded
  536. rdvx206 divide 12355 4 -> 3088.7 Inexact Rounded
  537. rdvx207 divide 12345 4 -> 3086.2 Inexact Rounded
  538. rdvx208 divide 12355 4.0001 -> 3088.7 Inexact Rounded
  539. rdvx209 divide 12345 4.0001 -> 3086.2 Inexact Rounded
  540. rdvx210 divide 12345 4.9 -> 2519.4 Inexact Rounded
  541. rdvx211 divide 12345 4.99 -> 2473.9 Inexact Rounded
  542. rdvx212 divide 12345 4.999 -> 2469.5 Inexact Rounded
  543. rdvx213 divide 12345 4.9999 -> 2469.0 Inexact Rounded
  544. rdvx214 divide 12345 5 -> 2469
  545. rdvx215 divide 12345 5.0001 -> 2469.0 Inexact Rounded
  546. rdvx216 divide 12345 5.001 -> 2468.5 Inexact Rounded
  547. rdvx217 divide 12345 5.01 -> 2464.1 Inexact Rounded
  548. rdvx218 divide 12345 5.1 -> 2420.6 Inexact Rounded
  549. rounding: half_even
  550. rdvx301 divide 12345 1 -> 12345
  551. rdvx302 divide 12345 1.0001 -> 12344 Inexact Rounded
  552. rdvx303 divide 12345 1.001 -> 12333 Inexact Rounded
  553. rdvx304 divide 12345 1.01 -> 12223 Inexact Rounded
  554. rdvx305 divide 12345 1.1 -> 11223 Inexact Rounded
  555. rdvx306 divide 12355 4 -> 3088.8 Inexact Rounded
  556. rdvx307 divide 12345 4 -> 3086.2 Inexact Rounded
  557. rdvx308 divide 12355 4.0001 -> 3088.7 Inexact Rounded
  558. rdvx309 divide 12345 4.0001 -> 3086.2 Inexact Rounded
  559. rdvx310 divide 12345 4.9 -> 2519.4 Inexact Rounded
  560. rdvx311 divide 12345 4.99 -> 2473.9 Inexact Rounded
  561. rdvx312 divide 12345 4.999 -> 2469.5 Inexact Rounded
  562. rdvx313 divide 12345 4.9999 -> 2469.0 Inexact Rounded
  563. rdvx314 divide 12345 5 -> 2469
  564. rdvx315 divide 12345 5.0001 -> 2469.0 Inexact Rounded
  565. rdvx316 divide 12345 5.001 -> 2468.5 Inexact Rounded
  566. rdvx317 divide 12345 5.01 -> 2464.1 Inexact Rounded
  567. rdvx318 divide 12345 5.1 -> 2420.6 Inexact Rounded
  568. rounding: half_up
  569. rdvx401 divide 12345 1 -> 12345
  570. rdvx402 divide 12345 1.0001 -> 12344 Inexact Rounded
  571. rdvx403 divide 12345 1.001 -> 12333 Inexact Rounded
  572. rdvx404 divide 12345 1.01 -> 12223 Inexact Rounded
  573. rdvx405 divide 12345 1.1 -> 11223 Inexact Rounded
  574. rdvx406 divide 12355 4 -> 3088.8 Inexact Rounded
  575. rdvx407 divide 12345 4 -> 3086.3 Inexact Rounded
  576. rdvx408 divide 12355 4.0001 -> 3088.7 Inexact Rounded
  577. rdvx409 divide 12345 4.0001 -> 3086.2 Inexact Rounded
  578. rdvx410 divide 12345 4.9 -> 2519.4 Inexact Rounded
  579. rdvx411 divide 12345 4.99 -> 2473.9 Inexact Rounded
  580. rdvx412 divide 12345 4.999 -> 2469.5 Inexact Rounded
  581. rdvx413 divide 12345 4.9999 -> 2469.0 Inexact Rounded
  582. rdvx414 divide 12345 5 -> 2469
  583. rdvx415 divide 12345 5.0001 -> 2469.0 Inexact Rounded
  584. rdvx416 divide 12345 5.001 -> 2468.5 Inexact Rounded
  585. rdvx417 divide 12345 5.01 -> 2464.1 Inexact Rounded
  586. rdvx418 divide 12345 5.1 -> 2420.6 Inexact Rounded
  587. rounding: up
  588. rdvx501 divide 12345 1 -> 12345
  589. rdvx502 divide 12345 1.0001 -> 12344 Inexact Rounded
  590. rdvx503 divide 12345 1.001 -> 12333 Inexact Rounded
  591. rdvx504 divide 12345 1.01 -> 12223 Inexact Rounded
  592. rdvx505 divide 12345 1.1 -> 11223 Inexact Rounded
  593. rdvx506 divide 12355 4 -> 3088.8 Inexact Rounded
  594. rdvx507 divide 12345 4 -> 3086.3 Inexact Rounded
  595. rdvx508 divide 12355 4.0001 -> 3088.7 Inexact Rounded
  596. rdvx509 divide 12345 4.0001 -> 3086.2 Inexact Rounded
  597. rdvx510 divide 12345 4.9 -> 2519.4 Inexact Rounded
  598. rdvx511 divide 12345 4.99 -> 2474.0 Inexact Rounded
  599. rdvx512 divide 12345 4.999 -> 2469.5 Inexact Rounded
  600. rdvx513 divide 12345 4.9999 -> 2469.1 Inexact Rounded
  601. rdvx514 divide 12345 5 -> 2469
  602. rdvx515 divide 12345 5.0001 -> 2469.0 Inexact Rounded
  603. rdvx516 divide 12345 5.001 -> 2468.6 Inexact Rounded
  604. rdvx517 divide 12345 5.01 -> 2464.1 Inexact Rounded
  605. rdvx518 divide 12345 5.1 -> 2420.6 Inexact Rounded
  606. rounding: floor
  607. rdvx601 divide 12345 1 -> 12345
  608. rdvx602 divide 12345 1.0001 -> 12343 Inexact Rounded
  609. rdvx603 divide 12345 1.001 -> 12332 Inexact Rounded
  610. rdvx604 divide 12345 1.01 -> 12222 Inexact Rounded
  611. rdvx605 divide 12345 1.1 -> 11222 Inexact Rounded
  612. rdvx606 divide 12355 4 -> 3088.7 Inexact Rounded
  613. rdvx607 divide 12345 4 -> 3086.2 Inexact Rounded
  614. rdvx608 divide 12355 4.0001 -> 3088.6 Inexact Rounded
  615. rdvx609 divide 12345 4.0001 -> 3086.1 Inexact Rounded
  616. rdvx610 divide 12345 4.9 -> 2519.3 Inexact Rounded
  617. rdvx611 divide 12345 4.99 -> 2473.9 Inexact Rounded
  618. rdvx612 divide 12345 4.999 -> 2469.4 Inexact Rounded
  619. rdvx613 divide 12345 4.9999 -> 2469.0 Inexact Rounded
  620. rdvx614 divide 12345 5 -> 2469
  621. rdvx615 divide 12345 5.0001 -> 2468.9 Inexact Rounded
  622. rdvx616 divide 12345 5.001 -> 2468.5 Inexact Rounded
  623. rdvx617 divide 12345 5.01 -> 2464.0 Inexact Rounded
  624. rdvx618 divide 12345 5.1 -> 2420.5 Inexact Rounded
  625. rounding: ceiling
  626. rdvx701 divide 12345 1 -> 12345
  627. rdvx702 divide 12345 1.0001 -> 12344 Inexact Rounded
  628. rdvx703 divide 12345 1.001 -> 12333 Inexact Rounded
  629. rdvx704 divide 12345 1.01 -> 12223 Inexact Rounded
  630. rdvx705 divide 12345 1.1 -> 11223 Inexact Rounded
  631. rdvx706 divide 12355 4 -> 3088.8 Inexact Rounded
  632. rdvx707 divide 12345 4 -> 3086.3 Inexact Rounded
  633. rdvx708 divide 12355 4.0001 -> 3088.7 Inexact Rounded
  634. rdvx709 divide 12345 4.0001 -> 3086.2 Inexact Rounded
  635. rdvx710 divide 12345 4.9 -> 2519.4 Inexact Rounded
  636. rdvx711 divide 12345 4.99 -> 2474.0 Inexact Rounded
  637. rdvx712 divide 12345 4.999 -> 2469.5 Inexact Rounded
  638. rdvx713 divide 12345 4.9999 -> 2469.1 Inexact Rounded
  639. rdvx714 divide 12345 5 -> 2469
  640. rdvx715 divide 12345 5.0001 -> 2469.0 Inexact Rounded
  641. rdvx716 divide 12345 5.001 -> 2468.6 Inexact Rounded
  642. rdvx717 divide 12345 5.01 -> 2464.1 Inexact Rounded
  643. rdvx718 divide 12345 5.1 -> 2420.6 Inexact Rounded
  644. -- [divideInteger and remainder unaffected]
  645. -- Multiplication operator --------------------------------------------
  646. rounding: down
  647. rmux101 multiply 12345 1 -> 12345
  648. rmux102 multiply 12345 1.0001 -> 12346 Inexact Rounded
  649. rmux103 multiply 12345 1.001 -> 12357 Inexact Rounded
  650. rmux104 multiply 12345 1.01 -> 12468 Inexact Rounded
  651. rmux105 multiply 12345 1.1 -> 13579 Inexact Rounded
  652. rmux106 multiply 12345 4 -> 49380
  653. rmux107 multiply 12345 4.0001 -> 49381 Inexact Rounded
  654. rmux108 multiply 12345 4.9 -> 60490 Inexact Rounded
  655. rmux109 multiply 12345 4.99 -> 61601 Inexact Rounded
  656. rmux110 multiply 12345 4.999 -> 61712 Inexact Rounded
  657. rmux111 multiply 12345 4.9999 -> 61723 Inexact Rounded
  658. rmux112 multiply 12345 5 -> 61725
  659. rmux113 multiply 12345 5.0001 -> 61726 Inexact Rounded
  660. rmux114 multiply 12345 5.001 -> 61737 Inexact Rounded
  661. rmux115 multiply 12345 5.01 -> 61848 Inexact Rounded
  662. rmux116 multiply 12345 12 -> 1.4814E+5 Rounded
  663. rmux117 multiply 12345 13 -> 1.6048E+5 Inexact Rounded
  664. rmux118 multiply 12355 12 -> 1.4826E+5 Rounded
  665. rmux119 multiply 12355 13 -> 1.6061E+5 Inexact Rounded
  666. rounding: half_down
  667. rmux201 multiply 12345 1 -> 12345
  668. rmux202 multiply 12345 1.0001 -> 12346 Inexact Rounded
  669. rmux203 multiply 12345 1.001 -> 12357 Inexact Rounded
  670. rmux204 multiply 12345 1.01 -> 12468 Inexact Rounded
  671. rmux205 multiply 12345 1.1 -> 13579 Inexact Rounded
  672. rmux206 multiply 12345 4 -> 49380
  673. rmux207 multiply 12345 4.0001 -> 49381 Inexact Rounded
  674. rmux208 multiply 12345 4.9 -> 60490 Inexact Rounded
  675. rmux209 multiply 12345 4.99 -> 61602 Inexact Rounded
  676. rmux210 multiply 12345 4.999 -> 61713 Inexact Rounded
  677. rmux211 multiply 12345 4.9999 -> 61724 Inexact Rounded
  678. rmux212 multiply 12345 5 -> 61725
  679. rmux213 multiply 12345 5.0001 -> 61726 Inexact Rounded
  680. rmux214 multiply 12345 5.001 -> 61737 Inexact Rounded
  681. rmux215 multiply 12345 5.01 -> 61848 Inexact Rounded
  682. rmux216 multiply 12345 12 -> 1.4814E+5 Rounded
  683. rmux217 multiply 12345 13 -> 1.6048E+5 Inexact Rounded
  684. rmux218 multiply 12355 12 -> 1.4826E+5 Rounded
  685. rmux219 multiply 12355 13 -> 1.6061E+5 Inexact Rounded
  686. rounding: half_even
  687. rmux301 multiply 12345 1 -> 12345
  688. rmux302 multiply 12345 1.0001 -> 12346 Inexact Rounded
  689. rmux303 multiply 12345 1.001 -> 12357 Inexact Rounded
  690. rmux304 multiply 12345 1.01 -> 12468 Inexact Rounded
  691. rmux305 multiply 12345 1.1 -> 13580 Inexact Rounded
  692. rmux306 multiply 12345 4 -> 49380
  693. rmux307 multiply 12345 4.0001 -> 49381 Inexact Rounded
  694. rmux308 multiply 12345 4.9 -> 60490 Inexact Rounded
  695. rmux309 multiply 12345 4.99 -> 61602 Inexact Rounded
  696. rmux310 multiply 12345 4.999 -> 61713 Inexact Rounded
  697. rmux311 multiply 12345 4.9999 -> 61724 Inexact Rounded
  698. rmux312 multiply 12345 5 -> 61725
  699. rmux313 multiply 12345 5.0001 -> 61726 Inexact Rounded
  700. rmux314 multiply 12345 5.001 -> 61737 Inexact Rounded
  701. rmux315 multiply 12345 5.01 -> 61848 Inexact Rounded
  702. rmux316 multiply 12345 12 -> 1.4814E+5 Rounded
  703. rmux317 multiply 12345 13 -> 1.6048E+5 Inexact Rounded
  704. rmux318 multiply 12355 12 -> 1.4826E+5 Rounded
  705. rmux319 multiply 12355 13 -> 1.6062E+5 Inexact Rounded
  706. rounding: half_up
  707. rmux401 multiply 12345 1 -> 12345
  708. rmux402 multiply 12345 1.0001 -> 12346 Inexact Rounded
  709. rmux403 multiply 12345 1.001 -> 12357 Inexact Rounded
  710. rmux404 multiply 12345 1.01 -> 12468 Inexact Rounded
  711. rmux405 multiply 12345 1.1 -> 13580 Inexact Rounded
  712. rmux406 multiply 12345 4 -> 49380
  713. rmux407 multiply 12345 4.0001 -> 49381 Inexact Rounded
  714. rmux408 multiply 12345 4.9 -> 60491 Inexact Rounded
  715. rmux409 multiply 12345 4.99 -> 61602 Inexact Rounded
  716. rmux410 multiply 12345 4.999 -> 61713 Inexact Rounded
  717. rmux411 multiply 12345 4.9999 -> 61724 Inexact Rounded
  718. rmux412 multiply 12345 5 -> 61725
  719. rmux413 multiply 12345 5.0001 -> 61726 Inexact Rounded
  720. rmux414 multiply 12345 5.001 -> 61737 Inexact Rounded
  721. rmux415 multiply 12345 5.01 -> 61848 Inexact Rounded
  722. rmux416 multiply 12345 12 -> 1.4814E+5 Rounded
  723. rmux417 multiply 12345 13 -> 1.6049E+5 Inexact Rounded
  724. rmux418 multiply 12355 12 -> 1.4826E+5 Rounded
  725. rmux419 multiply 12355 13 -> 1.6062E+5 Inexact Rounded
  726. rounding: up
  727. rmux501 multiply 12345 1 -> 12345
  728. rmux502 multiply 12345 1.0001 -> 12347 Inexact Rounded
  729. rmux503 multiply 12345 1.001 -> 12358 Inexact Rounded
  730. rmux504 multiply 12345 1.01 -> 12469 Inexact Rounded
  731. rmux505 multiply 12345 1.1 -> 13580 Inexact Rounded
  732. rmux506 multiply 12345 4 -> 49380
  733. rmux507 multiply 12345 4.0001 -> 49382 Inexact Rounded
  734. rmux508 multiply 12345 4.9 -> 60491 Inexact Rounded
  735. rmux509 multiply 12345 4.99 -> 61602 Inexact Rounded
  736. rmux510 multiply 12345 4.999 -> 61713 Inexact Rounded
  737. rmux511 multiply 12345 4.9999 -> 61724 Inexact Rounded
  738. rmux512 multiply 12345 5 -> 61725
  739. rmux513 multiply 12345 5.0001 -> 61727 Inexact Rounded
  740. rmux514 multiply 12345 5.001 -> 61738 Inexact Rounded
  741. rmux515 multiply 12345 5.01 -> 61849 Inexact Rounded
  742. rmux516 multiply 12345 12 -> 1.4814E+5 Rounded
  743. rmux517 multiply 12345 13 -> 1.6049E+5 Inexact Rounded
  744. rmux518 multiply 12355 12 -> 1.4826E+5 Rounded
  745. rmux519 multiply 12355 13 -> 1.6062E+5 Inexact Rounded
  746. -- [rmux516 & rmux518] can surprise
  747. rounding: floor
  748. rmux601 multiply 12345 1 -> 12345
  749. rmux602 multiply 12345 1.0001 -> 12346 Inexact Rounded
  750. rmux603 multiply 12345 1.001 -> 12357 Inexact Rounded
  751. rmux604 multiply 12345 1.01 -> 12468 Inexact Rounded
  752. rmux605 multiply 12345 1.1 -> 13579 Inexact Rounded
  753. rmux606 multiply 12345 4 -> 49380
  754. rmux607 multiply 12345 4.0001 -> 49381 Inexact Rounded
  755. rmux608 multiply 12345 4.9 -> 60490 Inexact Rounded
  756. rmux609 multiply 12345 4.99 -> 61601 Inexact Rounded
  757. rmux610 multiply 12345 4.999 -> 61712 Inexact Rounded
  758. rmux611 multiply 12345 4.9999 -> 61723 Inexact Rounded
  759. rmux612 multiply 12345 5 -> 61725
  760. rmux613 multiply 12345 5.0001 -> 61726 Inexact Rounded
  761. rmux614 multiply 12345 5.001 -> 61737 Inexact Rounded
  762. rmux615 multiply 12345 5.01 -> 61848 Inexact Rounded
  763. rmux616 multiply 12345 12 -> 1.4814E+5 Rounded
  764. rmux617 multiply 12345 13 -> 1.6048E+5 Inexact Rounded
  765. rmux618 multiply 12355 12 -> 1.4826E+5 Rounded
  766. rmux619 multiply 12355 13 -> 1.6061E+5 Inexact Rounded
  767. rounding: ceiling
  768. rmux701 multiply 12345 1 -> 12345
  769. rmux702 multiply 12345 1.0001 -> 12347 Inexact Rounded
  770. rmux703 multiply 12345 1.001 -> 12358 Inexact Rounded
  771. rmux704 multiply 12345 1.01 -> 12469 Inexact Rounded
  772. rmux705 multiply 12345 1.1 -> 13580 Inexact Rounded
  773. rmux706 multiply 12345 4 -> 49380
  774. rmux707 multiply 12345 4.0001 -> 49382 Inexact Rounded
  775. rmux708 multiply 12345 4.9 -> 60491 Inexact Rounded
  776. rmux709 multiply 12345 4.99 -> 61602 Inexact Rounded
  777. rmux710 multiply 12345 4.999 -> 61713 Inexact Rounded
  778. rmux711 multiply 12345 4.9999 -> 61724 Inexact Rounded
  779. rmux712 multiply 12345 5 -> 61725
  780. rmux713 multiply 12345 5.0001 -> 61727 Inexact Rounded
  781. rmux714 multiply 12345 5.001 -> 61738 Inexact Rounded
  782. rmux715 multiply 12345 5.01 -> 61849 Inexact Rounded
  783. rmux716 multiply 12345 12 -> 1.4814E+5 Rounded
  784. rmux717 multiply 12345 13 -> 1.6049E+5 Inexact Rounded
  785. rmux718 multiply 12355 12 -> 1.4826E+5 Rounded
  786. rmux719 multiply 12355 13 -> 1.6062E+5 Inexact Rounded
  787. -- Power operator -----------------------------------------------------
  788. rounding: down
  789. rpox101 power 12345 -5 -> 3.4877E-21 Inexact Rounded
  790. rpox102 power 12345 -4 -> 4.3056E-17 Inexact Rounded
  791. rpox103 power 12345 -3 -> 5.3152E-13 Inexact Rounded
  792. rpox104 power 12345 -2 -> 6.5617E-9 Inexact Rounded
  793. rpox105 power 12345 -1 -> 0.000081004 Inexact Rounded
  794. rpox106 power 12345 0 -> 1
  795. rpox107 power 12345 1 -> 12345
  796. rpox108 power 12345 2 -> 1.5239E+8 Inexact Rounded
  797. rpox109 power 12345 3 -> 1.8813E+12 Inexact Rounded
  798. rpox110 power 12345 4 -> 2.3225E+16 Inexact Rounded
  799. rpox111 power 12345 5 -> 2.8671E+20 Inexact Rounded
  800. rpox112 power 415 2 -> 1.7222E+5 Inexact Rounded
  801. rpox113 power 75 3 -> 4.2187E+5 Inexact Rounded
  802. rounding: half_down
  803. rpox201 power 12345 -5 -> 3.4877E-21 Inexact Rounded
  804. rpox202 power 12345 -4 -> 4.3056E-17 Inexact Rounded
  805. rpox203 power 12345 -3 -> 5.3153E-13 Inexact Rounded
  806. rpox204 power 12345 -2 -> 6.5617E-9 Inexact Rounded
  807. rpox205 power 12345 -1 -> 0.000081004 Inexact Rounded
  808. rpox206 power 12345 0 -> 1
  809. rpox207 power 12345 1 -> 12345
  810. rpox208 power 12345 2 -> 1.5240E+8 Inexact Rounded
  811. rpox209 power 12345 3 -> 1.8814E+12 Inexact Rounded
  812. rpox210 power 12345 4 -> 2.3225E+16 Inexact Rounded
  813. rpox211 power 12345 5 -> 2.8672E+20 Inexact Rounded
  814. rpox212 power 415 2 -> 1.7222E+5 Inexact Rounded
  815. rpox213 power 75 3 -> 4.2187E+5 Inexact Rounded
  816. rounding: half_even
  817. rpox301 power 12345 -5 -> 3.4877E-21 Inexact Rounded
  818. rpox302 power 12345 -4 -> 4.3056E-17 Inexact Rounded
  819. rpox303 power 12345 -3 -> 5.3153E-13 Inexact Rounded
  820. rpox304 power 12345 -2 -> 6.5617E-9 Inexact Rounded
  821. rpox305 power 12345 -1 -> 0.000081004 Inexact Rounded
  822. rpox306 power 12345 0 -> 1
  823. rpox307 power 12345 1 -> 12345
  824. rpox308 power 12345 2 -> 1.5240E+8 Inexact Rounded
  825. rpox309 power 12345 3 -> 1.8814E+12 Inexact Rounded
  826. rpox310 power 12345 4 -> 2.3225E+16 Inexact Rounded
  827. rpox311 power 12345 5 -> 2.8672E+20 Inexact Rounded
  828. rpox312 power 415 2 -> 1.7222E+5 Inexact Rounded
  829. rpox313 power 75 3 -> 4.2188E+5 Inexact Rounded
  830. rounding: half_up
  831. rpox401 power 12345 -5 -> 3.4877E-21 Inexact Rounded
  832. rpox402 power 12345 -4 -> 4.3056E-17 Inexact Rounded
  833. rpox403 power 12345 -3 -> 5.3153E-13 Inexact Rounded
  834. rpox404 power 12345 -2 -> 6.5617E-9 Inexact Rounded
  835. rpox405 power 12345 -1 -> 0.000081004 Inexact Rounded
  836. rpox406 power 12345 0 -> 1
  837. rpox407 power 12345 1 -> 12345
  838. rpox408 power 12345 2 -> 1.5240E+8 Inexact Rounded
  839. rpox409 power 12345 3 -> 1.8814E+12 Inexact Rounded
  840. rpox410 power 12345 4 -> 2.3225E+16 Inexact Rounded
  841. rpox411 power 12345 5 -> 2.8672E+20 Inexact Rounded
  842. rpox412 power 415 2 -> 1.7223E+5 Inexact Rounded
  843. rpox413 power 75 3 -> 4.2188E+5 Inexact Rounded
  844. rounding: up
  845. rpox501 power 12345 -5 -> 3.4878E-21 Inexact Rounded
  846. rpox502 power 12345 -4 -> 4.3057E-17 Inexact Rounded
  847. rpox503 power 12345 -3 -> 5.3153E-13 Inexact Rounded
  848. rpox504 power 12345 -2 -> 6.5618E-9 Inexact Rounded
  849. rpox505 power 12345 -1 -> 0.000081005 Inexact Rounded
  850. rpox506 power 12345 0 -> 1
  851. rpox507 power 12345 1 -> 12345
  852. rpox508 power 12345 2 -> 1.5240E+8 Inexact Rounded
  853. rpox509 power 12345 3 -> 1.8814E+12 Inexact Rounded
  854. rpox510 power 12345 4 -> 2.3226E+16 Inexact Rounded
  855. rpox511 power 12345 5 -> 2.8672E+20 Inexact Rounded
  856. rpox512 power 415 2 -> 1.7223E+5 Inexact Rounded
  857. rpox513 power 75 3 -> 4.2188E+5 Inexact Rounded
  858. rounding: floor
  859. rpox601 power 12345 -5 -> 3.4877E-21 Inexact Rounded
  860. rpox602 power 12345 -4 -> 4.3056E-17 Inexact Rounded
  861. rpox603 power 12345 -3 -> 5.3152E-13 Inexact Rounded
  862. rpox604 power 12345 -2 -> 6.5617E-9 Inexact Rounded
  863. rpox605 power 12345 -1 -> 0.000081004 Inexact Rounded
  864. rpox606 power 12345 0 -> 1
  865. rpox607 power 12345 1 -> 12345
  866. rpox608 power 12345 2 -> 1.5239E+8 Inexact Rounded
  867. rpox609 power 12345 3 -> 1.8813E+12 Inexact Rounded
  868. rpox610 power 12345 4 -> 2.3225E+16 Inexact Rounded
  869. rpox611 power 12345 5 -> 2.8671E+20 Inexact Rounded
  870. rpox612 power 415 2 -> 1.7222E+5 Inexact Rounded
  871. rpox613 power 75 3 -> 4.2187E+5 Inexact Rounded
  872. rounding: ceiling
  873. rpox701 power 12345 -5 -> 3.4878E-21 Inexact Rounded
  874. rpox702 power 12345 -4 -> 4.3057E-17 Inexact Rounded
  875. rpox703 power 12345 -3 -> 5.3153E-13 Inexact Rounded
  876. rpox704 power 12345 -2 -> 6.5618E-9 Inexact Rounded
  877. rpox705 power 12345 -1 -> 0.000081005 Inexact Rounded
  878. rpox706 power 12345 0 -> 1
  879. rpox707 power 12345 1 -> 12345
  880. rpox708 power 12345 2 -> 1.5240E+8 Inexact Rounded
  881. rpox709 power 12345 3 -> 1.8814E+12 Inexact Rounded
  882. rpox710 power 12345 4 -> 2.3226E+16 Inexact Rounded
  883. rpox711 power 12345 5 -> 2.8672E+20 Inexact Rounded
  884. rpox712 power 415 2 -> 1.7223E+5 Inexact Rounded
  885. rpox713 power 75 3 -> 4.2188E+5 Inexact Rounded
  886. -- Underflow Subnormal and overflow values vary with rounding mode and sign
  887. maxexponent: 999999999
  888. minexponent: -999999999
  889. rounding: down
  890. rovx100 multiply 10 9E+999999999 -> 9.9999E+999999999 Overflow Inexact Rounded
  891. rovx101 multiply -10 9E+999999999 -> -9.9999E+999999999 Overflow Inexact Rounded
  892. rovx102 divide 1E-9 9E+999999999 -> 0E-1000000003 Underflow Subnormal Inexact Rounded Clamped
  893. rovx104 divide -1E-9 9E+999999999 -> -0E-1000000003 Underflow Subnormal Inexact Rounded Clamped
  894. rounding: up
  895. rovx110 multiply 10 9E+999999999 -> Infinity Overflow Inexact Rounded
  896. rovx111 multiply -10 9E+999999999 -> -Infinity Overflow Inexact Rounded
  897. rovx112 divide 1E-9 9E+999999999 -> 1E-1000000003 Underflow Subnormal Inexact Rounded
  898. rovx114 divide -1E-9 9E+999999999 -> -1E-1000000003 Underflow Subnormal Inexact Rounded
  899. rounding: ceiling
  900. rovx120 multiply 10 9E+999999999 -> Infinity Overflow Inexact Rounded
  901. rovx121 multiply -10 9E+999999999 -> -9.9999E+999999999 Overflow Inexact Rounded
  902. rovx122 divide 1E-9 9E+999999999 -> 1E-1000000003 Underflow Subnormal Inexact Rounded
  903. rovx124 divide -1E-9 9E+999999999 -> -0E-1000000003 Underflow Subnormal Inexact Rounded Clamped
  904. rounding: floor
  905. rovx130 multiply 10 9E+999999999 -> 9.9999E+999999999 Overflow Inexact Rounded
  906. rovx131 multiply -10 9E+999999999 -> -Infinity Overflow Inexact Rounded
  907. rovx132 divide 1E-9 9E+999999999 -> 0E-1000000003 Underflow Subnormal Inexact Rounded Clamped
  908. rovx134 divide -1E-9 9E+999999999 -> -1E-1000000003 Underflow Subnormal Inexact Rounded
  909. rounding: half_up
  910. rovx140 multiply 10 9E+999999999 -> Infinity Overflow Inexact Rounded
  911. rovx141 multiply -10 9E+999999999 -> -Infinity Overflow Inexact Rounded
  912. rovx142 divide 1E-9 9E+999999999 -> 0E-1000000003 Underflow Subnormal Inexact Rounded Clamped
  913. rovx144 divide -1E-9 9E+999999999 -> -0E-1000000003 Underflow Subnormal Inexact Rounded Clamped
  914. rounding: half_even
  915. rovx150 multiply 10 9E+999999999 -> Infinity Overflow Inexact Rounded
  916. rovx151 multiply -10 9E+999999999 -> -Infinity Overflow Inexact Rounded
  917. rovx152 divide 1E-9 9E+999999999 -> 0E-1000000003 Underflow Subnormal Inexact Rounded Clamped
  918. rovx154 divide -1E-9 9E+999999999 -> -0E-1000000003 Underflow Subnormal Inexact Rounded Clamped
  919. rounding: half_down
  920. rovx160 multiply 10 9E+999999999 -> Infinity Overflow Inexact Rounded
  921. rovx161 multiply -10 9E+999999999 -> -Infinity Overflow Inexact Rounded
  922. rovx162 divide 1E-9 9E+999999999 -> 0E-1000000003 Underflow Subnormal Inexact Rounded Clamped
  923. rovx164 divide -1E-9 9E+999999999 -> -0E-1000000003 Underflow Subnormal Inexact Rounded Clamped
  924. -- check maximum finite value over a range of precisions
  925. rounding: down
  926. precision: 1
  927. rovx200 multiply 10 9E+999999999 -> 9E+999999999 Overflow Inexact Rounded
  928. rovx201 multiply -10 9E+999999999 -> -9E+999999999 Overflow Inexact Rounded
  929. precision: 2
  930. rovx210 multiply 10 9E+999999999 -> 9.9E+999999999 Overflow Inexact Rounded
  931. rovx211 multiply -10 9E+999999999 -> -9.9E+999999999 Overflow Inexact Rounded
  932. precision: 3
  933. rovx220 multiply 10 9E+999999999 -> 9.99E+999999999 Overflow Inexact Rounded
  934. rovx221 multiply -10 9E+999999999 -> -9.99E+999999999 Overflow Inexact Rounded
  935. precision: 4
  936. rovx230 multiply 10 9E+999999999 -> 9.999E+999999999 Overflow Inexact Rounded
  937. rovx231 multiply -10 9E+999999999 -> -9.999E+999999999 Overflow Inexact Rounded
  938. precision: 5
  939. rovx240 multiply 10 9E+999999999 -> 9.9999E+999999999 Overflow Inexact Rounded
  940. rovx241 multiply -10 9E+999999999 -> -9.9999E+999999999 Overflow Inexact Rounded
  941. precision: 6
  942. rovx250 multiply 10 9E+999999999 -> 9.99999E+999999999 Overflow Inexact Rounded
  943. rovx251 multiply -10 9E+999999999 -> -9.99999E+999999999 Overflow Inexact Rounded
  944. precision: 7
  945. rovx260 multiply 10 9E+999999999 -> 9.999999E+999999999 Overflow Inexact Rounded
  946. rovx261 multiply -10 9E+999999999 -> -9.999999E+999999999 Overflow Inexact Rounded
  947. precision: 8
  948. rovx270 multiply 10 9E+999999999 -> 9.9999999E+999999999 Overflow Inexact Rounded
  949. rovx271 multiply -10 9E+999999999 -> -9.9999999E+999999999 Overflow Inexact Rounded
  950. precision: 9
  951. rovx280 multiply 10 9E+999999999 -> 9.99999999E+999999999 Overflow Inexact Rounded
  952. rovx281 multiply -10 9E+999999999 -> -9.99999999E+999999999 Overflow Inexact Rounded
  953. precision: 10
  954. rovx290 multiply 10 9E+999999999 -> 9.999999999E+999999999 Overflow Inexact Rounded
  955. rovx291 multiply -10 9E+999999999 -> -9.999999999E+999999999 Overflow Inexact Rounded
  956. -- reprise rounding mode effect (using multiplies so precision directive used)
  957. precision: 9
  958. maxexponent: 999999999
  959. rounding: half_up
  960. rmex400 multiply -9.999E+999999999 10 -> -Infinity Overflow Inexact Rounded
  961. rmex401 multiply 9.999E+999999999 10 -> Infinity Overflow Inexact Rounded
  962. rounding: half_down
  963. rmex402 multiply -9.999E+999999999 10 -> -Infinity Overflow Inexact Rounded
  964. rmex403 multiply 9.999E+999999999 10 -> Infinity Overflow Inexact Rounded
  965. rounding: half_even
  966. rmex404 multiply -9.999E+999999999 10 -> -Infinity Overflow Inexact Rounded
  967. rmex405 multiply 9.999E+999999999 10 -> Infinity Overflow Inexact Rounded
  968. rounding: floor
  969. rmex406 multiply -9.999E+999999999 10 -> -Infinity Overflow Inexact Rounded
  970. rmex407 multiply 9.999E+999999999 10 -> 9.99999999E+999999999 Overflow Inexact Rounded
  971. rounding: ceiling
  972. rmex408 multiply -9.999E+999999999 10 -> -9.99999999E+999999999 Overflow Inexact Rounded
  973. rmex409 multiply 9.999E+999999999 10 -> Infinity Overflow Inexact Rounded
  974. rounding: up
  975. rmex410 multiply -9.999E+999999999 10 -> -Infinity Overflow Inexact Rounded
  976. rmex411 multiply 9.999E+999999999 10 -> Infinity Overflow Inexact Rounded
  977. rounding: down
  978. rmex412 multiply -9.999E+999999999 10 -> -9.99999999E+999999999 Overflow Inexact Rounded
  979. rmex413 multiply 9.999E+999999999 10 -> 9.99999999E+999999999 Overflow Inexact Rounded
  980. ----- Round-for-reround -----
  981. rounding: 05up
  982. precision: 5 -- for easier visual inspection
  983. maxExponent: 999
  984. minexponent: -999
  985. -- basic rounding; really is just 0 and 5 up
  986. r05up001 add 12340 0.001 -> 12341 Inexact Rounded
  987. r05up002 add 12341 0.001 -> 12341 Inexact Rounded
  988. r05up003 add 12342 0.001 -> 12342 Inexact Rounded
  989. r05up004 add 12343 0.001 -> 12343 Inexact Rounded
  990. r05up005 add 12344 0.001 -> 12344 Inexact Rounded
  991. r05up006 add 12345 0.001 -> 12346 Inexact Rounded
  992. r05up007 add 12346 0.001 -> 12346 Inexact Rounded
  993. r05up008 add 12347 0.001 -> 12347 Inexact Rounded
  994. r05up009 add 12348 0.001 -> 12348 Inexact Rounded
  995. r05up010 add 12349 0.001 -> 12349 Inexact Rounded
  996. r05up011 add 12340 0.000 -> 12340 Rounded
  997. r05up012 add 12341 0.000 -> 12341 Rounded
  998. r05up013 add 12342 0.000 -> 12342 Rounded
  999. r05up014 add 12343 0.000 -> 12343 Rounded
  1000. r05up015 add 12344 0.000 -> 12344 Rounded
  1001. r05up016 add 12345 0.000 -> 12345 Rounded
  1002. r05up017 add 12346 0.000 -> 12346 Rounded
  1003. r05up018 add 12347 0.000 -> 12347 Rounded
  1004. r05up019 add 12348 0.000 -> 12348 Rounded
  1005. r05up020 add 12349 0.000 -> 12349 Rounded
  1006. r05up021 add 12340 0.901 -> 12341 Inexact Rounded
  1007. r05up022 add 12341 0.901 -> 12341 Inexact Rounded
  1008. r05up023 add 12342 0.901 -> 12342 Inexact Rounded
  1009. r05up024 add 12343 0.901 -> 12343 Inexact Rounded
  1010. r05up025 add 12344 0.901 -> 12344 Inexact Rounded
  1011. r05up026 add 12345 0.901 -> 12346 Inexact Rounded
  1012. r05up027 add 12346 0.901 -> 12346 Inexact Rounded
  1013. r05up028 add 12347 0.901 -> 12347 Inexact Rounded
  1014. r05up029 add 12348 0.901 -> 12348 Inexact Rounded
  1015. r05up030 add 12349 0.901 -> 12349 Inexact Rounded
  1016. r05up031 add -12340 -0.001 -> -12341 Inexact Rounded
  1017. r05up032 add -12341 -0.001 -> -12341 Inexact Rounded
  1018. r05up033 add -12342 -0.001 -> -12342 Inexact Rounded
  1019. r05up034 add -12343 -0.001 -> -12343 Inexact Rounded
  1020. r05up035 add -12344 -0.001 -> -12344 Inexact Rounded
  1021. r05up036 add -12345 -0.001 -> -12346 Inexact Rounded
  1022. r05up037 add -12346 -0.001 -> -12346 Inexact Rounded
  1023. r05up038 add -12347 -0.001 -> -12347 Inexact Rounded
  1024. r05up039 add -12348 -0.001 -> -12348 Inexact Rounded
  1025. r05up040 add -12349 -0.001 -> -12349 Inexact Rounded
  1026. r05up041 add -12340 0.001 -> -12339 Inexact Rounded
  1027. r05up042 add -12341 0.001 -> -12341 Inexact Rounded
  1028. r05up043 add -12342 0.001 -> -12341 Inexact Rounded
  1029. r05up044 add -12343 0.001 -> -12342 Inexact Rounded
  1030. r05up045 add -12344 0.001 -> -12343 Inexact Rounded
  1031. r05up046 add -12345 0.001 -> -12344 Inexact Rounded
  1032. r05up047 add -12346 0.001 -> -12346 Inexact Rounded
  1033. r05up048 add -12347 0.001 -> -12346 Inexact Rounded
  1034. r05up049 add -12348 0.001 -> -12347 Inexact Rounded
  1035. r05up050 add -12349 0.001 -> -12348 Inexact Rounded
  1036. -- Addition operators -------------------------------------------------
  1037. -- [The first few of these check negative residue possibilities; these
  1038. -- cases may be implemented as a negative residue in fastpaths]
  1039. r0adx100 add 12345 -0.1 -> 12344 Inexact Rounded
  1040. r0adx101 add 12345 -0.01 -> 12344 Inexact Rounded
  1041. r0adx102 add 12345 -0.001 -> 12344 Inexact Rounded
  1042. r0adx103 add 12345 -0.00001 -> 12344 Inexact Rounded
  1043. r0adx104 add 12345 -0.000001 -> 12344 Inexact Rounded
  1044. r0adx105 add 12345 -0.0000001 -> 12344 Inexact Rounded
  1045. r0adx106 add 12345 0 -> 12345
  1046. r0adx107 add 12345 0.0000001 -> 12346 Inexact Rounded
  1047. r0adx108 add 12345 0.000001 -> 12346 Inexact Rounded
  1048. r0adx109 add 12345 0.00001 -> 12346 Inexact Rounded
  1049. r0adx110 add 12345 0.0001 -> 12346 Inexact Rounded
  1050. r0adx111 add 12345 0.001 -> 12346 Inexact Rounded
  1051. r0adx112 add 12345 0.01 -> 12346 Inexact Rounded
  1052. r0adx113 add 12345 0.1 -> 12346 Inexact Rounded
  1053. r0adx115 add 12346 0.49999 -> 12346 Inexact Rounded
  1054. r0adx116 add 12346 0.5 -> 12346 Inexact Rounded
  1055. r0adx117 add 12346 0.50001 -> 12346 Inexact Rounded
  1056. r0adx120 add 12345 0.4 -> 12346 Inexact Rounded
  1057. r0adx121 add 12345 0.49 -> 12346 Inexact Rounded
  1058. r0adx122 add 12345 0.499 -> 12346 Inexact Rounded
  1059. r0adx123 add 12345 0.49999 -> 12346 Inexact Rounded
  1060. r0adx124 add 12345 0.5 -> 12346 Inexact Rounded
  1061. r0adx125 add 12345 0.50001 -> 12346 Inexact Rounded
  1062. r0adx126 add 12345 0.5001 -> 12346 Inexact Rounded
  1063. r0adx127 add 12345 0.501 -> 12346 Inexact Rounded
  1064. r0adx128 add 12345 0.51 -> 12346 Inexact Rounded
  1065. r0adx129 add 12345 0.6 -> 12346 Inexact Rounded
  1066. -- negatives...
  1067. r0sux100 add -12345 -0.1 -> -12346 Inexact Rounded
  1068. r0sux101 add -12345 -0.01 -> -12346 Inexact Rounded
  1069. r0sux102 add -12345 -0.001 -> -12346 Inexact Rounded
  1070. r0sux103 add -12345 -0.00001 -> -12346 Inexact Rounded
  1071. r0sux104 add -12345 -0.000001 -> -12346 Inexact Rounded
  1072. r0sux105 add -12345 -0.0000001 -> -12346 Inexact Rounded
  1073. r0sux106 add -12345 0 -> -12345
  1074. r0sux107 add -12345 0.0000001 -> -12344 Inexact Rounded
  1075. r0sux108 add -12345 0.000001 -> -12344 Inexact Rounded
  1076. r0sux109 add -12345 0.00001 -> -12344 Inexact Rounded
  1077. r0sux110 add -12345 0.0001 -> -12344 Inexact Rounded
  1078. r0sux111 add -12345 0.001 -> -12344 Inexact Rounded
  1079. r0sux112 add -12345 0.01 -> -12344 Inexact Rounded
  1080. r0sux113 add -12345 0.1 -> -12344 Inexact Rounded
  1081. r0sux115 add -12346 0.49999 -> -12346 Inexact Rounded
  1082. r0sux116 add -12346 0.5 -> -12346 Inexact Rounded
  1083. r0sux117 add -12346 0.50001 -> -12346 Inexact Rounded
  1084. r0sux120 add -12345 0.4 -> -12344 Inexact Rounded
  1085. r0sux121 add -12345 0.49 -> -12344 Inexact Rounded
  1086. r0sux122 add -12345 0.499 -> -12344 Inexact Rounded
  1087. r0sux123 add -12345 0.49999 -> -12344 Inexact Rounded
  1088. r0sux124 add -12345 0.5 -> -12344 Inexact Rounded
  1089. r0sux125 add -12345 0.50001 -> -12344 Inexact Rounded
  1090. r0sux126 add -12345 0.5001 -> -12344 Inexact Rounded
  1091. r0sux127 add -12345 0.501 -> -12344 Inexact Rounded
  1092. r0sux128 add -12345 0.51 -> -12344 Inexact Rounded
  1093. r0sux129 add -12345 0.6 -> -12344 Inexact Rounded
  1094. -- Check cancellation subtractions
  1095. -- (The IEEE 854 'curious rule' in $6.3)
  1096. r0zex001 add 0 0 -> 0
  1097. r0zex002 add 0 -0 -> 0
  1098. r0zex003 add -0 0 -> 0
  1099. r0zex004 add -0 -0 -> -0
  1100. r0zex005 add 1 -1 -> 0
  1101. r0zex006 add -1 1 -> 0
  1102. r0zex007 add 1.5 -1.5 -> 0.0
  1103. r0zex008 add -1.5 1.5 -> 0.0
  1104. r0zex009 add 2 -2 -> 0
  1105. r0zex010 add -2 2 -> 0
  1106. -- Division operators -------------------------------------------------
  1107. r0dvx101 divide 12345 1 -> 12345
  1108. r0dvx102 divide 12345 1.0001 -> 12343 Inexact Rounded
  1109. r0dvx103 divide 12345 1.001 -> 12332 Inexact Rounded
  1110. r0dvx104 divide 12345 1.01 -> 12222 Inexact Rounded
  1111. r0dvx105 divide 12345 1.1 -> 11222 Inexact Rounded
  1112. r0dvx106 divide 12355 4 -> 3088.7 Inexact Rounded
  1113. r0dvx107 divide 12345 4 -> 3086.2 Inexact Rounded
  1114. r0dvx108 divide 12355 4.0001 -> 3088.6 Inexact Rounded
  1115. r0dvx109 divide 12345 4.0001 -> 3086.1 Inexact Rounded
  1116. r0dvx110 divide 12345 4.9 -> 2519.3 Inexact Rounded
  1117. r0dvx111 divide 12345 4.99 -> 2473.9 Inexact Rounded
  1118. r0dvx112 divide 12345 4.999 -> 2469.4 Inexact Rounded
  1119. r0dvx113 divide 12345 4.9999 -> 2469.1 Inexact Rounded
  1120. r0dvx114 divide 12345 5 -> 2469
  1121. r0dvx115 divide 12345 5.0001 -> 2468.9 Inexact Rounded
  1122. r0dvx116 divide 12345 5.001 -> 2468.6 Inexact Rounded
  1123. r0dvx117 divide 12345 5.01 -> 2464.1 Inexact Rounded
  1124. r0dvx118 divide 12345 5.1 -> 2420.6 Inexact Rounded
  1125. -- [divideInteger and remainder unaffected]
  1126. -- Multiplication operator --------------------------------------------
  1127. r0mux101 multiply 12345 1 -> 12345
  1128. r0mux102 multiply 12345 1.0001 -> 12346 Inexact Rounded
  1129. r0mux103 multiply 12345 1.001 -> 12357 Inexact Rounded
  1130. r0mux104 multiply 12345 1.01 -> 12468 Inexact Rounded
  1131. r0mux105 multiply 12345 1.1 -> 13579 Inexact Rounded
  1132. r0mux106 multiply 12345 4 -> 49380
  1133. r0mux107 multiply 12345 4.0001 -> 49381 Inexact Rounded
  1134. r0mux108 multiply 12345 4.9 -> 60491 Inexact Rounded
  1135. r0mux109 multiply 12345 4.99 -> 61601 Inexact Rounded
  1136. r0mux110 multiply 12345 4.999 -> 61712 Inexact Rounded
  1137. r0mux111 multiply 12345 4.9999 -> 61723 Inexact Rounded
  1138. r0mux112 multiply 12345 5 -> 61725
  1139. r0mux113 multiply 12345 5.0001 -> 61726 Inexact Rounded
  1140. r0mux114 multiply 12345 5.001 -> 61737 Inexact Rounded
  1141. r0mux115 multiply 12345 5.01 -> 61848 Inexact Rounded
  1142. r0mux116 multiply 12345 12 -> 1.4814E+5 Rounded
  1143. r0mux117 multiply 12345 13 -> 1.6048E+5 Inexact Rounded
  1144. r0mux118 multiply 12355 12 -> 1.4826E+5 Rounded
  1145. r0mux119 multiply 12355 13 -> 1.6061E+5 Inexact Rounded
  1146. -- Power operator -----------------------------------------------------
  1147. r0pox101 power 12345 -5 -> 3.4877E-21 Inexact Rounded
  1148. r0pox102 power 12345 -4 -> 4.3056E-17 Inexact Rounded
  1149. r0pox103 power 12345 -3 -> 5.3152E-13 Inexact Rounded
  1150. r0pox104 power 12345 -2 -> 6.5617E-9 Inexact Rounded
  1151. r0pox105 power 12345 -1 -> 0.000081004 Inexact Rounded
  1152. r0pox106 power 12345 0 -> 1
  1153. r0pox107 power 12345 1 -> 12345
  1154. r0pox108 power 12345 2 -> 1.5239E+8 Inexact Rounded
  1155. r0pox109 power 12345 3 -> 1.8813E+12 Inexact Rounded
  1156. r0pox110 power 12345 4 -> 2.3226E+16 Inexact Rounded
  1157. r0pox111 power 12345 5 -> 2.8671E+20 Inexact Rounded
  1158. r0pox112 power 415 2 -> 1.7222E+5 Inexact Rounded
  1159. r0pox113 power 75 3 -> 4.2187E+5 Inexact Rounded
  1160. -- Underflow Subnormal and overflow values vary with rounding mode and sign
  1161. maxexponent: 999999999
  1162. minexponent: -999999999
  1163. -- [round down gives Nmax on first two and .0E... on the next two]
  1164. r0ovx100 multiply 10 9E+999999999 -> 9.9999E+999999999 Overflow Inexact Rounded
  1165. r0ovx101 multiply -10 9E+999999999 -> -9.9999E+999999999 Overflow Inexact Rounded
  1166. r0ovx102 divide 1E-9 9E+999999999 -> 1E-1000000003 Underflow Subnormal Inexact Rounded
  1167. r0ovx104 divide -1E-9 9E+999999999 -> -1E-1000000003 Underflow Subnormal Inexact Rounded
  1168. -- reprise rounding mode effect (using multiplies so precision directive used)
  1169. precision: 9
  1170. maxexponent: 999999999
  1171. r0mex412 multiply -9.999E+999999999 10 -> -9.99999999E+999999999 Overflow Inexact Rounded
  1172. r0mex413 multiply 9.999E+999999999 10 -> 9.99999999E+999999999 Overflow Inexact Rounded