dqEncode.decTest 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. ------------------------------------------------------------------------
  2. -- dqEncode.decTest -- decimal sixteen-byte format testcases --
  3. -- Copyright (c) IBM Corporation, 2000, 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. -- [Previously called decimal128.decTest]
  21. version: 2.59
  22. -- This set of tests is for the sixteen-byte concrete representation.
  23. -- Its characteristics are:
  24. --
  25. -- 1 bit sign
  26. -- 5 bits combination field
  27. -- 12 bits exponent continuation
  28. -- 110 bits coefficient continuation
  29. --
  30. -- Total exponent length 14 bits
  31. -- Total coefficient length 114 bits (34 digits)
  32. --
  33. -- Elimit = 12287 (maximum encoded exponent)
  34. -- Emax = 6144 (largest exponent value)
  35. -- Emin = -6143 (smallest exponent value)
  36. -- bias = 6176 (subtracted from encoded exponent) = -Etiny
  37. -- The testcases here have only exactly representable data on the
  38. -- 'left-hand-side'; rounding from strings is tested in 'base'
  39. -- testcase groups.
  40. extended: 1
  41. clamp: 1
  42. precision: 34
  43. rounding: half_up
  44. maxExponent: 6144
  45. minExponent: -6143
  46. -- General testcases
  47. -- (mostly derived from the Strawman 4 document and examples)
  48. decq001 apply #A20780000000000000000000000003D0 -> -7.50
  49. decq002 apply -7.50 -> #A20780000000000000000000000003D0
  50. -- derivative canonical plain strings
  51. decq003 apply #A20840000000000000000000000003D0 -> -7.50E+3
  52. decq004 apply -7.50E+3 -> #A20840000000000000000000000003D0
  53. decq005 apply #A20800000000000000000000000003D0 -> -750
  54. decq006 apply -750 -> #A20800000000000000000000000003D0
  55. decq007 apply #A207c0000000000000000000000003D0 -> -75.0
  56. decq008 apply -75.0 -> #A207c0000000000000000000000003D0
  57. decq009 apply #A20740000000000000000000000003D0 -> -0.750
  58. decq010 apply -0.750 -> #A20740000000000000000000000003D0
  59. decq011 apply #A20700000000000000000000000003D0 -> -0.0750
  60. decq012 apply -0.0750 -> #A20700000000000000000000000003D0
  61. decq013 apply #A20680000000000000000000000003D0 -> -0.000750
  62. decq014 apply -0.000750 -> #A20680000000000000000000000003D0
  63. decq015 apply #A20600000000000000000000000003D0 -> -0.00000750
  64. decq016 apply -0.00000750 -> #A20600000000000000000000000003D0
  65. decq017 apply #A205c0000000000000000000000003D0 -> -7.50E-7
  66. decq018 apply -7.50E-7 -> #A205c0000000000000000000000003D0
  67. -- Normality
  68. decq020 apply 1234567890123456789012345678901234 -> #2608134b9c1e28e56f3c127177823534
  69. decq021 apply -1234567890123456789012345678901234 -> #a608134b9c1e28e56f3c127177823534
  70. decq022 apply 1111111111111111111111111111111111 -> #26080912449124491244912449124491
  71. -- Nmax and similar
  72. decq031 apply 9.999999999999999999999999999999999E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  73. decq032 apply #77ffcff3fcff3fcff3fcff3fcff3fcff -> 9.999999999999999999999999999999999E+6144
  74. decq033 apply 1.234567890123456789012345678901234E+6144 -> #47ffd34b9c1e28e56f3c127177823534
  75. decq034 apply #47ffd34b9c1e28e56f3c127177823534 -> 1.234567890123456789012345678901234E+6144
  76. -- fold-downs (more below)
  77. decq035 apply 1.23E+6144 -> #47ffd300000000000000000000000000 Clamped
  78. decq036 apply #47ffd300000000000000000000000000 -> 1.230000000000000000000000000000000E+6144
  79. decq037 apply 1E+6144 -> #47ffc000000000000000000000000000 Clamped
  80. decq038 apply #47ffc000000000000000000000000000 -> 1.000000000000000000000000000000000E+6144
  81. decq051 apply 12345 -> #220800000000000000000000000049c5
  82. decq052 apply #220800000000000000000000000049c5 -> 12345
  83. decq053 apply 1234 -> #22080000000000000000000000000534
  84. decq054 apply #22080000000000000000000000000534 -> 1234
  85. decq055 apply 123 -> #220800000000000000000000000000a3
  86. decq056 apply #220800000000000000000000000000a3 -> 123
  87. decq057 apply 12 -> #22080000000000000000000000000012
  88. decq058 apply #22080000000000000000000000000012 -> 12
  89. decq059 apply 1 -> #22080000000000000000000000000001
  90. decq060 apply #22080000000000000000000000000001 -> 1
  91. decq061 apply 1.23 -> #220780000000000000000000000000a3
  92. decq062 apply #220780000000000000000000000000a3 -> 1.23
  93. decq063 apply 123.45 -> #220780000000000000000000000049c5
  94. decq064 apply #220780000000000000000000000049c5 -> 123.45
  95. -- Nmin and below
  96. decq071 apply 1E-6143 -> #00084000000000000000000000000001
  97. decq072 apply #00084000000000000000000000000001 -> 1E-6143
  98. decq073 apply 1.000000000000000000000000000000000E-6143 -> #04000000000000000000000000000000
  99. decq074 apply #04000000000000000000000000000000 -> 1.000000000000000000000000000000000E-6143
  100. decq075 apply 1.000000000000000000000000000000001E-6143 -> #04000000000000000000000000000001
  101. decq076 apply #04000000000000000000000000000001 -> 1.000000000000000000000000000000001E-6143
  102. decq077 apply 0.100000000000000000000000000000000E-6143 -> #00000800000000000000000000000000 Subnormal
  103. decq078 apply #00000800000000000000000000000000 -> 1.00000000000000000000000000000000E-6144 Subnormal
  104. decq079 apply 0.000000000000000000000000000000010E-6143 -> #00000000000000000000000000000010 Subnormal
  105. decq080 apply #00000000000000000000000000000010 -> 1.0E-6175 Subnormal
  106. decq081 apply 0.00000000000000000000000000000001E-6143 -> #00004000000000000000000000000001 Subnormal
  107. decq082 apply #00004000000000000000000000000001 -> 1E-6175 Subnormal
  108. decq083 apply 0.000000000000000000000000000000001E-6143 -> #00000000000000000000000000000001 Subnormal
  109. decq084 apply #00000000000000000000000000000001 -> 1E-6176 Subnormal
  110. -- underflows cannot be tested for simple copies, check edge cases
  111. decq090 apply 1e-6176 -> #00000000000000000000000000000001 Subnormal
  112. decq100 apply 999999999999999999999999999999999e-6176 -> #00000ff3fcff3fcff3fcff3fcff3fcff Subnormal
  113. -- same again, negatives
  114. -- Nmax and similar
  115. decq122 apply -9.999999999999999999999999999999999E+6144 -> #f7ffcff3fcff3fcff3fcff3fcff3fcff
  116. decq123 apply #f7ffcff3fcff3fcff3fcff3fcff3fcff -> -9.999999999999999999999999999999999E+6144
  117. decq124 apply -1.234567890123456789012345678901234E+6144 -> #c7ffd34b9c1e28e56f3c127177823534
  118. decq125 apply #c7ffd34b9c1e28e56f3c127177823534 -> -1.234567890123456789012345678901234E+6144
  119. -- fold-downs (more below)
  120. decq130 apply -1.23E+6144 -> #c7ffd300000000000000000000000000 Clamped
  121. decq131 apply #c7ffd300000000000000000000000000 -> -1.230000000000000000000000000000000E+6144
  122. decq132 apply -1E+6144 -> #c7ffc000000000000000000000000000 Clamped
  123. decq133 apply #c7ffc000000000000000000000000000 -> -1.000000000000000000000000000000000E+6144
  124. decq151 apply -12345 -> #a20800000000000000000000000049c5
  125. decq152 apply #a20800000000000000000000000049c5 -> -12345
  126. decq153 apply -1234 -> #a2080000000000000000000000000534
  127. decq154 apply #a2080000000000000000000000000534 -> -1234
  128. decq155 apply -123 -> #a20800000000000000000000000000a3
  129. decq156 apply #a20800000000000000000000000000a3 -> -123
  130. decq157 apply -12 -> #a2080000000000000000000000000012
  131. decq158 apply #a2080000000000000000000000000012 -> -12
  132. decq159 apply -1 -> #a2080000000000000000000000000001
  133. decq160 apply #a2080000000000000000000000000001 -> -1
  134. decq161 apply -1.23 -> #a20780000000000000000000000000a3
  135. decq162 apply #a20780000000000000000000000000a3 -> -1.23
  136. decq163 apply -123.45 -> #a20780000000000000000000000049c5
  137. decq164 apply #a20780000000000000000000000049c5 -> -123.45
  138. -- Nmin and below
  139. decq171 apply -1E-6143 -> #80084000000000000000000000000001
  140. decq172 apply #80084000000000000000000000000001 -> -1E-6143
  141. decq173 apply -1.000000000000000000000000000000000E-6143 -> #84000000000000000000000000000000
  142. decq174 apply #84000000000000000000000000000000 -> -1.000000000000000000000000000000000E-6143
  143. decq175 apply -1.000000000000000000000000000000001E-6143 -> #84000000000000000000000000000001
  144. decq176 apply #84000000000000000000000000000001 -> -1.000000000000000000000000000000001E-6143
  145. decq177 apply -0.100000000000000000000000000000000E-6143 -> #80000800000000000000000000000000 Subnormal
  146. decq178 apply #80000800000000000000000000000000 -> -1.00000000000000000000000000000000E-6144 Subnormal
  147. decq179 apply -0.000000000000000000000000000000010E-6143 -> #80000000000000000000000000000010 Subnormal
  148. decq180 apply #80000000000000000000000000000010 -> -1.0E-6175 Subnormal
  149. decq181 apply -0.00000000000000000000000000000001E-6143 -> #80004000000000000000000000000001 Subnormal
  150. decq182 apply #80004000000000000000000000000001 -> -1E-6175 Subnormal
  151. decq183 apply -0.000000000000000000000000000000001E-6143 -> #80000000000000000000000000000001 Subnormal
  152. decq184 apply #80000000000000000000000000000001 -> -1E-6176 Subnormal
  153. -- underflow edge cases
  154. decq190 apply -1e-6176 -> #80000000000000000000000000000001 Subnormal
  155. decq200 apply -999999999999999999999999999999999e-6176 -> #80000ff3fcff3fcff3fcff3fcff3fcff Subnormal
  156. -- zeros
  157. decq400 apply 0E-8000 -> #00000000000000000000000000000000 Clamped
  158. decq401 apply 0E-6177 -> #00000000000000000000000000000000 Clamped
  159. decq402 apply 0E-6176 -> #00000000000000000000000000000000
  160. decq403 apply #00000000000000000000000000000000 -> 0E-6176
  161. decq404 apply 0.000000000000000000000000000000000E-6143 -> #00000000000000000000000000000000
  162. decq405 apply #00000000000000000000000000000000 -> 0E-6176
  163. decq406 apply 0E-2 -> #22078000000000000000000000000000
  164. decq407 apply #22078000000000000000000000000000 -> 0.00
  165. decq408 apply 0 -> #22080000000000000000000000000000
  166. decq409 apply #22080000000000000000000000000000 -> 0
  167. decq410 apply 0E+3 -> #2208c000000000000000000000000000
  168. decq411 apply #2208c000000000000000000000000000 -> 0E+3
  169. decq412 apply 0E+6111 -> #43ffc000000000000000000000000000
  170. decq413 apply #43ffc000000000000000000000000000 -> 0E+6111
  171. -- clamped zeros...
  172. decq414 apply 0E+6112 -> #43ffc000000000000000000000000000 Clamped
  173. decq415 apply #43ffc000000000000000000000000000 -> 0E+6111
  174. decq416 apply 0E+6144 -> #43ffc000000000000000000000000000 Clamped
  175. decq417 apply #43ffc000000000000000000000000000 -> 0E+6111
  176. decq418 apply 0E+8000 -> #43ffc000000000000000000000000000 Clamped
  177. decq419 apply #43ffc000000000000000000000000000 -> 0E+6111
  178. -- negative zeros
  179. decq420 apply -0E-8000 -> #80000000000000000000000000000000 Clamped
  180. decq421 apply -0E-6177 -> #80000000000000000000000000000000 Clamped
  181. decq422 apply -0E-6176 -> #80000000000000000000000000000000
  182. decq423 apply #80000000000000000000000000000000 -> -0E-6176
  183. decq424 apply -0.000000000000000000000000000000000E-6143 -> #80000000000000000000000000000000
  184. decq425 apply #80000000000000000000000000000000 -> -0E-6176
  185. decq426 apply -0E-2 -> #a2078000000000000000000000000000
  186. decq427 apply #a2078000000000000000000000000000 -> -0.00
  187. decq428 apply -0 -> #a2080000000000000000000000000000
  188. decq429 apply #a2080000000000000000000000000000 -> -0
  189. decq430 apply -0E+3 -> #a208c000000000000000000000000000
  190. decq431 apply #a208c000000000000000000000000000 -> -0E+3
  191. decq432 apply -0E+6111 -> #c3ffc000000000000000000000000000
  192. decq433 apply #c3ffc000000000000000000000000000 -> -0E+6111
  193. -- clamped zeros...
  194. decq434 apply -0E+6112 -> #c3ffc000000000000000000000000000 Clamped
  195. decq435 apply #c3ffc000000000000000000000000000 -> -0E+6111
  196. decq436 apply -0E+6144 -> #c3ffc000000000000000000000000000 Clamped
  197. decq437 apply #c3ffc000000000000000000000000000 -> -0E+6111
  198. decq438 apply -0E+8000 -> #c3ffc000000000000000000000000000 Clamped
  199. decq439 apply #c3ffc000000000000000000000000000 -> -0E+6111
  200. -- exponent lengths
  201. decq440 apply #22080000000000000000000000000007 -> 7
  202. decq441 apply 7 -> #22080000000000000000000000000007
  203. decq442 apply #220a4000000000000000000000000007 -> 7E+9
  204. decq443 apply 7E+9 -> #220a4000000000000000000000000007
  205. decq444 apply #2220c000000000000000000000000007 -> 7E+99
  206. decq445 apply 7E+99 -> #2220c000000000000000000000000007
  207. decq446 apply #2301c000000000000000000000000007 -> 7E+999
  208. decq447 apply 7E+999 -> #2301c000000000000000000000000007
  209. decq448 apply #43e3c000000000000000000000000007 -> 7E+5999
  210. decq449 apply 7E+5999 -> #43e3c000000000000000000000000007
  211. -- Specials
  212. decq500 apply Infinity -> #78000000000000000000000000000000
  213. decq501 apply #78787878787878787878787878787878 -> #78000000000000000000000000000000
  214. decq502 apply #78000000000000000000000000000000 -> Infinity
  215. decq503 apply #79797979797979797979797979797979 -> #78000000000000000000000000000000
  216. decq504 apply #79000000000000000000000000000000 -> Infinity
  217. decq505 apply #7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a -> #78000000000000000000000000000000
  218. decq506 apply #7a000000000000000000000000000000 -> Infinity
  219. decq507 apply #7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b -> #78000000000000000000000000000000
  220. decq508 apply #7b000000000000000000000000000000 -> Infinity
  221. decq509 apply NaN -> #7c000000000000000000000000000000
  222. decq510 apply #7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c -> #7c003c7c7c7c7c7c7c7c7c7c7c7c7c7c
  223. decq511 apply #7c000000000000000000000000000000 -> NaN
  224. decq512 apply #7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d -> #7c003d7d7d7d7d7d7d7d7d7d7d7d7d7d
  225. decq513 apply #7d000000000000000000000000000000 -> NaN
  226. decq514 apply #7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e -> #7e003e7e7c7e7e7e7e7c7e7e7e7e7c7e
  227. decq515 apply #7e000000000000000000000000000000 -> sNaN
  228. decq516 apply #7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f -> #7e003f7f7c7f7f7f7f7c7f7f7f7f7c7f
  229. decq517 apply #7f000000000000000000000000000000 -> sNaN
  230. decq518 apply #7fffffffffffffffffffffffffffffff -> sNaN999999999999999999999999999999999
  231. decq519 apply #7fffffffffffffffffffffffffffffff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  232. decq520 apply -Infinity -> #f8000000000000000000000000000000
  233. decq521 apply #f8787878787878787878787878787878 -> #f8000000000000000000000000000000
  234. decq522 apply #f8000000000000000000000000000000 -> -Infinity
  235. decq523 apply #f9797979797979797979797979797979 -> #f8000000000000000000000000000000
  236. decq524 apply #f9000000000000000000000000000000 -> -Infinity
  237. decq525 apply #fa7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a -> #f8000000000000000000000000000000
  238. decq526 apply #fa000000000000000000000000000000 -> -Infinity
  239. decq527 apply #fb7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b -> #f8000000000000000000000000000000
  240. decq528 apply #fb000000000000000000000000000000 -> -Infinity
  241. decq529 apply -NaN -> #fc000000000000000000000000000000
  242. decq530 apply #fc7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c -> #fc003c7c7c7c7c7c7c7c7c7c7c7c7c7c
  243. decq531 apply #fc000000000000000000000000000000 -> -NaN
  244. decq532 apply #fd7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d -> #fc003d7d7d7d7d7d7d7d7d7d7d7d7d7d
  245. decq533 apply #fd000000000000000000000000000000 -> -NaN
  246. decq534 apply #fe7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e -> #fe003e7e7c7e7e7e7e7c7e7e7e7e7c7e
  247. decq535 apply #fe000000000000000000000000000000 -> -sNaN
  248. decq536 apply #ff7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f -> #fe003f7f7c7f7f7f7f7c7f7f7f7f7c7f
  249. decq537 apply #ff000000000000000000000000000000 -> -sNaN
  250. decq538 apply #ffffffffffffffffffffffffffffffff -> -sNaN999999999999999999999999999999999
  251. decq539 apply #ffffffffffffffffffffffffffffffff -> #fe000ff3fcff3fcff3fcff3fcff3fcff
  252. decq540 apply NaN -> #7c000000000000000000000000000000
  253. decq541 apply NaN0 -> #7c000000000000000000000000000000
  254. decq542 apply NaN1 -> #7c000000000000000000000000000001
  255. decq543 apply NaN12 -> #7c000000000000000000000000000012
  256. decq544 apply NaN79 -> #7c000000000000000000000000000079
  257. decq545 apply NaN12345 -> #7c0000000000000000000000000049c5
  258. decq546 apply NaN123456 -> #7c000000000000000000000000028e56
  259. decq547 apply NaN799799 -> #7c0000000000000000000000000f7fdf
  260. decq548 apply NaN799799799799799799799799799799799 -> #7c003dff7fdff7fdff7fdff7fdff7fdf
  261. decq549 apply NaN999999999999999999999999999999999 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  262. decq550 apply 9999999999999999999999999999999999 -> #6e080ff3fcff3fcff3fcff3fcff3fcff
  263. -- fold-down full sequence
  264. decq601 apply 1E+6144 -> #47ffc000000000000000000000000000 Clamped
  265. decq602 apply #47ffc000000000000000000000000000 -> 1.000000000000000000000000000000000E+6144
  266. decq603 apply 1E+6143 -> #43ffc800000000000000000000000000 Clamped
  267. decq604 apply #43ffc800000000000000000000000000 -> 1.00000000000000000000000000000000E+6143
  268. decq605 apply 1E+6142 -> #43ffc100000000000000000000000000 Clamped
  269. decq606 apply #43ffc100000000000000000000000000 -> 1.0000000000000000000000000000000E+6142
  270. decq607 apply 1E+6141 -> #43ffc010000000000000000000000000 Clamped
  271. decq608 apply #43ffc010000000000000000000000000 -> 1.000000000000000000000000000000E+6141
  272. decq609 apply 1E+6140 -> #43ffc002000000000000000000000000 Clamped
  273. decq610 apply #43ffc002000000000000000000000000 -> 1.00000000000000000000000000000E+6140
  274. decq611 apply 1E+6139 -> #43ffc000400000000000000000000000 Clamped
  275. decq612 apply #43ffc000400000000000000000000000 -> 1.0000000000000000000000000000E+6139
  276. decq613 apply 1E+6138 -> #43ffc000040000000000000000000000 Clamped
  277. decq614 apply #43ffc000040000000000000000000000 -> 1.000000000000000000000000000E+6138
  278. decq615 apply 1E+6137 -> #43ffc000008000000000000000000000 Clamped
  279. decq616 apply #43ffc000008000000000000000000000 -> 1.00000000000000000000000000E+6137
  280. decq617 apply 1E+6136 -> #43ffc000001000000000000000000000 Clamped
  281. decq618 apply #43ffc000001000000000000000000000 -> 1.0000000000000000000000000E+6136
  282. decq619 apply 1E+6135 -> #43ffc000000100000000000000000000 Clamped
  283. decq620 apply #43ffc000000100000000000000000000 -> 1.000000000000000000000000E+6135
  284. decq621 apply 1E+6134 -> #43ffc000000020000000000000000000 Clamped
  285. decq622 apply #43ffc000000020000000000000000000 -> 1.00000000000000000000000E+6134
  286. decq623 apply 1E+6133 -> #43ffc000000004000000000000000000 Clamped
  287. decq624 apply #43ffc000000004000000000000000000 -> 1.0000000000000000000000E+6133
  288. decq625 apply 1E+6132 -> #43ffc000000000400000000000000000 Clamped
  289. decq626 apply #43ffc000000000400000000000000000 -> 1.000000000000000000000E+6132
  290. decq627 apply 1E+6131 -> #43ffc000000000080000000000000000 Clamped
  291. decq628 apply #43ffc000000000080000000000000000 -> 1.00000000000000000000E+6131
  292. decq629 apply 1E+6130 -> #43ffc000000000010000000000000000 Clamped
  293. decq630 apply #43ffc000000000010000000000000000 -> 1.0000000000000000000E+6130
  294. decq631 apply 1E+6129 -> #43ffc000000000001000000000000000 Clamped
  295. decq632 apply #43ffc000000000001000000000000000 -> 1.000000000000000000E+6129
  296. decq633 apply 1E+6128 -> #43ffc000000000000200000000000000 Clamped
  297. decq634 apply #43ffc000000000000200000000000000 -> 1.00000000000000000E+6128
  298. decq635 apply 1E+6127 -> #43ffc000000000000040000000000000 Clamped
  299. decq636 apply #43ffc000000000000040000000000000 -> 1.0000000000000000E+6127
  300. decq637 apply 1E+6126 -> #43ffc000000000000004000000000000 Clamped
  301. decq638 apply #43ffc000000000000004000000000000 -> 1.000000000000000E+6126
  302. decq639 apply 1E+6125 -> #43ffc000000000000000800000000000 Clamped
  303. decq640 apply #43ffc000000000000000800000000000 -> 1.00000000000000E+6125
  304. decq641 apply 1E+6124 -> #43ffc000000000000000100000000000 Clamped
  305. decq642 apply #43ffc000000000000000100000000000 -> 1.0000000000000E+6124
  306. decq643 apply 1E+6123 -> #43ffc000000000000000010000000000 Clamped
  307. decq644 apply #43ffc000000000000000010000000000 -> 1.000000000000E+6123
  308. decq645 apply 1E+6122 -> #43ffc000000000000000002000000000 Clamped
  309. decq646 apply #43ffc000000000000000002000000000 -> 1.00000000000E+6122
  310. decq647 apply 1E+6121 -> #43ffc000000000000000000400000000 Clamped
  311. decq648 apply #43ffc000000000000000000400000000 -> 1.0000000000E+6121
  312. decq649 apply 1E+6120 -> #43ffc000000000000000000040000000 Clamped
  313. decq650 apply #43ffc000000000000000000040000000 -> 1.000000000E+6120
  314. decq651 apply 1E+6119 -> #43ffc000000000000000000008000000 Clamped
  315. decq652 apply #43ffc000000000000000000008000000 -> 1.00000000E+6119
  316. decq653 apply 1E+6118 -> #43ffc000000000000000000001000000 Clamped
  317. decq654 apply #43ffc000000000000000000001000000 -> 1.0000000E+6118
  318. decq655 apply 1E+6117 -> #43ffc000000000000000000000100000 Clamped
  319. decq656 apply #43ffc000000000000000000000100000 -> 1.000000E+6117
  320. decq657 apply 1E+6116 -> #43ffc000000000000000000000020000 Clamped
  321. decq658 apply #43ffc000000000000000000000020000 -> 1.00000E+6116
  322. decq659 apply 1E+6115 -> #43ffc000000000000000000000004000 Clamped
  323. decq660 apply #43ffc000000000000000000000004000 -> 1.0000E+6115
  324. decq661 apply 1E+6114 -> #43ffc000000000000000000000000400 Clamped
  325. decq662 apply #43ffc000000000000000000000000400 -> 1.000E+6114
  326. decq663 apply 1E+6113 -> #43ffc000000000000000000000000080 Clamped
  327. decq664 apply #43ffc000000000000000000000000080 -> 1.00E+6113
  328. decq665 apply 1E+6112 -> #43ffc000000000000000000000000010 Clamped
  329. decq666 apply #43ffc000000000000000000000000010 -> 1.0E+6112
  330. decq667 apply 1E+6111 -> #43ffc000000000000000000000000001
  331. decq668 apply #43ffc000000000000000000000000001 -> 1E+6111
  332. decq669 apply 1E+6110 -> #43ff8000000000000000000000000001
  333. decq670 apply #43ff8000000000000000000000000001 -> 1E+6110
  334. -- Selected DPD codes
  335. decq700 apply #22080000000000000000000000000000 -> 0
  336. decq701 apply #22080000000000000000000000000009 -> 9
  337. decq702 apply #22080000000000000000000000000010 -> 10
  338. decq703 apply #22080000000000000000000000000019 -> 19
  339. decq704 apply #22080000000000000000000000000020 -> 20
  340. decq705 apply #22080000000000000000000000000029 -> 29
  341. decq706 apply #22080000000000000000000000000030 -> 30
  342. decq707 apply #22080000000000000000000000000039 -> 39
  343. decq708 apply #22080000000000000000000000000040 -> 40
  344. decq709 apply #22080000000000000000000000000049 -> 49
  345. decq710 apply #22080000000000000000000000000050 -> 50
  346. decq711 apply #22080000000000000000000000000059 -> 59
  347. decq712 apply #22080000000000000000000000000060 -> 60
  348. decq713 apply #22080000000000000000000000000069 -> 69
  349. decq714 apply #22080000000000000000000000000070 -> 70
  350. decq715 apply #22080000000000000000000000000071 -> 71
  351. decq716 apply #22080000000000000000000000000072 -> 72
  352. decq717 apply #22080000000000000000000000000073 -> 73
  353. decq718 apply #22080000000000000000000000000074 -> 74
  354. decq719 apply #22080000000000000000000000000075 -> 75
  355. decq720 apply #22080000000000000000000000000076 -> 76
  356. decq721 apply #22080000000000000000000000000077 -> 77
  357. decq722 apply #22080000000000000000000000000078 -> 78
  358. decq723 apply #22080000000000000000000000000079 -> 79
  359. decq730 apply #2208000000000000000000000000029e -> 994
  360. decq731 apply #2208000000000000000000000000029f -> 995
  361. decq732 apply #220800000000000000000000000002a0 -> 520
  362. decq733 apply #220800000000000000000000000002a1 -> 521
  363. -- DPD: one of each of the huffman groups
  364. decq740 apply #220800000000000000000000000003f7 -> 777
  365. decq741 apply #220800000000000000000000000003f8 -> 778
  366. decq742 apply #220800000000000000000000000003eb -> 787
  367. decq743 apply #2208000000000000000000000000037d -> 877
  368. decq744 apply #2208000000000000000000000000039f -> 997
  369. decq745 apply #220800000000000000000000000003bf -> 979
  370. decq746 apply #220800000000000000000000000003df -> 799
  371. decq747 apply #2208000000000000000000000000006e -> 888
  372. -- DPD all-highs cases (includes the 24 redundant codes)
  373. decq750 apply #2208000000000000000000000000006e -> 888
  374. decq751 apply #2208000000000000000000000000016e -> 888
  375. decq752 apply #2208000000000000000000000000026e -> 888
  376. decq753 apply #2208000000000000000000000000036e -> 888
  377. decq754 apply #2208000000000000000000000000006f -> 889
  378. decq755 apply #2208000000000000000000000000016f -> 889
  379. decq756 apply #2208000000000000000000000000026f -> 889
  380. decq757 apply #2208000000000000000000000000036f -> 889
  381. decq760 apply #2208000000000000000000000000007e -> 898
  382. decq761 apply #2208000000000000000000000000017e -> 898
  383. decq762 apply #2208000000000000000000000000027e -> 898
  384. decq763 apply #2208000000000000000000000000037e -> 898
  385. decq764 apply #2208000000000000000000000000007f -> 899
  386. decq765 apply #2208000000000000000000000000017f -> 899
  387. decq766 apply #2208000000000000000000000000027f -> 899
  388. decq767 apply #2208000000000000000000000000037f -> 899
  389. decq770 apply #220800000000000000000000000000ee -> 988
  390. decq771 apply #220800000000000000000000000001ee -> 988
  391. decq772 apply #220800000000000000000000000002ee -> 988
  392. decq773 apply #220800000000000000000000000003ee -> 988
  393. decq774 apply #220800000000000000000000000000ef -> 989
  394. decq775 apply #220800000000000000000000000001ef -> 989
  395. decq776 apply #220800000000000000000000000002ef -> 989
  396. decq777 apply #220800000000000000000000000003ef -> 989
  397. decq780 apply #220800000000000000000000000000fe -> 998
  398. decq781 apply #220800000000000000000000000001fe -> 998
  399. decq782 apply #220800000000000000000000000002fe -> 998
  400. decq783 apply #220800000000000000000000000003fe -> 998
  401. decq784 apply #220800000000000000000000000000ff -> 999
  402. decq785 apply #220800000000000000000000000001ff -> 999
  403. decq786 apply #220800000000000000000000000002ff -> 999
  404. decq787 apply #220800000000000000000000000003ff -> 999
  405. -- Miscellaneous (testers' queries, etc.)
  406. decq790 apply #2208000000000000000000000000c000 -> 30000
  407. decq791 apply #22080000000000000000000000007800 -> 890000
  408. decq792 apply 30000 -> #2208000000000000000000000000c000
  409. decq793 apply 890000 -> #22080000000000000000000000007800
  410. -- values around [u]int32 edges (zeros done earlier)
  411. decq800 apply -2147483646 -> #a208000000000000000000008c78af46
  412. decq801 apply -2147483647 -> #a208000000000000000000008c78af47
  413. decq802 apply -2147483648 -> #a208000000000000000000008c78af48
  414. decq803 apply -2147483649 -> #a208000000000000000000008c78af49
  415. decq804 apply 2147483646 -> #2208000000000000000000008c78af46
  416. decq805 apply 2147483647 -> #2208000000000000000000008c78af47
  417. decq806 apply 2147483648 -> #2208000000000000000000008c78af48
  418. decq807 apply 2147483649 -> #2208000000000000000000008c78af49
  419. decq808 apply 4294967294 -> #22080000000000000000000115afb55a
  420. decq809 apply 4294967295 -> #22080000000000000000000115afb55b
  421. decq810 apply 4294967296 -> #22080000000000000000000115afb57a
  422. decq811 apply 4294967297 -> #22080000000000000000000115afb57b
  423. decq820 apply #a208000000000000000000008c78af46 -> -2147483646
  424. decq821 apply #a208000000000000000000008c78af47 -> -2147483647
  425. decq822 apply #a208000000000000000000008c78af48 -> -2147483648
  426. decq823 apply #a208000000000000000000008c78af49 -> -2147483649
  427. decq824 apply #2208000000000000000000008c78af46 -> 2147483646
  428. decq825 apply #2208000000000000000000008c78af47 -> 2147483647
  429. decq826 apply #2208000000000000000000008c78af48 -> 2147483648
  430. decq827 apply #2208000000000000000000008c78af49 -> 2147483649
  431. decq828 apply #22080000000000000000000115afb55a -> 4294967294
  432. decq829 apply #22080000000000000000000115afb55b -> 4294967295
  433. decq830 apply #22080000000000000000000115afb57a -> 4294967296
  434. decq831 apply #22080000000000000000000115afb57b -> 4294967297
  435. -- VG testcase
  436. decq840 apply #2080000000000000F294000000172636 -> 8.81125000000001349436E-1548
  437. decq841 apply #20800000000000008000000000000000 -> 8.000000000000000000E-1550
  438. decq842 apply #1EF98490000000010F6E4E0000000000 -> 7.049000000000010795488000000000000E-3097
  439. decq843 multiply #20800000000000008000000000000000 #2080000000000000F294000000172636 -> #1EF98490000000010F6E4E0000000000 Rounded