dqCanonical.decTest 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. ------------------------------------------------------------------------
  2. -- dqCanonical.decTest -- test decQuad canonical results --
  3. -- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
  4. ------------------------------------------------------------------------
  5. -- Please see the document "General Decimal Arithmetic Testcases" --
  6. -- at http://www2.hursley.ibm.com/decimal for the description of --
  7. -- these testcases. --
  8. -- --
  9. -- These testcases are experimental ('beta' versions), and they --
  10. -- may contain errors. They are offered on an as-is basis. In --
  11. -- particular, achieving the same results as the tests here is not --
  12. -- a guarantee that an implementation complies with any Standard --
  13. -- or specification. The tests are not exhaustive. --
  14. -- --
  15. -- Please send comments, suggestions, and corrections to the author: --
  16. -- Mike Cowlishaw, IBM Fellow --
  17. -- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
  18. -- mfc@uk.ibm.com --
  19. ------------------------------------------------------------------------
  20. version: 2.59
  21. -- This file tests that copy operations leave uncanonical operands
  22. -- unchanged, and vice versa
  23. -- All operands and results are decQuads.
  24. extended: 1
  25. clamp: 1
  26. precision: 34
  27. maxExponent: 6144
  28. minExponent: -6143
  29. rounding: half_even
  30. -- Uncanonical declets are: abc, where:
  31. -- a=1,2,3
  32. -- b=6,7,e,f
  33. -- c=e,f
  34. -- assert some standard (canonical) values; this tests that FromString
  35. -- produces canonical results (many more in decimalNN)
  36. dqcan001 apply 9.999999999999999999999999999999999E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  37. dqcan002 apply 0 -> #22080000000000000000000000000000
  38. dqcan003 apply 1 -> #22080000000000000000000000000001
  39. dqcan004 apply -1 -> #a2080000000000000000000000000001
  40. dqcan005 apply Infinity -> #78000000000000000000000000000000
  41. dqcan006 apply -Infinity -> #f8000000000000000000000000000000
  42. dqcan007 apply -NaN -> #fc000000000000000000000000000000
  43. dqcan008 apply -sNaN -> #fe000000000000000000000000000000
  44. dqcan009 apply NaN999999999999999999999999999999999 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  45. dqcan010 apply sNaN999999999999999999999999999999999 -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  46. decan011 apply 9999999999999999999999999999999999 -> #6e080ff3fcff3fcff3fcff3fcff3fcff
  47. dqcan012 apply 7.50 -> #220780000000000000000000000003d0
  48. dqcan013 apply 9.99 -> #220780000000000000000000000000ff
  49. -- Base tests for canonical encodings (individual operator
  50. -- propagation is tested later)
  51. -- Finites: declets in coefficient
  52. dqcan021 canonical #77ffcff3fcff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  53. dqcan022 canonical #77fffff3fcff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  54. dqcan023 canonical #77ffcffffcff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  55. dqcan024 canonical #77ffcff3ffff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  56. dqcan025 canonical #77ffcff3fcffffcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  57. dqcan026 canonical #77ffcff3fcff3ffff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  58. dqcan027 canonical #77ffcff3fcff3fcffffcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  59. dqcan028 canonical #77ffcff3fcff3fcff3ffff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  60. dqcan029 canonical #77ffcff3fcff3fcff3fcffffcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  61. dqcan030 canonical #77ffcff3fcff3fcff3fcff3ffff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  62. dqcan031 canonical #77ffcff3fcff3fcff3fcff3fcffffcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  63. dqcan032 canonical #77ffcff3fcff3fcff3fcff3fcff3ffff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  64. -- NaN: declets in payload
  65. dqcan061 canonical #7c000ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  66. dqcan062 canonical #7c000ffffcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  67. dqcan063 canonical #7c000ff3ffff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  68. dqcan064 canonical #7c000ff3fcffffcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  69. dqcan065 canonical #7c000ff3fcff3ffff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  70. dqcan066 canonical #7c000ff3fcff3fcffffcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  71. dqcan067 canonical #7c000ff3fcff3fcff3ffff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  72. dqcan068 canonical #7c000ff3fcff3fcff3fcffffcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  73. dqcan069 canonical #7c000ff3fcff3fcff3fcff3ffff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  74. dqcan070 canonical #7c000ff3fcff3fcff3fcff3fcffffcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  75. dqcan071 canonical #7c000ff3fcff3fcff3fcff3fcff3ffff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  76. -- NaN: exponent continuation bits [excluding sNaN selector]
  77. dqcan081 canonical #7d000ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  78. dqcan082 canonical #7c800ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  79. dqcan083 canonical #7c400ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  80. dqcan084 canonical #7c200ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  81. dqcan085 canonical #7c100ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  82. dqcan086 canonical #7c080ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  83. dqcan087 canonical #7c040ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  84. dqcan088 canonical #7c020ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  85. dqcan089 canonical #7c010ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  86. dqcan090 canonical #7c008ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  87. dqcan091 canonical #7c004ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  88. -- sNaN: declets in payload
  89. dqcan101 canonical #7e000ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  90. dqcan102 canonical #7e000ffffcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  91. dqcan103 canonical #7e000ff3ffff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  92. dqcan104 canonical #7e000ff3fcffffcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  93. dqcan105 canonical #7e000ff3fcff3ffff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  94. dqcan106 canonical #7e000ff3fcff3fcffffcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  95. dqcan107 canonical #7e000ff3fcff3fcff3ffff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  96. dqcan108 canonical #7e000ff3fcff3fcff3fcffffcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  97. dqcan109 canonical #7e000ff3fcff3fcff3fcff3ffff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  98. dqcan100 canonical #7e000ff3fcff3fcff3fcff3fcffffcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  99. dqcan111 canonical #7e000ff3fcff3fcff3fcff3fcff3ffff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  100. -- sNaN: exponent continuation bits [excluding sNaN selector]
  101. dqcan121 canonical #7f000ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  102. dqcan122 canonical #7e800ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  103. dqcan123 canonical #7e400ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  104. dqcan124 canonical #7e200ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  105. dqcan125 canonical #7e100ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  106. dqcan126 canonical #7e080ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  107. dqcan127 canonical #7e040ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  108. dqcan128 canonical #7e020ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  109. dqcan129 canonical #7e010ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  110. dqcan130 canonical #7e008ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  111. dqcan131 canonical #7e004ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
  112. -- Inf: exponent continuation bits
  113. dqcan137 canonical #78000000000000000000000000000000 -> #78000000000000000000000000000000
  114. dqcan138 canonical #79000000000000000000000000000000 -> #78000000000000000000000000000000
  115. dqcan139 canonical #7a000000000000000000000000000000 -> #78000000000000000000000000000000
  116. dqcan140 canonical #78800000000000000000000000000000 -> #78000000000000000000000000000000
  117. dqcan141 canonical #78400000000000000000000000000000 -> #78000000000000000000000000000000
  118. dqcan142 canonical #78200000000000000000000000000000 -> #78000000000000000000000000000000
  119. dqcan143 canonical #78100000000000000000000000000000 -> #78000000000000000000000000000000
  120. dqcan144 canonical #78080000000000000000000000000000 -> #78000000000000000000000000000000
  121. dqcan145 canonical #78040000000000000000000000000000 -> #78000000000000000000000000000000
  122. dqcan146 canonical #78020000000000000000000000000000 -> #78000000000000000000000000000000
  123. dqcan147 canonical #78010000000000000000000000000000 -> #78000000000000000000000000000000
  124. dqcan148 canonical #78008000000000000000000000000000 -> #78000000000000000000000000000000
  125. dqcan149 canonical #78004000000000000000000000000000 -> #78000000000000000000000000000000
  126. -- Inf: coefficient continuation bits (first, last, and a few others)
  127. dqcan150 canonical #78000000000000000000000000000000 -> #78000000000000000000000000000000
  128. dqcan151 canonical #78020000000000000000000000000000 -> #78000000000000000000000000000000
  129. dqcan152 canonical #78000000000000000000000000000001 -> #78000000000000000000000000000000
  130. dqcan153 canonical #78010000000000000000000000000000 -> #78000000000000000000000000000000
  131. dqcan154 canonical #78002000000000000000000000000000 -> #78000000000000000000000000000000
  132. dqcan155 canonical #78000800000000000000000000000000 -> #78000000000000000000000000000000
  133. dqcan156 canonical #78000020000000000000000000000000 -> #78000000000000000000000000000000
  134. dqcan157 canonical #78000004000000000000000000000000 -> #78000000000000000000000000000000
  135. dqcan158 canonical #78000000400000000000000000000000 -> #78000000000000000000000000000000
  136. dqcan159 canonical #78000000080000000000000000000000 -> #78000000000000000000000000000000
  137. dqcan160 canonical #78000000004000000000000000000000 -> #78000000000000000000000000000000
  138. dqcan161 canonical #78000000000200000000000000000000 -> #78000000000000000000000000000000
  139. dqcan162 canonical #78000000000080000000000000000000 -> #78000000000000000000000000000000
  140. dqcan163 canonical #78000000000002000000000000000000 -> #78000000000000000000000000000000
  141. dqcan164 canonical #78000000000000400000000000000000 -> #78000000000000000000000000000000
  142. dqcan165 canonical #78000000000000080000000000000000 -> #78000000000000000000000000000000
  143. dqcan166 canonical #78000000000000001000000000000000 -> #78000000000000000000000000000000
  144. dqcan167 canonical #78000000000000000200000000000000 -> #78000000000000000000000000000000
  145. dqcan168 canonical #78000000000000000080000000000000 -> #78000000000000000000000000000000
  146. dqcan169 canonical #78000000000000000004000000000000 -> #78000000000000000000000000000000
  147. dqcan170 canonical #78000000000000000000400000000000 -> #78000000000000000000000000000000
  148. dqcan171 canonical #78000000000000000000010000000000 -> #78000000000000000000000000000000
  149. dqcan172 canonical #78000000000000000000002000000000 -> #78000000000000000000000000000000
  150. dqcan173 canonical #78000000000000000000000400000000 -> #78000000000000000000000000000000
  151. dqcan174 canonical #78000000000000000000000080000000 -> #78000000000000000000000000000000
  152. dqcan175 canonical #78000000000000000000000002000000 -> #78000000000000000000000000000000
  153. dqcan176 canonical #78000000000000000000000000400000 -> #78000000000000000000000000000000
  154. dqcan177 canonical #78000000000000000000000000020000 -> #78000000000000000000000000000000
  155. dqcan178 canonical #78000000000000000000000000001000 -> #78000000000000000000000000000000
  156. dqcan179 canonical #78000000000000000000000000000400 -> #78000000000000000000000000000000
  157. dqcan180 canonical #78000000000000000000000000000020 -> #78000000000000000000000000000000
  158. dqcan181 canonical #78000000000000000000000000000008 -> #78000000000000000000000000000000
  159. -- Now the operators -- trying to check paths that might fail to
  160. -- canonicalize propagated operands
  161. ----- Add:
  162. -- Finites: neutral 0
  163. dqcan202 add 0E+6144 #77ffcff3fcff3fcffffcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  164. dqcan203 add #77ffcff3fcff3fcff3fcff3ffff3fcff 0E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  165. -- tiny zero
  166. dqcan204 add 0E-6176 #77ffcff3ffff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff Rounded
  167. dqcan205 add #77ffcff3fcff3fcff3fcff3fcff3ffff 0E-6176 -> #77ffcff3fcff3fcff3fcff3fcff3fcff Rounded
  168. -- tiny non zero
  169. dqcan206 add -1E-6176 #77ffcff3fcff3fcff3fcff3fcfffffff -> #77ffcff3fcff3fcff3fcff3fcff3fcff Inexact Rounded
  170. dqcan207 add #77ffcffffffffffffffffffffff3fcff -1E-6176 -> #77ffcff3fcff3fcff3fcff3fcff3fcff Inexact Rounded
  171. -- NaN: declets in payload
  172. dqcan211 add 0 #7c000ff3fcff3fcff3fcfffffff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  173. dqcan212 add #7c000ff3fcff3fcfffffff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  174. -- NaN: exponent continuation bits [excluding sNaN selector]
  175. dqcan213 add 0 #7c400ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  176. dqcan214 add #7c020ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  177. -- sNaN: declets in payload
  178. dqcan215 add 0 #7e000ff3fcffffcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  179. dqcan216 add #7e003ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  180. -- sNaN: exponent continuation bits [excluding sNaN selector]
  181. dqcan217 add 0 #7e500ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  182. dqcan218 add #7e0e0ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  183. -- Inf: exponent continuation bits
  184. dqcan220 add 0 #78010000000000000000000000000000 -> #78000000000000000000000000000000
  185. dqcan221 add #78680000000000000000000000000000 0 -> #78000000000000000000000000000000
  186. -- Inf: coefficient continuation bits
  187. dqcan222 add 0 #78002000000000000000000000000000 -> #78000000000000000000000000000000
  188. dqcan223 add #78000000000000000000000000000001 0 -> #78000000000000000000000000000000
  189. dqcan224 add 0 #78000002000000000000000000000000 -> #78000000000000000000000000000000
  190. dqcan225 add #780000000000f0000000000000000000 0 -> #78000000000000000000000000000000
  191. dqcan226 add 0 #78000000000000000005000000000000 -> #78000000000000000000000000000000
  192. dqcan227 add #780000000000000000000000000a0000 0 -> #78000000000000000000000000000000
  193. ----- Class: [does not return encoded]
  194. ----- Compare:
  195. dqcan231 compare -Inf 1 -> #a2080000000000000000000000000001
  196. dqcan232 compare -Inf -Inf -> #22080000000000000000000000000000
  197. dqcan233 compare 1 -Inf -> #22080000000000000000000000000001
  198. dqcan234 compare #7c010ff3fcff3fcff3fcff3ffffffcff -1000 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  199. dqcan235 compare #7e004ff3fcff3fcff3ffffffcff3fcff -1000 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  200. ----- CompareSig:
  201. dqcan241 comparesig -Inf 1 -> #a2080000000000000000000000000001
  202. dqcan242 comparesig -Inf -Inf -> #22080000000000000000000000000000
  203. dqcan243 comparesig 1 -Inf -> #22080000000000000000000000000001
  204. dqcan244 comparesig #7c400ff3ffff3fcff3fcff3fcff3fcff -1000 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  205. dqcan245 comparesig #7e050ff3fcfffffff3fcff3fcff3fcff -1000 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  206. ----- Copy: [does not usually canonicalize]
  207. -- finites
  208. dqcan250 copy #6e080ff3fcff3fcfffffff3fcfffffff -> #6e080ff3fcff3fcfffffff3fcfffffff
  209. dqcan251 copy #ee080ff3fcff3ffff3fcff3ffff3fcff -> #ee080ff3fcff3ffff3fcff3ffff3fcff
  210. -- NaNs
  211. dqcan252 copy #7c000ff3fcffffffffffffffcff3fcff -> #7c000ff3fcffffffffffffffcff3fcff
  212. dqcan253 copy #7c080ff3fcff3fcff3fcff3fcff3fcff -> #7c080ff3fcff3fcff3fcff3fcff3fcff
  213. -- sNaN
  214. dqcan254 copy #7e003ff3fcffffffffffffffcff3fcff -> #7e003ff3fcffffffffffffffcff3fcff
  215. dqcan255 copy #7e100ff3fcff3fcff3fcff3fcff3fcff -> #7e100ff3fcff3fcff3fcff3fcff3fcff
  216. -- Inf
  217. dqcan258 copy #78002000000000000000000000000000 -> #78002000000000000000000000000000
  218. dqcan259 copy #78000000000010000000000000100000 -> #78000000000010000000000000100000
  219. ----- CopyAbs: [does not usually canonicalize]
  220. -- finites
  221. dqcan260 copyabs #6e080ff3fcff3fcfffffff3fcfffffff -> #6e080ff3fcff3fcfffffff3fcfffffff
  222. dqcan261 copyabs #ee080ff3fcff3ffff3fcff3ffff3fcff -> #6e080ff3fcff3ffff3fcff3ffff3fcff
  223. -- NaNs
  224. dqcan262 copyabs #fc000ff3fcffffffffffffffcff3fcff -> #7c000ff3fcffffffffffffffcff3fcff
  225. dqcan263 copyabs #fc080ff3fcff3fcff3fcff3fcff3fcff -> #7c080ff3fcff3fcff3fcff3fcff3fcff
  226. -- sNaN
  227. dqcan264 copyabs #fe003ff3fcffffffffffffffcff3fcff -> #7e003ff3fcffffffffffffffcff3fcff
  228. dqcan265 copyabs #fe100ff3fcff3fcff3fcff3fcff3fcff -> #7e100ff3fcff3fcff3fcff3fcff3fcff
  229. -- Inf
  230. dqcan268 copyabs #f8002000000000000000000000000000 -> #78002000000000000000000000000000
  231. dqcan269 copyabs #f8000000000000700700700000000000 -> #78000000000000700700700000000000
  232. ----- CopyNegate: [does not usually canonicalize]
  233. -- finites
  234. dqcan270 copynegate #6e080ff3fcff3fcfffffff3fcfffffff -> #ee080ff3fcff3fcfffffff3fcfffffff
  235. dqcan271 copynegate #ee080ff3fcff3ffff3fcff3ffff3fcff -> #6e080ff3fcff3ffff3fcff3ffff3fcff
  236. -- NaNs
  237. dqcan272 copynegate #7c000ff3fcffffffffffff3fcff3fcff -> #fc000ff3fcffffffffffff3fcff3fcff
  238. dqcan273 copynegate #7c080ff3fcff3fcff3fcff3fcff3fcff -> #fc080ff3fcff3fcff3fcff3fcff3fcff
  239. -- sNaN
  240. dqcan274 copynegate #7e003ff3fcffffffffffffffcff3fcff -> #fe003ff3fcffffffffffffffcff3fcff
  241. dqcan275 copynegate #7e100ff3fcff3fcff3fcff3fcff3fcff -> #fe100ff3fcff3fcff3fcff3fcff3fcff
  242. -- Inf
  243. dqcan278 copynegate #78002000000000000000000000000000 -> #f8002000000000000000000000000000
  244. dqcan279 copynegate #78000000000010000000000000100000 -> #f8000000000010000000000000100000
  245. ----- CopySign: [does not usually canonicalize]
  246. -- finites
  247. dqcan280 copysign #6e080ff3fcff3fcfffffff3fcfffffff -1 -> #ee080ff3fcff3fcfffffff3fcfffffff
  248. dqcan281 copysign #ee080ff3fcff3ffff3fcff3ffff3fcff 1 -> #6e080ff3fcff3ffff3fcff3ffff3fcff
  249. -- NaNs
  250. dqcan282 copysign #7c000ff3fcffffffffffffffcff3fcff -1 -> #fc000ff3fcffffffffffffffcff3fcff
  251. dqcan283 copysign #7c080ff3fcff3fcff3fcff3fcff3fcff 1 -> #7c080ff3fcff3fcff3fcff3fcff3fcff
  252. -- sNaN
  253. dqcan284 copysign #7e003ff3fcffffffffffffffcff3fcff -1 -> #fe003ff3fcffffffffffffffcff3fcff
  254. dqcan285 copysign #7e100ff3fcff3fcff3fcff3fcff3fcff 1 -> #7e100ff3fcff3fcff3fcff3fcff3fcff
  255. -- Inf
  256. dqcan288 copysign #78002000000000000000000000000000 -1 -> #f8002000000000000000000000000000
  257. dqcan289 copysign #78000000000010000000000000100000 1 -> #78000000000010000000000000100000
  258. ----- Multiply:
  259. -- Finites: neutral 0
  260. dqcan302 multiply 1 #77ffff3fcff3fcff0000000000000000 -> #77ffff3fcff3fcff0000000000000000
  261. dqcan303 multiply #77fcffffcff3fcff0000000000000000 1 -> #77fccfffcff3fcff0000000000000000
  262. -- negative
  263. dqcan306 multiply -1 #77ffff3fcff3fcff0000000000000000 -> #f7ffff3fcff3fcff0000000000000000
  264. dqcan307 multiply #77fcffffcff3fcff0000000000000000 -1 -> #f7fccfffcff3fcff0000000000000000
  265. -- NaN: declets in payload
  266. dqcan311 multiply 1 #7c03ff3fcff3fcff0000000000000000 -> #7c003f3fcff3fcff0000000000000000
  267. dqcan312 multiply #7c03ff3fcff3fcff0000000000000000 1 -> #7c003f3fcff3fcff0000000000000000
  268. -- NaN: exponent continuation bits [excluding sNaN selector]
  269. dqcan313 multiply 1 #7c40ff3fcff3fcff0000000000000000 -> #7c003f3fcff3fcff0000000000000000
  270. dqcan314 multiply #7c40ff3fcff3fcff0000000000000000 1 -> #7c003f3fcff3fcff0000000000000000
  271. -- sNaN: declets in payload
  272. dqcan315 multiply 1 #7e00ffffcff3fcff0000000000000000 -> #7c000fffcff3fcff0000000000000000 Invalid_operation
  273. dqcan316 multiply #7e00ffffcff3fcff0000000000000000 1 -> #7c000fffcff3fcff0000000000000000 Invalid_operation
  274. -- sNaN: exponent continuation bits [excluding sNaN selector]
  275. dqcan317 multiply 1 #7e80ff3fcff3fcff0000000000000000 -> #7c003f3fcff3fcff0000000000000000 Invalid_operation
  276. dqcan318 multiply #7e80ff3fcff3fcff0000000000000000 1 -> #7c003f3fcff3fcff0000000000000000 Invalid_operation
  277. -- Inf: exponent continuation bits
  278. dqcan320 multiply 1 #78800000000000000000000000000000 -> #78000000000000000000000000000000
  279. dqcan321 multiply #78800000000000000000000000000000 1 -> #78000000000000000000000000000000
  280. -- Inf: coefficient continuation bits
  281. dqcan322 multiply 1 #78020000000000000000000000000000 -> #78000000000000000000000000000000
  282. dqcan323 multiply #78020000000000000000000000000000 1 -> #78000000000000000000000000000000
  283. dqcan324 multiply 1 #78000000000000010000000000000000 -> #78000000000000000000000000000000
  284. dqcan325 multiply #78000000000000010000000000000000 1 -> #78000000000000000000000000000000
  285. dqcan326 multiply 1 #78000020000000000000000000000000 -> #78000000000000000000000000000000
  286. dqcan327 multiply #78000020000000000000000000000000 1 -> #78000000000000000000000000000000
  287. ----- Quantize:
  288. dqcan401 quantize #ee080ff3fcff3fcff3fffffffff3fcff 0 -> #ee080ff3fcff3fcff3fcff3fcff3fcff
  289. dqcan402 quantize #ee080ff3fffffffffffcff3fcff3fcff 0 -> #ee080ff3fcff3fcff3fcff3fcff3fcff
  290. dqcan403 quantize #78800000000000000000000000000000 Inf -> #78000000000000000000000000000000
  291. dqcan404 quantize #78020000000000000000000000000000 -Inf -> #78000000000000000000000000000000
  292. dqcan410 quantize #7c080ff3fcff3fcff3fcff3fcff3fcff 1 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  293. dqcan411 quantize #fc000ff3fcfffffff3fcff3fcff3fcff 1 -> #fc000ff3fcff3fcff3fcff3fcff3fcff
  294. dqcan412 quantize #7e100ff3fcff3fcff3fcff3fcff3fcff 1 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  295. dqcan413 quantize #fe000ff3fcff3fcff3ffffffcff3fcff 1 -> #fc000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  296. ----- Subtract:
  297. -- Finites: neutral 0
  298. dqcan502 subtract 0E+6144 #77ffcff3fcff3fcffffcff3fcff3fcff -> #f7ffcff3fcff3fcff3fcff3fcff3fcff
  299. dqcan503 subtract #77ffcff3fcff3fcff3fcff3ffff3fcff 0E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
  300. -- tiny zero
  301. dqcan504 subtract 0E-6176 #77ffcff3ffff3fcff3fcff3fcff3fcff -> #f7ffcff3fcff3fcff3fcff3fcff3fcff Rounded
  302. dqcan505 subtract #77ffcff3fcff3fcff3fcff3fcff3ffff 0E-6176 -> #77ffcff3fcff3fcff3fcff3fcff3fcff Rounded
  303. -- tiny non zero
  304. dqcan506 subtract -1E-6176 #77ffcff3fcff3fcff3fcff3fcfffffff -> #f7ffcff3fcff3fcff3fcff3fcff3fcff Inexact Rounded
  305. dqcan507 subtract #77ffcffffffffffffffffffffff3fcff -1E-6176 -> #77ffcff3fcff3fcff3fcff3fcff3fcff Inexact Rounded
  306. -- NaN: declets in payload
  307. dqcan511 subtract 0 #7c000ff3fcff3fcff3fcfffffff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  308. dqcan512 subtract #7c000ff3fcff3fcfffffff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  309. -- NaN: exponent continuation bits [excluding sNaN selector]
  310. dqcan513 subtract 0 #7c400ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  311. dqcan514 subtract #7c020ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  312. -- sNaN: declets in payload
  313. dqcan515 subtract 0 #7e000ff3fcffffcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  314. dqcan516 subtract #7e003ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  315. -- sNaN: exponent continuation bits [excluding sNaN selector]
  316. dqcan517 subtract 0 #7e500ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  317. dqcan518 subtract #7e0e0ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  318. -- Inf: exponent continuation bits
  319. dqcan520 subtract 0 #78010000000000000000000000000000 -> #f8000000000000000000000000000000
  320. dqcan521 subtract #78680000000000000000000000000000 0 -> #78000000000000000000000000000000
  321. -- Inf: coefficient continuation bits
  322. dqcan522 subtract 0 #78002000000000000000000000000000 -> #f8000000000000000000000000000000
  323. dqcan523 subtract #78000000000000000000000000000001 0 -> #78000000000000000000000000000000
  324. dqcan524 subtract 0 #78000002000000000000000000000000 -> #f8000000000000000000000000000000
  325. dqcan525 subtract #780000000000f0000000000000000000 0 -> #78000000000000000000000000000000
  326. dqcan526 subtract 0 #78000000000000000005000000000000 -> #f8000000000000000000000000000000
  327. dqcan527 subtract #780000000000000000000000000a0000 0 -> #78000000000000000000000000000000
  328. ----- ToIntegral:
  329. dqcan601 tointegralx #6e080ff3fdff3fcff3fcff3fcff3fcff -> #6e080ff3fcff3fcff3fcff3fcff3fcff
  330. dqcan602 tointegralx #ee080ff3fcff3ffff3fcff3fcff3fcff -> #ee080ff3fcff3fcff3fcff3fcff3fcff
  331. dqcan603 tointegralx #78800000000000000000000000000000 -> #78000000000000000000000000000000
  332. dqcan604 tointegralx #78020000000000000000000000000000 -> #78000000000000000000000000000000
  333. dqcan614 tointegralx #7c100ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
  334. dqcan615 tointegralx #fc000ff3fcff3fcff3fcffffcff3fcff -> #fc000ff3fcff3fcff3fcff3fcff3fcff
  335. dqcan616 tointegralx #7e010ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  336. dqcan617 tointegralx #fe000ff3fcff3fcff3fdff3fcff3fcff -> #fc000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
  337. -- uncanonical 3999, 39.99, 3.99, 0.399, and negatives
  338. dqcan618 tointegralx #22080000000000000000000000000fff -> #22080000000000000000000000000cff
  339. dqcan619 tointegralx #22078000000000000000000000000fff -> #22080000000000000000000000000040 Inexact Rounded
  340. dqcan620 tointegralx #22074000000000000000000000000fff -> #22080000000000000000000000000004 Inexact Rounded
  341. dqcan621 tointegralx #22070000000000000000000000000fff -> #22080000000000000000000000000000 Inexact Rounded
  342. dqcan622 tointegralx #a2080000000000000000000000000fff -> #a2080000000000000000000000000cff
  343. dqcan623 tointegralx #a2078000000000000000000000000fff -> #a2080000000000000000000000000040 Inexact Rounded
  344. dqcan624 tointegralx #a2074000000000000000000000000fff -> #a2080000000000000000000000000004 Inexact Rounded
  345. dqcan625 tointegralx #a2070000000000000000000000000fff -> #a2080000000000000000000000000000 Inexact Rounded