rescale.decTest 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  1. ------------------------------------------------------------------------
  2. -- rescale.decTest -- decimal rescale operation --
  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. -- [obsolete] Quantize.decTest has the improved version
  22. -- 2004.03.15 Underflow for quantize is suppressed
  23. extended: 1
  24. precision: 9
  25. rounding: half_up
  26. maxExponent: 999
  27. minexponent: -999
  28. -- sanity checks
  29. resx001 rescale 0 0 -> 0
  30. resx002 rescale 1 0 -> 1
  31. resx003 rescale 0.1 +2 -> 0E+2 Inexact Rounded
  32. resx005 rescale 0.1 +1 -> 0E+1 Inexact Rounded
  33. resx006 rescale 0.1 0 -> 0 Inexact Rounded
  34. resx007 rescale 0.1 -1 -> 0.1
  35. resx008 rescale 0.1 -2 -> 0.10
  36. resx009 rescale 0.1 -3 -> 0.100
  37. resx010 rescale 0.9 +2 -> 0E+2 Inexact Rounded
  38. resx011 rescale 0.9 +1 -> 0E+1 Inexact Rounded
  39. resx012 rescale 0.9 +0 -> 1 Inexact Rounded
  40. resx013 rescale 0.9 -1 -> 0.9
  41. resx014 rescale 0.9 -2 -> 0.90
  42. resx015 rescale 0.9 -3 -> 0.900
  43. -- negatives
  44. resx021 rescale -0 0 -> -0
  45. resx022 rescale -1 0 -> -1
  46. resx023 rescale -0.1 +2 -> -0E+2 Inexact Rounded
  47. resx025 rescale -0.1 +1 -> -0E+1 Inexact Rounded
  48. resx026 rescale -0.1 0 -> -0 Inexact Rounded
  49. resx027 rescale -0.1 -1 -> -0.1
  50. resx028 rescale -0.1 -2 -> -0.10
  51. resx029 rescale -0.1 -3 -> -0.100
  52. resx030 rescale -0.9 +2 -> -0E+2 Inexact Rounded
  53. resx031 rescale -0.9 +1 -> -0E+1 Inexact Rounded
  54. resx032 rescale -0.9 +0 -> -1 Inexact Rounded
  55. resx033 rescale -0.9 -1 -> -0.9
  56. resx034 rescale -0.9 -2 -> -0.90
  57. resx035 rescale -0.9 -3 -> -0.900
  58. resx036 rescale -0.5 +2 -> -0E+2 Inexact Rounded
  59. resx037 rescale -0.5 +1 -> -0E+1 Inexact Rounded
  60. resx038 rescale -0.5 +0 -> -1 Inexact Rounded
  61. resx039 rescale -0.5 -1 -> -0.5
  62. resx040 rescale -0.5 -2 -> -0.50
  63. resx041 rescale -0.5 -3 -> -0.500
  64. resx042 rescale -0.9 +2 -> -0E+2 Inexact Rounded
  65. resx043 rescale -0.9 +1 -> -0E+1 Inexact Rounded
  66. resx044 rescale -0.9 +0 -> -1 Inexact Rounded
  67. resx045 rescale -0.9 -1 -> -0.9
  68. resx046 rescale -0.9 -2 -> -0.90
  69. resx047 rescale -0.9 -3 -> -0.900
  70. -- examples from Specification
  71. resx060 rescale 2.17 -3 -> 2.170
  72. resx061 rescale 2.17 -2 -> 2.17
  73. resx062 rescale 2.17 -1 -> 2.2 Inexact Rounded
  74. resx063 rescale 2.17 0 -> 2 Inexact Rounded
  75. resx064 rescale 2.17 +1 -> 0E+1 Inexact Rounded
  76. resx065 rescale 2 Inf -> NaN Invalid_operation
  77. resx066 rescale -0.1 0 -> -0 Inexact Rounded
  78. resx067 rescale -0 5 -> -0E+5
  79. resx068 rescale +35236450.6 -2 -> NaN Invalid_operation
  80. resx069 rescale -35236450.6 -2 -> NaN Invalid_operation
  81. resx070 rescale 217 -1 -> 217.0
  82. resx071 rescale 217 0 -> 217
  83. resx072 rescale 217 +1 -> 2.2E+2 Inexact Rounded
  84. resx073 rescale 217 +2 -> 2E+2 Inexact Rounded
  85. -- general tests ..
  86. resx089 rescale 12 +4 -> 0E+4 Inexact Rounded
  87. resx090 rescale 12 +3 -> 0E+3 Inexact Rounded
  88. resx091 rescale 12 +2 -> 0E+2 Inexact Rounded
  89. resx092 rescale 12 +1 -> 1E+1 Inexact Rounded
  90. resx093 rescale 1.2345 -2 -> 1.23 Inexact Rounded
  91. resx094 rescale 1.2355 -2 -> 1.24 Inexact Rounded
  92. resx095 rescale 1.2345 -6 -> 1.234500
  93. resx096 rescale 9.9999 -2 -> 10.00 Inexact Rounded
  94. resx097 rescale 0.0001 -2 -> 0.00 Inexact Rounded
  95. resx098 rescale 0.001 -2 -> 0.00 Inexact Rounded
  96. resx099 rescale 0.009 -2 -> 0.01 Inexact Rounded
  97. resx100 rescale 92 +2 -> 1E+2 Inexact Rounded
  98. resx101 rescale -1 0 -> -1
  99. resx102 rescale -1 -1 -> -1.0
  100. resx103 rescale -1 -2 -> -1.00
  101. resx104 rescale 0 0 -> 0
  102. resx105 rescale 0 -1 -> 0.0
  103. resx106 rescale 0 -2 -> 0.00
  104. resx107 rescale 0.00 0 -> 0
  105. resx108 rescale 0 +1 -> 0E+1
  106. resx109 rescale 0 +2 -> 0E+2
  107. resx110 rescale +1 0 -> 1
  108. resx111 rescale +1 -1 -> 1.0
  109. resx112 rescale +1 -2 -> 1.00
  110. resx120 rescale 1.04 -3 -> 1.040
  111. resx121 rescale 1.04 -2 -> 1.04
  112. resx122 rescale 1.04 -1 -> 1.0 Inexact Rounded
  113. resx123 rescale 1.04 0 -> 1 Inexact Rounded
  114. resx124 rescale 1.05 -3 -> 1.050
  115. resx125 rescale 1.05 -2 -> 1.05
  116. resx126 rescale 1.05 -1 -> 1.1 Inexact Rounded
  117. resx127 rescale 1.05 0 -> 1 Inexact Rounded
  118. resx128 rescale 1.05 -3 -> 1.050
  119. resx129 rescale 1.05 -2 -> 1.05
  120. resx130 rescale 1.05 -1 -> 1.1 Inexact Rounded
  121. resx131 rescale 1.05 0 -> 1 Inexact Rounded
  122. resx132 rescale 1.06 -3 -> 1.060
  123. resx133 rescale 1.06 -2 -> 1.06
  124. resx134 rescale 1.06 -1 -> 1.1 Inexact Rounded
  125. resx135 rescale 1.06 0 -> 1 Inexact Rounded
  126. resx140 rescale -10 -2 -> -10.00
  127. resx141 rescale +1 -2 -> 1.00
  128. resx142 rescale +10 -2 -> 10.00
  129. resx143 rescale 1E+10 -2 -> NaN Invalid_operation
  130. resx144 rescale 1E-10 -2 -> 0.00 Inexact Rounded
  131. resx145 rescale 1E-3 -2 -> 0.00 Inexact Rounded
  132. resx146 rescale 1E-2 -2 -> 0.01
  133. resx147 rescale 1E-1 -2 -> 0.10
  134. resx148 rescale 0E-10 -2 -> 0.00
  135. resx150 rescale 1.0600 -5 -> 1.06000
  136. resx151 rescale 1.0600 -4 -> 1.0600
  137. resx152 rescale 1.0600 -3 -> 1.060 Rounded
  138. resx153 rescale 1.0600 -2 -> 1.06 Rounded
  139. resx154 rescale 1.0600 -1 -> 1.1 Inexact Rounded
  140. resx155 rescale 1.0600 0 -> 1 Inexact Rounded
  141. -- +ve exponents ..
  142. resx201 rescale -1 +0 -> -1
  143. resx202 rescale -1 +1 -> -0E+1 Inexact Rounded
  144. resx203 rescale -1 +2 -> -0E+2 Inexact Rounded
  145. resx204 rescale 0 +0 -> 0
  146. resx205 rescale 0 +1 -> 0E+1
  147. resx206 rescale 0 +2 -> 0E+2
  148. resx207 rescale +1 +0 -> 1
  149. resx208 rescale +1 +1 -> 0E+1 Inexact Rounded
  150. resx209 rescale +1 +2 -> 0E+2 Inexact Rounded
  151. resx220 rescale 1.04 +3 -> 0E+3 Inexact Rounded
  152. resx221 rescale 1.04 +2 -> 0E+2 Inexact Rounded
  153. resx222 rescale 1.04 +1 -> 0E+1 Inexact Rounded
  154. resx223 rescale 1.04 +0 -> 1 Inexact Rounded
  155. resx224 rescale 1.05 +3 -> 0E+3 Inexact Rounded
  156. resx225 rescale 1.05 +2 -> 0E+2 Inexact Rounded
  157. resx226 rescale 1.05 +1 -> 0E+1 Inexact Rounded
  158. resx227 rescale 1.05 +0 -> 1 Inexact Rounded
  159. resx228 rescale 1.05 +3 -> 0E+3 Inexact Rounded
  160. resx229 rescale 1.05 +2 -> 0E+2 Inexact Rounded
  161. resx230 rescale 1.05 +1 -> 0E+1 Inexact Rounded
  162. resx231 rescale 1.05 +0 -> 1 Inexact Rounded
  163. resx232 rescale 1.06 +3 -> 0E+3 Inexact Rounded
  164. resx233 rescale 1.06 +2 -> 0E+2 Inexact Rounded
  165. resx234 rescale 1.06 +1 -> 0E+1 Inexact Rounded
  166. resx235 rescale 1.06 +0 -> 1 Inexact Rounded
  167. resx240 rescale -10 +1 -> -1E+1 Rounded
  168. resx241 rescale +1 +1 -> 0E+1 Inexact Rounded
  169. resx242 rescale +10 +1 -> 1E+1 Rounded
  170. resx243 rescale 1E+1 +1 -> 1E+1 -- underneath this is E+1
  171. resx244 rescale 1E+2 +1 -> 1.0E+2 -- underneath this is E+1
  172. resx245 rescale 1E+3 +1 -> 1.00E+3 -- underneath this is E+1
  173. resx246 rescale 1E+4 +1 -> 1.000E+4 -- underneath this is E+1
  174. resx247 rescale 1E+5 +1 -> 1.0000E+5 -- underneath this is E+1
  175. resx248 rescale 1E+6 +1 -> 1.00000E+6 -- underneath this is E+1
  176. resx249 rescale 1E+7 +1 -> 1.000000E+7 -- underneath this is E+1
  177. resx250 rescale 1E+8 +1 -> 1.0000000E+8 -- underneath this is E+1
  178. resx251 rescale 1E+9 +1 -> 1.00000000E+9 -- underneath this is E+1
  179. -- next one tries to add 9 zeros
  180. resx252 rescale 1E+10 +1 -> NaN Invalid_operation
  181. resx253 rescale 1E-10 +1 -> 0E+1 Inexact Rounded
  182. resx254 rescale 1E-2 +1 -> 0E+1 Inexact Rounded
  183. resx255 rescale 0E-10 +1 -> 0E+1
  184. resx256 rescale -0E-10 +1 -> -0E+1
  185. resx257 rescale -0E-1 +1 -> -0E+1
  186. resx258 rescale -0 +1 -> -0E+1
  187. resx259 rescale -0E+1 +1 -> -0E+1
  188. resx260 rescale -10 +2 -> -0E+2 Inexact Rounded
  189. resx261 rescale +1 +2 -> 0E+2 Inexact Rounded
  190. resx262 rescale +10 +2 -> 0E+2 Inexact Rounded
  191. resx263 rescale 1E+1 +2 -> 0E+2 Inexact Rounded
  192. resx264 rescale 1E+2 +2 -> 1E+2
  193. resx265 rescale 1E+3 +2 -> 1.0E+3
  194. resx266 rescale 1E+4 +2 -> 1.00E+4
  195. resx267 rescale 1E+5 +2 -> 1.000E+5
  196. resx268 rescale 1E+6 +2 -> 1.0000E+6
  197. resx269 rescale 1E+7 +2 -> 1.00000E+7
  198. resx270 rescale 1E+8 +2 -> 1.000000E+8
  199. resx271 rescale 1E+9 +2 -> 1.0000000E+9
  200. resx272 rescale 1E+10 +2 -> 1.00000000E+10
  201. resx273 rescale 1E-10 +2 -> 0E+2 Inexact Rounded
  202. resx274 rescale 1E-2 +2 -> 0E+2 Inexact Rounded
  203. resx275 rescale 0E-10 +2 -> 0E+2
  204. resx280 rescale -10 +3 -> -0E+3 Inexact Rounded
  205. resx281 rescale +1 +3 -> 0E+3 Inexact Rounded
  206. resx282 rescale +10 +3 -> 0E+3 Inexact Rounded
  207. resx283 rescale 1E+1 +3 -> 0E+3 Inexact Rounded
  208. resx284 rescale 1E+2 +3 -> 0E+3 Inexact Rounded
  209. resx285 rescale 1E+3 +3 -> 1E+3
  210. resx286 rescale 1E+4 +3 -> 1.0E+4
  211. resx287 rescale 1E+5 +3 -> 1.00E+5
  212. resx288 rescale 1E+6 +3 -> 1.000E+6
  213. resx289 rescale 1E+7 +3 -> 1.0000E+7
  214. resx290 rescale 1E+8 +3 -> 1.00000E+8
  215. resx291 rescale 1E+9 +3 -> 1.000000E+9
  216. resx292 rescale 1E+10 +3 -> 1.0000000E+10
  217. resx293 rescale 1E-10 +3 -> 0E+3 Inexact Rounded
  218. resx294 rescale 1E-2 +3 -> 0E+3 Inexact Rounded
  219. resx295 rescale 0E-10 +3 -> 0E+3
  220. -- round up from below [sign wrong in JIT compiler once]
  221. resx300 rescale 0.0078 -5 -> 0.00780
  222. resx301 rescale 0.0078 -4 -> 0.0078
  223. resx302 rescale 0.0078 -3 -> 0.008 Inexact Rounded
  224. resx303 rescale 0.0078 -2 -> 0.01 Inexact Rounded
  225. resx304 rescale 0.0078 -1 -> 0.0 Inexact Rounded
  226. resx305 rescale 0.0078 0 -> 0 Inexact Rounded
  227. resx306 rescale 0.0078 +1 -> 0E+1 Inexact Rounded
  228. resx307 rescale 0.0078 +2 -> 0E+2 Inexact Rounded
  229. resx310 rescale -0.0078 -5 -> -0.00780
  230. resx311 rescale -0.0078 -4 -> -0.0078
  231. resx312 rescale -0.0078 -3 -> -0.008 Inexact Rounded
  232. resx313 rescale -0.0078 -2 -> -0.01 Inexact Rounded
  233. resx314 rescale -0.0078 -1 -> -0.0 Inexact Rounded
  234. resx315 rescale -0.0078 0 -> -0 Inexact Rounded
  235. resx316 rescale -0.0078 +1 -> -0E+1 Inexact Rounded
  236. resx317 rescale -0.0078 +2 -> -0E+2 Inexact Rounded
  237. resx320 rescale 0.078 -5 -> 0.07800
  238. resx321 rescale 0.078 -4 -> 0.0780
  239. resx322 rescale 0.078 -3 -> 0.078
  240. resx323 rescale 0.078 -2 -> 0.08 Inexact Rounded
  241. resx324 rescale 0.078 -1 -> 0.1 Inexact Rounded
  242. resx325 rescale 0.078 0 -> 0 Inexact Rounded
  243. resx326 rescale 0.078 +1 -> 0E+1 Inexact Rounded
  244. resx327 rescale 0.078 +2 -> 0E+2 Inexact Rounded
  245. resx330 rescale -0.078 -5 -> -0.07800
  246. resx331 rescale -0.078 -4 -> -0.0780
  247. resx332 rescale -0.078 -3 -> -0.078
  248. resx333 rescale -0.078 -2 -> -0.08 Inexact Rounded
  249. resx334 rescale -0.078 -1 -> -0.1 Inexact Rounded
  250. resx335 rescale -0.078 0 -> -0 Inexact Rounded
  251. resx336 rescale -0.078 +1 -> -0E+1 Inexact Rounded
  252. resx337 rescale -0.078 +2 -> -0E+2 Inexact Rounded
  253. resx340 rescale 0.78 -5 -> 0.78000
  254. resx341 rescale 0.78 -4 -> 0.7800
  255. resx342 rescale 0.78 -3 -> 0.780
  256. resx343 rescale 0.78 -2 -> 0.78
  257. resx344 rescale 0.78 -1 -> 0.8 Inexact Rounded
  258. resx345 rescale 0.78 0 -> 1 Inexact Rounded
  259. resx346 rescale 0.78 +1 -> 0E+1 Inexact Rounded
  260. resx347 rescale 0.78 +2 -> 0E+2 Inexact Rounded
  261. resx350 rescale -0.78 -5 -> -0.78000
  262. resx351 rescale -0.78 -4 -> -0.7800
  263. resx352 rescale -0.78 -3 -> -0.780
  264. resx353 rescale -0.78 -2 -> -0.78
  265. resx354 rescale -0.78 -1 -> -0.8 Inexact Rounded
  266. resx355 rescale -0.78 0 -> -1 Inexact Rounded
  267. resx356 rescale -0.78 +1 -> -0E+1 Inexact Rounded
  268. resx357 rescale -0.78 +2 -> -0E+2 Inexact Rounded
  269. resx360 rescale 7.8 -5 -> 7.80000
  270. resx361 rescale 7.8 -4 -> 7.8000
  271. resx362 rescale 7.8 -3 -> 7.800
  272. resx363 rescale 7.8 -2 -> 7.80
  273. resx364 rescale 7.8 -1 -> 7.8
  274. resx365 rescale 7.8 0 -> 8 Inexact Rounded
  275. resx366 rescale 7.8 +1 -> 1E+1 Inexact Rounded
  276. resx367 rescale 7.8 +2 -> 0E+2 Inexact Rounded
  277. resx368 rescale 7.8 +3 -> 0E+3 Inexact Rounded
  278. resx370 rescale -7.8 -5 -> -7.80000
  279. resx371 rescale -7.8 -4 -> -7.8000
  280. resx372 rescale -7.8 -3 -> -7.800
  281. resx373 rescale -7.8 -2 -> -7.80
  282. resx374 rescale -7.8 -1 -> -7.8
  283. resx375 rescale -7.8 0 -> -8 Inexact Rounded
  284. resx376 rescale -7.8 +1 -> -1E+1 Inexact Rounded
  285. resx377 rescale -7.8 +2 -> -0E+2 Inexact Rounded
  286. resx378 rescale -7.8 +3 -> -0E+3 Inexact Rounded
  287. -- some individuals
  288. precision: 9
  289. resx380 rescale 352364.506 -2 -> 352364.51 Inexact Rounded
  290. resx381 rescale 3523645.06 -2 -> 3523645.06
  291. resx382 rescale 35236450.6 -2 -> NaN Invalid_operation
  292. resx383 rescale 352364506 -2 -> NaN Invalid_operation
  293. resx384 rescale -352364.506 -2 -> -352364.51 Inexact Rounded
  294. resx385 rescale -3523645.06 -2 -> -3523645.06
  295. resx386 rescale -35236450.6 -2 -> NaN Invalid_operation
  296. resx387 rescale -352364506 -2 -> NaN Invalid_operation
  297. rounding: down
  298. resx389 rescale 35236450.6 -2 -> NaN Invalid_operation
  299. -- ? should that one instead have been:
  300. -- resx389 rescale 35236450.6 -2 -> NaN Invalid_operation
  301. rounding: half_up
  302. -- and a few more from e-mail discussions
  303. precision: 7
  304. resx391 rescale 12.34567 -3 -> 12.346 Inexact Rounded
  305. resx392 rescale 123.4567 -3 -> 123.457 Inexact Rounded
  306. resx393 rescale 1234.567 -3 -> 1234.567
  307. resx394 rescale 12345.67 -3 -> NaN Invalid_operation
  308. resx395 rescale 123456.7 -3 -> NaN Invalid_operation
  309. resx396 rescale 1234567. -3 -> NaN Invalid_operation
  310. -- some 9999 round-up cases
  311. precision: 9
  312. resx400 rescale 9.999 -5 -> 9.99900
  313. resx401 rescale 9.999 -4 -> 9.9990
  314. resx402 rescale 9.999 -3 -> 9.999
  315. resx403 rescale 9.999 -2 -> 10.00 Inexact Rounded
  316. resx404 rescale 9.999 -1 -> 10.0 Inexact Rounded
  317. resx405 rescale 9.999 0 -> 10 Inexact Rounded
  318. resx406 rescale 9.999 1 -> 1E+1 Inexact Rounded
  319. resx407 rescale 9.999 2 -> 0E+2 Inexact Rounded
  320. resx410 rescale 0.999 -5 -> 0.99900
  321. resx411 rescale 0.999 -4 -> 0.9990
  322. resx412 rescale 0.999 -3 -> 0.999
  323. resx413 rescale 0.999 -2 -> 1.00 Inexact Rounded
  324. resx414 rescale 0.999 -1 -> 1.0 Inexact Rounded
  325. resx415 rescale 0.999 0 -> 1 Inexact Rounded
  326. resx416 rescale 0.999 1 -> 0E+1 Inexact Rounded
  327. resx420 rescale 0.0999 -5 -> 0.09990
  328. resx421 rescale 0.0999 -4 -> 0.0999
  329. resx422 rescale 0.0999 -3 -> 0.100 Inexact Rounded
  330. resx423 rescale 0.0999 -2 -> 0.10 Inexact Rounded
  331. resx424 rescale 0.0999 -1 -> 0.1 Inexact Rounded
  332. resx425 rescale 0.0999 0 -> 0 Inexact Rounded
  333. resx426 rescale 0.0999 1 -> 0E+1 Inexact Rounded
  334. resx430 rescale 0.00999 -5 -> 0.00999
  335. resx431 rescale 0.00999 -4 -> 0.0100 Inexact Rounded
  336. resx432 rescale 0.00999 -3 -> 0.010 Inexact Rounded
  337. resx433 rescale 0.00999 -2 -> 0.01 Inexact Rounded
  338. resx434 rescale 0.00999 -1 -> 0.0 Inexact Rounded
  339. resx435 rescale 0.00999 0 -> 0 Inexact Rounded
  340. resx436 rescale 0.00999 1 -> 0E+1 Inexact Rounded
  341. resx440 rescale 0.000999 -5 -> 0.00100 Inexact Rounded
  342. resx441 rescale 0.000999 -4 -> 0.0010 Inexact Rounded
  343. resx442 rescale 0.000999 -3 -> 0.001 Inexact Rounded
  344. resx443 rescale 0.000999 -2 -> 0.00 Inexact Rounded
  345. resx444 rescale 0.000999 -1 -> 0.0 Inexact Rounded
  346. resx445 rescale 0.000999 0 -> 0 Inexact Rounded
  347. resx446 rescale 0.000999 1 -> 0E+1 Inexact Rounded
  348. precision: 8
  349. resx449 rescale 9.999E-15 -23 -> NaN Invalid_operation
  350. resx450 rescale 9.999E-15 -22 -> 9.9990000E-15
  351. resx451 rescale 9.999E-15 -21 -> 9.999000E-15
  352. resx452 rescale 9.999E-15 -20 -> 9.99900E-15
  353. resx453 rescale 9.999E-15 -19 -> 9.9990E-15
  354. resx454 rescale 9.999E-15 -18 -> 9.999E-15
  355. resx455 rescale 9.999E-15 -17 -> 1.000E-14 Inexact Rounded
  356. resx456 rescale 9.999E-15 -16 -> 1.00E-14 Inexact Rounded
  357. resx457 rescale 9.999E-15 -15 -> 1.0E-14 Inexact Rounded
  358. resx458 rescale 9.999E-15 -14 -> 1E-14 Inexact Rounded
  359. resx459 rescale 9.999E-15 -13 -> 0E-13 Inexact Rounded
  360. resx460 rescale 9.999E-15 -12 -> 0E-12 Inexact Rounded
  361. resx461 rescale 9.999E-15 -11 -> 0E-11 Inexact Rounded
  362. resx462 rescale 9.999E-15 -10 -> 0E-10 Inexact Rounded
  363. resx463 rescale 9.999E-15 -9 -> 0E-9 Inexact Rounded
  364. resx464 rescale 9.999E-15 -8 -> 0E-8 Inexact Rounded
  365. resx465 rescale 9.999E-15 -7 -> 0E-7 Inexact Rounded
  366. resx466 rescale 9.999E-15 -6 -> 0.000000 Inexact Rounded
  367. resx467 rescale 9.999E-15 -5 -> 0.00000 Inexact Rounded
  368. resx468 rescale 9.999E-15 -4 -> 0.0000 Inexact Rounded
  369. resx469 rescale 9.999E-15 -3 -> 0.000 Inexact Rounded
  370. resx470 rescale 9.999E-15 -2 -> 0.00 Inexact Rounded
  371. resx471 rescale 9.999E-15 -1 -> 0.0 Inexact Rounded
  372. resx472 rescale 9.999E-15 0 -> 0 Inexact Rounded
  373. resx473 rescale 9.999E-15 1 -> 0E+1 Inexact Rounded
  374. -- [additional tests for "don't fit" edge cases are in
  375. -- quantize.decTest. Here's a critical one.]
  376. precision: 3
  377. resx480 rescale 0.9999 -3 -> NaN Invalid_operation
  378. -- long operand checks [rhs checks removed]
  379. maxexponent: 999
  380. minexponent: -999
  381. precision: 9
  382. resx481 rescale 12345678000 +3 -> 1.2345678E+10 Rounded
  383. resx482 rescale 1234567800 +1 -> 1.23456780E+9 Rounded
  384. resx483 rescale 1234567890 +1 -> 1.23456789E+9 Rounded
  385. resx484 rescale 1234567891 +1 -> 1.23456789E+9 Inexact Rounded
  386. resx485 rescale 12345678901 +2 -> 1.23456789E+10 Inexact Rounded
  387. resx486 rescale 1234567896 +1 -> 1.23456790E+9 Inexact Rounded
  388. -- a potential double-round
  389. resx487 rescale 1234.987643 -4 -> 1234.9876 Inexact Rounded
  390. resx488 rescale 1234.987647 -4 -> 1234.9876 Inexact Rounded
  391. precision: 15
  392. resx491 rescale 12345678000 +3 -> 1.2345678E+10 Rounded
  393. resx492 rescale 1234567800 +1 -> 1.23456780E+9 Rounded
  394. resx493 rescale 1234567890 +1 -> 1.23456789E+9 Rounded
  395. resx494 rescale 1234567891 +1 -> 1.23456789E+9 Inexact Rounded
  396. resx495 rescale 12345678901 +2 -> 1.23456789E+10 Inexact Rounded
  397. resx496 rescale 1234567896 +1 -> 1.23456790E+9 Inexact Rounded
  398. resx497 rescale 1234.987643 -4 -> 1234.9876 Inexact Rounded
  399. resx498 rescale 1234.987647 -4 -> 1234.9876 Inexact Rounded
  400. -- Zeros
  401. resx500 rescale 0 1 -> 0E+1
  402. resx501 rescale 0 0 -> 0
  403. resx502 rescale 0 -1 -> 0.0
  404. resx503 rescale 0.0 -1 -> 0.0
  405. resx504 rescale 0.0 0 -> 0
  406. resx505 rescale 0.0 +1 -> 0E+1
  407. resx506 rescale 0E+1 -1 -> 0.0
  408. resx507 rescale 0E+1 0 -> 0
  409. resx508 rescale 0E+1 +1 -> 0E+1
  410. resx509 rescale -0 1 -> -0E+1
  411. resx510 rescale -0 0 -> -0
  412. resx511 rescale -0 -1 -> -0.0
  413. resx512 rescale -0.0 -1 -> -0.0
  414. resx513 rescale -0.0 0 -> -0
  415. resx514 rescale -0.0 +1 -> -0E+1
  416. resx515 rescale -0E+1 -1 -> -0.0
  417. resx516 rescale -0E+1 0 -> -0
  418. resx517 rescale -0E+1 +1 -> -0E+1
  419. -- Suspicious RHS values
  420. maxexponent: 999999999
  421. minexponent: -999999999
  422. precision: 15
  423. resx520 rescale 1.234 999999E+3 -> 0E+999999000 Inexact Rounded
  424. resx521 rescale 123.456 999999E+3 -> 0E+999999000 Inexact Rounded
  425. resx522 rescale 1.234 999999999 -> 0E+999999999 Inexact Rounded
  426. resx523 rescale 123.456 999999999 -> 0E+999999999 Inexact Rounded
  427. resx524 rescale 123.456 1000000000 -> NaN Invalid_operation
  428. resx525 rescale 123.456 12345678903 -> NaN Invalid_operation
  429. -- next four are "won't fit" overflows
  430. resx526 rescale 1.234 -999999E+3 -> NaN Invalid_operation
  431. resx527 rescale 123.456 -999999E+3 -> NaN Invalid_operation
  432. resx528 rescale 1.234 -999999999 -> NaN Invalid_operation
  433. resx529 rescale 123.456 -999999999 -> NaN Invalid_operation
  434. resx530 rescale 123.456 -1000000014 -> NaN Invalid_operation
  435. resx531 rescale 123.456 -12345678903 -> NaN Invalid_operation
  436. maxexponent: 999
  437. minexponent: -999
  438. precision: 15
  439. resx532 rescale 1.234E+999 999 -> 1E+999 Inexact Rounded
  440. resx533 rescale 1.234E+998 999 -> 0E+999 Inexact Rounded
  441. resx534 rescale 1.234 999 -> 0E+999 Inexact Rounded
  442. resx535 rescale 1.234 1000 -> NaN Invalid_operation
  443. resx536 rescale 1.234 5000 -> NaN Invalid_operation
  444. resx537 rescale 0 -999 -> 0E-999
  445. -- next two are "won't fit" overflows
  446. resx538 rescale 1.234 -999 -> NaN Invalid_operation
  447. resx539 rescale 1.234 -1000 -> NaN Invalid_operation
  448. resx540 rescale 1.234 -5000 -> NaN Invalid_operation
  449. -- [more below]
  450. -- check bounds (lhs maybe out of range for destination, etc.)
  451. precision: 7
  452. resx541 rescale 1E+999 +999 -> 1E+999
  453. resx542 rescale 1E+1000 +999 -> NaN Invalid_operation
  454. resx543 rescale 1E+999 +1000 -> NaN Invalid_operation
  455. resx544 rescale 1E-999 -999 -> 1E-999
  456. resx545 rescale 1E-1000 -999 -> 0E-999 Inexact Rounded
  457. resx546 rescale 1E-999 -1000 -> 1.0E-999
  458. resx547 rescale 1E-1005 -999 -> 0E-999 Inexact Rounded
  459. resx548 rescale 1E-1006 -999 -> 0E-999 Inexact Rounded
  460. resx549 rescale 1E-1007 -999 -> 0E-999 Inexact Rounded
  461. resx550 rescale 1E-998 -1005 -> NaN Invalid_operation -- won't fit
  462. resx551 rescale 1E-999 -1005 -> 1.000000E-999
  463. resx552 rescale 1E-1000 -1005 -> 1.00000E-1000 Subnormal
  464. resx553 rescale 1E-999 -1006 -> NaN Invalid_operation
  465. resx554 rescale 1E-999 -1007 -> NaN Invalid_operation
  466. -- related subnormal rounding
  467. resx555 rescale 1.666666E-999 -1005 -> 1.666666E-999
  468. resx556 rescale 1.666666E-1000 -1005 -> 1.66667E-1000 Subnormal Inexact Rounded
  469. resx557 rescale 1.666666E-1001 -1005 -> 1.6667E-1001 Subnormal Inexact Rounded
  470. resx558 rescale 1.666666E-1002 -1005 -> 1.667E-1002 Subnormal Inexact Rounded
  471. resx559 rescale 1.666666E-1003 -1005 -> 1.67E-1003 Subnormal Inexact Rounded
  472. resx560 rescale 1.666666E-1004 -1005 -> 1.7E-1004 Subnormal Inexact Rounded
  473. resx561 rescale 1.666666E-1005 -1005 -> 2E-1005 Subnormal Inexact Rounded
  474. resx562 rescale 1.666666E-1006 -1005 -> 0E-1005 Inexact Rounded
  475. resx563 rescale 1.666666E-1007 -1005 -> 0E-1005 Inexact Rounded
  476. -- fractional RHS, some good and some bad
  477. precision: 9
  478. resx564 rescale 222 +2.0 -> 2E+2 Inexact Rounded
  479. resx565 rescale 222 +2.00000000 -> 2E+2 Inexact Rounded
  480. resx566 rescale 222 +2.00100000000 -> NaN Invalid_operation
  481. resx567 rescale 222 +2.000001 -> NaN Invalid_operation
  482. resx568 rescale 222 +2.000000001 -> NaN Invalid_operation
  483. resx569 rescale 222 +2.0000000001 -> NaN Invalid_operation
  484. resx570 rescale 222 +2.00000000001 -> NaN Invalid_operation
  485. resx571 rescale 222 +2.99999999999 -> NaN Invalid_operation
  486. resx572 rescale 222 -2.00000000 -> 222.00
  487. resx573 rescale 222 -2.00100000000 -> NaN Invalid_operation
  488. resx574 rescale 222 -2.0000001000 -> NaN Invalid_operation
  489. resx575 rescale 222 -2.00000000001 -> NaN Invalid_operation
  490. resx576 rescale 222 -2.99999999999 -> NaN Invalid_operation
  491. -- Specials
  492. resx580 rescale Inf -Inf -> Infinity
  493. resx581 rescale Inf -1000 -> NaN Invalid_operation
  494. resx582 rescale Inf -1 -> NaN Invalid_operation
  495. resx583 rescale Inf 0 -> NaN Invalid_operation
  496. resx584 rescale Inf 1 -> NaN Invalid_operation
  497. resx585 rescale Inf 1000 -> NaN Invalid_operation
  498. resx586 rescale Inf Inf -> Infinity
  499. resx587 rescale -1000 Inf -> NaN Invalid_operation
  500. resx588 rescale -Inf Inf -> -Infinity
  501. resx589 rescale -1 Inf -> NaN Invalid_operation
  502. resx590 rescale 0 Inf -> NaN Invalid_operation
  503. resx591 rescale 1 Inf -> NaN Invalid_operation
  504. resx592 rescale 1000 Inf -> NaN Invalid_operation
  505. resx593 rescale Inf Inf -> Infinity
  506. resx594 rescale Inf -0 -> NaN Invalid_operation
  507. resx595 rescale -0 Inf -> NaN Invalid_operation
  508. resx600 rescale -Inf -Inf -> -Infinity
  509. resx601 rescale -Inf -1000 -> NaN Invalid_operation
  510. resx602 rescale -Inf -1 -> NaN Invalid_operation
  511. resx603 rescale -Inf 0 -> NaN Invalid_operation
  512. resx604 rescale -Inf 1 -> NaN Invalid_operation
  513. resx605 rescale -Inf 1000 -> NaN Invalid_operation
  514. resx606 rescale -Inf Inf -> -Infinity
  515. resx607 rescale -1000 Inf -> NaN Invalid_operation
  516. resx608 rescale -Inf -Inf -> -Infinity
  517. resx609 rescale -1 -Inf -> NaN Invalid_operation
  518. resx610 rescale 0 -Inf -> NaN Invalid_operation
  519. resx611 rescale 1 -Inf -> NaN Invalid_operation
  520. resx612 rescale 1000 -Inf -> NaN Invalid_operation
  521. resx613 rescale Inf -Inf -> Infinity
  522. resx614 rescale -Inf -0 -> NaN Invalid_operation
  523. resx615 rescale -0 -Inf -> NaN Invalid_operation
  524. resx621 rescale NaN -Inf -> NaN
  525. resx622 rescale NaN -1000 -> NaN
  526. resx623 rescale NaN -1 -> NaN
  527. resx624 rescale NaN 0 -> NaN
  528. resx625 rescale NaN 1 -> NaN
  529. resx626 rescale NaN 1000 -> NaN
  530. resx627 rescale NaN Inf -> NaN
  531. resx628 rescale NaN NaN -> NaN
  532. resx629 rescale -Inf NaN -> NaN
  533. resx630 rescale -1000 NaN -> NaN
  534. resx631 rescale -1 NaN -> NaN
  535. resx632 rescale 0 NaN -> NaN
  536. resx633 rescale 1 -NaN -> -NaN
  537. resx634 rescale 1000 NaN -> NaN
  538. resx635 rescale Inf NaN -> NaN
  539. resx636 rescale NaN -0 -> NaN
  540. resx637 rescale -0 NaN -> NaN
  541. resx641 rescale sNaN -Inf -> NaN Invalid_operation
  542. resx642 rescale sNaN -1000 -> NaN Invalid_operation
  543. resx643 rescale sNaN -1 -> NaN Invalid_operation
  544. resx644 rescale sNaN 0 -> NaN Invalid_operation
  545. resx645 rescale sNaN 1 -> NaN Invalid_operation
  546. resx646 rescale sNaN 1000 -> NaN Invalid_operation
  547. resx647 rescale -sNaN NaN -> -NaN Invalid_operation
  548. resx648 rescale sNaN -sNaN -> NaN Invalid_operation
  549. resx649 rescale NaN sNaN -> NaN Invalid_operation
  550. resx650 rescale -Inf sNaN -> NaN Invalid_operation
  551. resx651 rescale -1000 sNaN -> NaN Invalid_operation
  552. resx652 rescale -1 sNaN -> NaN Invalid_operation
  553. resx653 rescale 0 sNaN -> NaN Invalid_operation
  554. resx654 rescale 1 -sNaN -> -NaN Invalid_operation
  555. resx655 rescale 1000 sNaN -> NaN Invalid_operation
  556. resx656 rescale Inf sNaN -> NaN Invalid_operation
  557. resx657 rescale NaN sNaN -> NaN Invalid_operation
  558. resx658 rescale sNaN -0 -> NaN Invalid_operation
  559. resx659 rescale -0 sNaN -> NaN Invalid_operation
  560. -- propagating NaNs
  561. resx661 rescale NaN9 -Inf -> NaN9
  562. resx662 rescale NaN81 919 -> NaN81
  563. resx663 rescale NaN72 Inf -> NaN72
  564. resx664 rescale -NaN66 NaN5 -> -NaN66
  565. resx665 rescale -Inf NaN4 -> NaN4
  566. resx666 rescale -919 NaN32 -> NaN32
  567. resx667 rescale Inf NaN2 -> NaN2
  568. resx671 rescale sNaN99 -Inf -> NaN99 Invalid_operation
  569. resx672 rescale -sNaN98 -11 -> -NaN98 Invalid_operation
  570. resx673 rescale sNaN97 NaN -> NaN97 Invalid_operation
  571. resx674 rescale sNaN16 sNaN94 -> NaN16 Invalid_operation
  572. resx675 rescale NaN95 sNaN93 -> NaN93 Invalid_operation
  573. resx676 rescale -Inf sNaN92 -> NaN92 Invalid_operation
  574. resx677 rescale 088 -sNaN91 -> -NaN91 Invalid_operation
  575. resx678 rescale Inf -sNaN90 -> -NaN90 Invalid_operation
  576. resx679 rescale NaN sNaN87 -> NaN87 Invalid_operation
  577. -- subnormals and underflow
  578. precision: 4
  579. maxexponent: 999
  580. minexponent: -999
  581. resx710 rescale 1.00E-999 -999 -> 1E-999 Rounded
  582. resx711 rescale 0.1E-999 -1000 -> 1E-1000 Subnormal
  583. resx712 rescale 0.10E-999 -1000 -> 1E-1000 Subnormal Rounded
  584. resx713 rescale 0.100E-999 -1000 -> 1E-1000 Subnormal Rounded
  585. resx714 rescale 0.01E-999 -1001 -> 1E-1001 Subnormal
  586. -- next is rounded to Emin
  587. resx715 rescale 0.999E-999 -999 -> 1E-999 Inexact Rounded
  588. resx716 rescale 0.099E-999 -1000 -> 1E-1000 Inexact Rounded Subnormal
  589. resx717 rescale 0.009E-999 -1001 -> 1E-1001 Inexact Rounded Subnormal
  590. resx718 rescale 0.001E-999 -1001 -> 0E-1001 Inexact Rounded
  591. resx719 rescale 0.0009E-999 -1001 -> 0E-1001 Inexact Rounded
  592. resx720 rescale 0.0001E-999 -1001 -> 0E-1001 Inexact Rounded
  593. resx730 rescale -1.00E-999 -999 -> -1E-999 Rounded
  594. resx731 rescale -0.1E-999 -999 -> -0E-999 Rounded Inexact
  595. resx732 rescale -0.10E-999 -999 -> -0E-999 Rounded Inexact
  596. resx733 rescale -0.100E-999 -999 -> -0E-999 Rounded Inexact
  597. resx734 rescale -0.01E-999 -999 -> -0E-999 Inexact Rounded
  598. -- next is rounded to Emin
  599. resx735 rescale -0.999E-999 -999 -> -1E-999 Inexact Rounded
  600. resx736 rescale -0.099E-999 -999 -> -0E-999 Inexact Rounded
  601. resx737 rescale -0.009E-999 -999 -> -0E-999 Inexact Rounded
  602. resx738 rescale -0.001E-999 -999 -> -0E-999 Inexact Rounded
  603. resx739 rescale -0.0001E-999 -999 -> -0E-999 Inexact Rounded
  604. resx740 rescale -1.00E-999 -1000 -> -1.0E-999 Rounded
  605. resx741 rescale -0.1E-999 -1000 -> -1E-1000 Subnormal
  606. resx742 rescale -0.10E-999 -1000 -> -1E-1000 Subnormal Rounded
  607. resx743 rescale -0.100E-999 -1000 -> -1E-1000 Subnormal Rounded
  608. resx744 rescale -0.01E-999 -1000 -> -0E-1000 Inexact Rounded
  609. -- next is rounded to Emin
  610. resx745 rescale -0.999E-999 -1000 -> -1.0E-999 Inexact Rounded
  611. resx746 rescale -0.099E-999 -1000 -> -1E-1000 Inexact Rounded Subnormal
  612. resx747 rescale -0.009E-999 -1000 -> -0E-1000 Inexact Rounded
  613. resx748 rescale -0.001E-999 -1000 -> -0E-1000 Inexact Rounded
  614. resx749 rescale -0.0001E-999 -1000 -> -0E-1000 Inexact Rounded
  615. resx750 rescale -1.00E-999 -1001 -> -1.00E-999
  616. resx751 rescale -0.1E-999 -1001 -> -1.0E-1000 Subnormal
  617. resx752 rescale -0.10E-999 -1001 -> -1.0E-1000 Subnormal
  618. resx753 rescale -0.100E-999 -1001 -> -1.0E-1000 Subnormal Rounded
  619. resx754 rescale -0.01E-999 -1001 -> -1E-1001 Subnormal
  620. -- next is rounded to Emin
  621. resx755 rescale -0.999E-999 -1001 -> -1.00E-999 Inexact Rounded
  622. resx756 rescale -0.099E-999 -1001 -> -1.0E-1000 Inexact Rounded Subnormal
  623. resx757 rescale -0.009E-999 -1001 -> -1E-1001 Inexact Rounded Subnormal
  624. resx758 rescale -0.001E-999 -1001 -> -0E-1001 Inexact Rounded
  625. resx759 rescale -0.0001E-999 -1001 -> -0E-1001 Inexact Rounded
  626. resx760 rescale -1.00E-999 -1002 -> -1.000E-999
  627. resx761 rescale -0.1E-999 -1002 -> -1.00E-1000 Subnormal
  628. resx762 rescale -0.10E-999 -1002 -> -1.00E-1000 Subnormal
  629. resx763 rescale -0.100E-999 -1002 -> -1.00E-1000 Subnormal
  630. resx764 rescale -0.01E-999 -1002 -> -1.0E-1001 Subnormal
  631. resx765 rescale -0.999E-999 -1002 -> -9.99E-1000 Subnormal
  632. resx766 rescale -0.099E-999 -1002 -> -9.9E-1001 Subnormal
  633. resx767 rescale -0.009E-999 -1002 -> -9E-1002 Subnormal
  634. resx768 rescale -0.001E-999 -1002 -> -1E-1002 Subnormal
  635. resx769 rescale -0.0001E-999 -1002 -> -0E-1002 Inexact Rounded
  636. -- rhs must be no less than Etiny
  637. resx770 rescale -1.00E-999 -1003 -> NaN Invalid_operation
  638. resx771 rescale -0.1E-999 -1003 -> NaN Invalid_operation
  639. resx772 rescale -0.10E-999 -1003 -> NaN Invalid_operation
  640. resx773 rescale -0.100E-999 -1003 -> NaN Invalid_operation
  641. resx774 rescale -0.01E-999 -1003 -> NaN Invalid_operation
  642. resx775 rescale -0.999E-999 -1003 -> NaN Invalid_operation
  643. resx776 rescale -0.099E-999 -1003 -> NaN Invalid_operation
  644. resx777 rescale -0.009E-999 -1003 -> NaN Invalid_operation
  645. resx778 rescale -0.001E-999 -1003 -> NaN Invalid_operation
  646. resx779 rescale -0.0001E-999 -1003 -> NaN Invalid_operation
  647. precision: 9
  648. maxExponent: 999999999
  649. minexponent: -999999999
  650. -- getInt worries
  651. resx801 rescale 0 1000000000 -> NaN Invalid_operation
  652. resx802 rescale 0 -1000000000 -> 0E-1000000000
  653. resx803 rescale 0 2000000000 -> NaN Invalid_operation
  654. resx804 rescale 0 -2000000000 -> NaN Invalid_operation
  655. resx805 rescale 0 3000000000 -> NaN Invalid_operation
  656. resx806 rescale 0 -3000000000 -> NaN Invalid_operation
  657. resx807 rescale 0 4000000000 -> NaN Invalid_operation
  658. resx808 rescale 0 -4000000000 -> NaN Invalid_operation
  659. resx809 rescale 0 5000000000 -> NaN Invalid_operation
  660. resx810 rescale 0 -5000000000 -> NaN Invalid_operation
  661. resx811 rescale 0 6000000000 -> NaN Invalid_operation
  662. resx812 rescale 0 -6000000000 -> NaN Invalid_operation
  663. resx813 rescale 0 7000000000 -> NaN Invalid_operation
  664. resx814 rescale 0 -7000000000 -> NaN Invalid_operation
  665. resx815 rescale 0 8000000000 -> NaN Invalid_operation
  666. resx816 rescale 0 -8000000000 -> NaN Invalid_operation
  667. resx817 rescale 0 9000000000 -> NaN Invalid_operation
  668. resx818 rescale 0 -9000000000 -> NaN Invalid_operation
  669. resx819 rescale 0 9999999999 -> NaN Invalid_operation
  670. resx820 rescale 0 -9999999999 -> NaN Invalid_operation
  671. resx821 rescale 0 10000000000 -> NaN Invalid_operation
  672. resx822 rescale 0 -10000000000 -> NaN Invalid_operation
  673. resx831 rescale 1 0E-1 -> 1
  674. resx832 rescale 1 0E-2 -> 1
  675. resx833 rescale 1 0E-3 -> 1
  676. resx834 rescale 1 0E-4 -> 1
  677. resx835 rescale 1 0E-100 -> 1
  678. resx836 rescale 1 0E-100000 -> 1
  679. resx837 rescale 1 0E+100 -> 1
  680. resx838 rescale 1 0E+100000 -> 1
  681. resx841 rescale 0 5E-1000000 -> NaN Invalid_operation
  682. resx842 rescale 0 5E-1000000 -> NaN Invalid_operation
  683. resx843 rescale 0 999999999 -> 0E+999999999
  684. resx844 rescale 0 1000000000 -> NaN Invalid_operation
  685. resx845 rescale 0 -999999999 -> 0E-999999999
  686. resx846 rescale 0 -1000000000 -> 0E-1000000000
  687. resx847 rescale 0 -1000000001 -> 0E-1000000001
  688. resx848 rescale 0 -1000000002 -> 0E-1000000002
  689. resx849 rescale 0 -1000000003 -> 0E-1000000003
  690. resx850 rescale 0 -1000000004 -> 0E-1000000004
  691. resx851 rescale 0 -1000000005 -> 0E-1000000005
  692. resx852 rescale 0 -1000000006 -> 0E-1000000006
  693. resx853 rescale 0 -1000000007 -> 0E-1000000007
  694. resx854 rescale 0 -1000000008 -> NaN Invalid_operation
  695. resx861 rescale 1 +2147483649 -> NaN Invalid_operation
  696. resx862 rescale 1 +2147483648 -> NaN Invalid_operation
  697. resx863 rescale 1 +2147483647 -> NaN Invalid_operation
  698. resx864 rescale 1 -2147483647 -> NaN Invalid_operation
  699. resx865 rescale 1 -2147483648 -> NaN Invalid_operation
  700. resx866 rescale 1 -2147483649 -> NaN Invalid_operation
  701. -- Null tests
  702. res900 rescale 10 # -> NaN Invalid_operation
  703. res901 rescale # 10 -> NaN Invalid_operation