dqCompareTotalMag.decTest 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  1. ------------------------------------------------------------------------
  2. -- dqCompareTotalMag.decTest -- decQuad comparison; abs. total order --
  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. -- Note that we cannot assume add/subtract tests cover paths adequately,
  22. -- here, because the code might be quite different (comparison cannot
  23. -- overflow or underflow, so actual subtractions are not necessary).
  24. -- Similarly, comparetotal will have some radically different paths
  25. -- than compare.
  26. -- All operands and results are decQuads.
  27. extended: 1
  28. clamp: 1
  29. precision: 34
  30. maxExponent: 6144
  31. minExponent: -6143
  32. rounding: half_even
  33. -- sanity checks
  34. dqctm001 comparetotmag -2 -2 -> 0
  35. dqctm002 comparetotmag -2 -1 -> 1
  36. dqctm003 comparetotmag -2 0 -> 1
  37. dqctm004 comparetotmag -2 1 -> 1
  38. dqctm005 comparetotmag -2 2 -> 0
  39. dqctm006 comparetotmag -1 -2 -> -1
  40. dqctm007 comparetotmag -1 -1 -> 0
  41. dqctm008 comparetotmag -1 0 -> 1
  42. dqctm009 comparetotmag -1 1 -> 0
  43. dqctm010 comparetotmag -1 2 -> -1
  44. dqctm011 comparetotmag 0 -2 -> -1
  45. dqctm012 comparetotmag 0 -1 -> -1
  46. dqctm013 comparetotmag 0 0 -> 0
  47. dqctm014 comparetotmag 0 1 -> -1
  48. dqctm015 comparetotmag 0 2 -> -1
  49. dqctm016 comparetotmag 1 -2 -> -1
  50. dqctm017 comparetotmag 1 -1 -> 0
  51. dqctm018 comparetotmag 1 0 -> 1
  52. dqctm019 comparetotmag 1 1 -> 0
  53. dqctm020 comparetotmag 1 2 -> -1
  54. dqctm021 comparetotmag 2 -2 -> 0
  55. dqctm022 comparetotmag 2 -1 -> 1
  56. dqctm023 comparetotmag 2 0 -> 1
  57. dqctm025 comparetotmag 2 1 -> 1
  58. dqctm026 comparetotmag 2 2 -> 0
  59. dqctm031 comparetotmag -20 -20 -> 0
  60. dqctm032 comparetotmag -20 -10 -> 1
  61. dqctm033 comparetotmag -20 00 -> 1
  62. dqctm034 comparetotmag -20 10 -> 1
  63. dqctm035 comparetotmag -20 20 -> 0
  64. dqctm036 comparetotmag -10 -20 -> -1
  65. dqctm037 comparetotmag -10 -10 -> 0
  66. dqctm038 comparetotmag -10 00 -> 1
  67. dqctm039 comparetotmag -10 10 -> 0
  68. dqctm040 comparetotmag -10 20 -> -1
  69. dqctm041 comparetotmag 00 -20 -> -1
  70. dqctm042 comparetotmag 00 -10 -> -1
  71. dqctm043 comparetotmag 00 00 -> 0
  72. dqctm044 comparetotmag 00 10 -> -1
  73. dqctm045 comparetotmag 00 20 -> -1
  74. dqctm046 comparetotmag 10 -20 -> -1
  75. dqctm047 comparetotmag 10 -10 -> 0
  76. dqctm048 comparetotmag 10 00 -> 1
  77. dqctm049 comparetotmag 10 10 -> 0
  78. dqctm050 comparetotmag 10 20 -> -1
  79. dqctm051 comparetotmag 20 -20 -> 0
  80. dqctm052 comparetotmag 20 -10 -> 1
  81. dqctm053 comparetotmag 20 00 -> 1
  82. dqctm055 comparetotmag 20 10 -> 1
  83. dqctm056 comparetotmag 20 20 -> 0
  84. dqctm061 comparetotmag -2.0 -2.0 -> 0
  85. dqctm062 comparetotmag -2.0 -1.0 -> 1
  86. dqctm063 comparetotmag -2.0 0.0 -> 1
  87. dqctm064 comparetotmag -2.0 1.0 -> 1
  88. dqctm065 comparetotmag -2.0 2.0 -> 0
  89. dqctm066 comparetotmag -1.0 -2.0 -> -1
  90. dqctm067 comparetotmag -1.0 -1.0 -> 0
  91. dqctm068 comparetotmag -1.0 0.0 -> 1
  92. dqctm069 comparetotmag -1.0 1.0 -> 0
  93. dqctm070 comparetotmag -1.0 2.0 -> -1
  94. dqctm071 comparetotmag 0.0 -2.0 -> -1
  95. dqctm072 comparetotmag 0.0 -1.0 -> -1
  96. dqctm073 comparetotmag 0.0 0.0 -> 0
  97. dqctm074 comparetotmag 0.0 1.0 -> -1
  98. dqctm075 comparetotmag 0.0 2.0 -> -1
  99. dqctm076 comparetotmag 1.0 -2.0 -> -1
  100. dqctm077 comparetotmag 1.0 -1.0 -> 0
  101. dqctm078 comparetotmag 1.0 0.0 -> 1
  102. dqctm079 comparetotmag 1.0 1.0 -> 0
  103. dqctm080 comparetotmag 1.0 2.0 -> -1
  104. dqctm081 comparetotmag 2.0 -2.0 -> 0
  105. dqctm082 comparetotmag 2.0 -1.0 -> 1
  106. dqctm083 comparetotmag 2.0 0.0 -> 1
  107. dqctm085 comparetotmag 2.0 1.0 -> 1
  108. dqctm086 comparetotmag 2.0 2.0 -> 0
  109. -- now some cases which might overflow if subtract were used
  110. dqctm090 comparetotmag 9.99999999999999999999999999999E+6144 9.99999999999999999999999999999E+6144 -> 0
  111. dqctm091 comparetotmag -9.99999999999999999999999999999E+6144 9.99999999999999999999999999999E+6144 -> 0
  112. dqctm092 comparetotmag 9.99999999999999999999999999999E+6144 -9.99999999999999999999999999999E+6144 -> 0
  113. dqctm093 comparetotmag -9.99999999999999999999999999999E+6144 -9.99999999999999999999999999999E+6144 -> 0
  114. -- some differing length/exponent cases
  115. -- in this first group, compare would compare all equal
  116. dqctm100 comparetotmag 7.0 7.0 -> 0
  117. dqctm101 comparetotmag 7.0 7 -> -1
  118. dqctm102 comparetotmag 7 7.0 -> 1
  119. dqctm103 comparetotmag 7E+0 7.0 -> 1
  120. dqctm104 comparetotmag 70E-1 7.0 -> 0
  121. dqctm105 comparetotmag 0.7E+1 7 -> 0
  122. dqctm106 comparetotmag 70E-1 7 -> -1
  123. dqctm107 comparetotmag 7.0 7E+0 -> -1
  124. dqctm108 comparetotmag 7.0 70E-1 -> 0
  125. dqctm109 comparetotmag 7 0.7E+1 -> 0
  126. dqctm110 comparetotmag 7 70E-1 -> 1
  127. dqctm120 comparetotmag 8.0 7.0 -> 1
  128. dqctm121 comparetotmag 8.0 7 -> 1
  129. dqctm122 comparetotmag 8 7.0 -> 1
  130. dqctm123 comparetotmag 8E+0 7.0 -> 1
  131. dqctm124 comparetotmag 80E-1 7.0 -> 1
  132. dqctm125 comparetotmag 0.8E+1 7 -> 1
  133. dqctm126 comparetotmag 80E-1 7 -> 1
  134. dqctm127 comparetotmag 8.0 7E+0 -> 1
  135. dqctm128 comparetotmag 8.0 70E-1 -> 1
  136. dqctm129 comparetotmag 8 0.7E+1 -> 1
  137. dqctm130 comparetotmag 8 70E-1 -> 1
  138. dqctm140 comparetotmag 8.0 9.0 -> -1
  139. dqctm141 comparetotmag 8.0 9 -> -1
  140. dqctm142 comparetotmag 8 9.0 -> -1
  141. dqctm143 comparetotmag 8E+0 9.0 -> -1
  142. dqctm144 comparetotmag 80E-1 9.0 -> -1
  143. dqctm145 comparetotmag 0.8E+1 9 -> -1
  144. dqctm146 comparetotmag 80E-1 9 -> -1
  145. dqctm147 comparetotmag 8.0 9E+0 -> -1
  146. dqctm148 comparetotmag 8.0 90E-1 -> -1
  147. dqctm149 comparetotmag 8 0.9E+1 -> -1
  148. dqctm150 comparetotmag 8 90E-1 -> -1
  149. -- and again, with sign changes -+ ..
  150. dqctm200 comparetotmag -7.0 7.0 -> 0
  151. dqctm201 comparetotmag -7.0 7 -> -1
  152. dqctm202 comparetotmag -7 7.0 -> 1
  153. dqctm203 comparetotmag -7E+0 7.0 -> 1
  154. dqctm204 comparetotmag -70E-1 7.0 -> 0
  155. dqctm205 comparetotmag -0.7E+1 7 -> 0
  156. dqctm206 comparetotmag -70E-1 7 -> -1
  157. dqctm207 comparetotmag -7.0 7E+0 -> -1
  158. dqctm208 comparetotmag -7.0 70E-1 -> 0
  159. dqctm209 comparetotmag -7 0.7E+1 -> 0
  160. dqctm210 comparetotmag -7 70E-1 -> 1
  161. dqctm220 comparetotmag -8.0 7.0 -> 1
  162. dqctm221 comparetotmag -8.0 7 -> 1
  163. dqctm222 comparetotmag -8 7.0 -> 1
  164. dqctm223 comparetotmag -8E+0 7.0 -> 1
  165. dqctm224 comparetotmag -80E-1 7.0 -> 1
  166. dqctm225 comparetotmag -0.8E+1 7 -> 1
  167. dqctm226 comparetotmag -80E-1 7 -> 1
  168. dqctm227 comparetotmag -8.0 7E+0 -> 1
  169. dqctm228 comparetotmag -8.0 70E-1 -> 1
  170. dqctm229 comparetotmag -8 0.7E+1 -> 1
  171. dqctm230 comparetotmag -8 70E-1 -> 1
  172. dqctm240 comparetotmag -8.0 9.0 -> -1
  173. dqctm241 comparetotmag -8.0 9 -> -1
  174. dqctm242 comparetotmag -8 9.0 -> -1
  175. dqctm243 comparetotmag -8E+0 9.0 -> -1
  176. dqctm244 comparetotmag -80E-1 9.0 -> -1
  177. dqctm245 comparetotmag -0.8E+1 9 -> -1
  178. dqctm246 comparetotmag -80E-1 9 -> -1
  179. dqctm247 comparetotmag -8.0 9E+0 -> -1
  180. dqctm248 comparetotmag -8.0 90E-1 -> -1
  181. dqctm249 comparetotmag -8 0.9E+1 -> -1
  182. dqctm250 comparetotmag -8 90E-1 -> -1
  183. -- and again, with sign changes +- ..
  184. dqctm300 comparetotmag 7.0 -7.0 -> 0
  185. dqctm301 comparetotmag 7.0 -7 -> -1
  186. dqctm302 comparetotmag 7 -7.0 -> 1
  187. dqctm303 comparetotmag 7E+0 -7.0 -> 1
  188. dqctm304 comparetotmag 70E-1 -7.0 -> 0
  189. dqctm305 comparetotmag .7E+1 -7 -> 0
  190. dqctm306 comparetotmag 70E-1 -7 -> -1
  191. dqctm307 comparetotmag 7.0 -7E+0 -> -1
  192. dqctm308 comparetotmag 7.0 -70E-1 -> 0
  193. dqctm309 comparetotmag 7 -.7E+1 -> 0
  194. dqctm310 comparetotmag 7 -70E-1 -> 1
  195. dqctm320 comparetotmag 8.0 -7.0 -> 1
  196. dqctm321 comparetotmag 8.0 -7 -> 1
  197. dqctm322 comparetotmag 8 -7.0 -> 1
  198. dqctm323 comparetotmag 8E+0 -7.0 -> 1
  199. dqctm324 comparetotmag 80E-1 -7.0 -> 1
  200. dqctm325 comparetotmag .8E+1 -7 -> 1
  201. dqctm326 comparetotmag 80E-1 -7 -> 1
  202. dqctm327 comparetotmag 8.0 -7E+0 -> 1
  203. dqctm328 comparetotmag 8.0 -70E-1 -> 1
  204. dqctm329 comparetotmag 8 -.7E+1 -> 1
  205. dqctm330 comparetotmag 8 -70E-1 -> 1
  206. dqctm340 comparetotmag 8.0 -9.0 -> -1
  207. dqctm341 comparetotmag 8.0 -9 -> -1
  208. dqctm342 comparetotmag 8 -9.0 -> -1
  209. dqctm343 comparetotmag 8E+0 -9.0 -> -1
  210. dqctm344 comparetotmag 80E-1 -9.0 -> -1
  211. dqctm345 comparetotmag .8E+1 -9 -> -1
  212. dqctm346 comparetotmag 80E-1 -9 -> -1
  213. dqctm347 comparetotmag 8.0 -9E+0 -> -1
  214. dqctm348 comparetotmag 8.0 -90E-1 -> -1
  215. dqctm349 comparetotmag 8 -.9E+1 -> -1
  216. dqctm350 comparetotmag 8 -90E-1 -> -1
  217. -- and again, with sign changes -- ..
  218. dqctm400 comparetotmag -7.0 -7.0 -> 0
  219. dqctm401 comparetotmag -7.0 -7 -> -1
  220. dqctm402 comparetotmag -7 -7.0 -> 1
  221. dqctm403 comparetotmag -7E+0 -7.0 -> 1
  222. dqctm404 comparetotmag -70E-1 -7.0 -> 0
  223. dqctm405 comparetotmag -.7E+1 -7 -> 0
  224. dqctm406 comparetotmag -70E-1 -7 -> -1
  225. dqctm407 comparetotmag -7.0 -7E+0 -> -1
  226. dqctm408 comparetotmag -7.0 -70E-1 -> 0
  227. dqctm409 comparetotmag -7 -.7E+1 -> 0
  228. dqctm410 comparetotmag -7 -70E-1 -> 1
  229. dqctm420 comparetotmag -8.0 -7.0 -> 1
  230. dqctm421 comparetotmag -8.0 -7 -> 1
  231. dqctm422 comparetotmag -8 -7.0 -> 1
  232. dqctm423 comparetotmag -8E+0 -7.0 -> 1
  233. dqctm424 comparetotmag -80E-1 -7.0 -> 1
  234. dqctm425 comparetotmag -.8E+1 -7 -> 1
  235. dqctm426 comparetotmag -80E-1 -7 -> 1
  236. dqctm427 comparetotmag -8.0 -7E+0 -> 1
  237. dqctm428 comparetotmag -8.0 -70E-1 -> 1
  238. dqctm429 comparetotmag -8 -.7E+1 -> 1
  239. dqctm430 comparetotmag -8 -70E-1 -> 1
  240. dqctm440 comparetotmag -8.0 -9.0 -> -1
  241. dqctm441 comparetotmag -8.0 -9 -> -1
  242. dqctm442 comparetotmag -8 -9.0 -> -1
  243. dqctm443 comparetotmag -8E+0 -9.0 -> -1
  244. dqctm444 comparetotmag -80E-1 -9.0 -> -1
  245. dqctm445 comparetotmag -.8E+1 -9 -> -1
  246. dqctm446 comparetotmag -80E-1 -9 -> -1
  247. dqctm447 comparetotmag -8.0 -9E+0 -> -1
  248. dqctm448 comparetotmag -8.0 -90E-1 -> -1
  249. dqctm449 comparetotmag -8 -.9E+1 -> -1
  250. dqctm450 comparetotmag -8 -90E-1 -> -1
  251. -- testcases that subtract to lots of zeros at boundaries [pgr]
  252. dqctm473 comparetotmag 123.4560000000000E-89 123.456E-89 -> -1
  253. dqctm474 comparetotmag 123.456000000000E+89 123.456E+89 -> -1
  254. dqctm475 comparetotmag 123.45600000000E-89 123.456E-89 -> -1
  255. dqctm476 comparetotmag 123.4560000000E+89 123.456E+89 -> -1
  256. dqctm477 comparetotmag 123.456000000E-89 123.456E-89 -> -1
  257. dqctm478 comparetotmag 123.45600000E+89 123.456E+89 -> -1
  258. dqctm479 comparetotmag 123.4560000E-89 123.456E-89 -> -1
  259. dqctm480 comparetotmag 123.456000E+89 123.456E+89 -> -1
  260. dqctm481 comparetotmag 123.45600E-89 123.456E-89 -> -1
  261. dqctm482 comparetotmag 123.4560E+89 123.456E+89 -> -1
  262. dqctm483 comparetotmag 123.456E-89 123.456E-89 -> 0
  263. dqctm487 comparetotmag 123.456E+89 123.4560000000000E+89 -> 1
  264. dqctm488 comparetotmag 123.456E-89 123.456000000000E-89 -> 1
  265. dqctm489 comparetotmag 123.456E+89 123.45600000000E+89 -> 1
  266. dqctm490 comparetotmag 123.456E-89 123.4560000000E-89 -> 1
  267. dqctm491 comparetotmag 123.456E+89 123.456000000E+89 -> 1
  268. dqctm492 comparetotmag 123.456E-89 123.45600000E-89 -> 1
  269. dqctm493 comparetotmag 123.456E+89 123.4560000E+89 -> 1
  270. dqctm494 comparetotmag 123.456E-89 123.456000E-89 -> 1
  271. dqctm495 comparetotmag 123.456E+89 123.45600E+89 -> 1
  272. dqctm496 comparetotmag 123.456E-89 123.4560E-89 -> 1
  273. dqctm497 comparetotmag 123.456E+89 123.456E+89 -> 0
  274. -- wide-ranging, around precision; signs equal
  275. dqctm498 comparetotmag 1 1E-17 -> 1
  276. dqctm499 comparetotmag 1 1E-16 -> 1
  277. dqctm500 comparetotmag 1 1E-15 -> 1
  278. dqctm501 comparetotmag 1 1E-14 -> 1
  279. dqctm502 comparetotmag 1 1E-13 -> 1
  280. dqctm503 comparetotmag 1 1E-12 -> 1
  281. dqctm504 comparetotmag 1 1E-11 -> 1
  282. dqctm505 comparetotmag 1 1E-10 -> 1
  283. dqctm506 comparetotmag 1 1E-9 -> 1
  284. dqctm507 comparetotmag 1 1E-8 -> 1
  285. dqctm508 comparetotmag 1 1E-7 -> 1
  286. dqctm509 comparetotmag 1 1E-6 -> 1
  287. dqctm510 comparetotmag 1 1E-5 -> 1
  288. dqctm511 comparetotmag 1 1E-4 -> 1
  289. dqctm512 comparetotmag 1 1E-3 -> 1
  290. dqctm513 comparetotmag 1 1E-2 -> 1
  291. dqctm514 comparetotmag 1 1E-1 -> 1
  292. dqctm515 comparetotmag 1 1E-0 -> 0
  293. dqctm516 comparetotmag 1 1E+1 -> -1
  294. dqctm517 comparetotmag 1 1E+2 -> -1
  295. dqctm518 comparetotmag 1 1E+3 -> -1
  296. dqctm519 comparetotmag 1 1E+4 -> -1
  297. dqctm521 comparetotmag 1 1E+5 -> -1
  298. dqctm522 comparetotmag 1 1E+6 -> -1
  299. dqctm523 comparetotmag 1 1E+7 -> -1
  300. dqctm524 comparetotmag 1 1E+8 -> -1
  301. dqctm525 comparetotmag 1 1E+9 -> -1
  302. dqctm526 comparetotmag 1 1E+10 -> -1
  303. dqctm527 comparetotmag 1 1E+11 -> -1
  304. dqctm528 comparetotmag 1 1E+12 -> -1
  305. dqctm529 comparetotmag 1 1E+13 -> -1
  306. dqctm530 comparetotmag 1 1E+14 -> -1
  307. dqctm531 comparetotmag 1 1E+15 -> -1
  308. dqctm532 comparetotmag 1 1E+16 -> -1
  309. dqctm533 comparetotmag 1 1E+17 -> -1
  310. -- LR swap
  311. dqctm538 comparetotmag 1E-17 1 -> -1
  312. dqctm539 comparetotmag 1E-16 1 -> -1
  313. dqctm540 comparetotmag 1E-15 1 -> -1
  314. dqctm541 comparetotmag 1E-14 1 -> -1
  315. dqctm542 comparetotmag 1E-13 1 -> -1
  316. dqctm543 comparetotmag 1E-12 1 -> -1
  317. dqctm544 comparetotmag 1E-11 1 -> -1
  318. dqctm545 comparetotmag 1E-10 1 -> -1
  319. dqctm546 comparetotmag 1E-9 1 -> -1
  320. dqctm547 comparetotmag 1E-8 1 -> -1
  321. dqctm548 comparetotmag 1E-7 1 -> -1
  322. dqctm549 comparetotmag 1E-6 1 -> -1
  323. dqctm550 comparetotmag 1E-5 1 -> -1
  324. dqctm551 comparetotmag 1E-4 1 -> -1
  325. dqctm552 comparetotmag 1E-3 1 -> -1
  326. dqctm553 comparetotmag 1E-2 1 -> -1
  327. dqctm554 comparetotmag 1E-1 1 -> -1
  328. dqctm555 comparetotmag 1E-0 1 -> 0
  329. dqctm556 comparetotmag 1E+1 1 -> 1
  330. dqctm557 comparetotmag 1E+2 1 -> 1
  331. dqctm558 comparetotmag 1E+3 1 -> 1
  332. dqctm559 comparetotmag 1E+4 1 -> 1
  333. dqctm561 comparetotmag 1E+5 1 -> 1
  334. dqctm562 comparetotmag 1E+6 1 -> 1
  335. dqctm563 comparetotmag 1E+7 1 -> 1
  336. dqctm564 comparetotmag 1E+8 1 -> 1
  337. dqctm565 comparetotmag 1E+9 1 -> 1
  338. dqctm566 comparetotmag 1E+10 1 -> 1
  339. dqctm567 comparetotmag 1E+11 1 -> 1
  340. dqctm568 comparetotmag 1E+12 1 -> 1
  341. dqctm569 comparetotmag 1E+13 1 -> 1
  342. dqctm570 comparetotmag 1E+14 1 -> 1
  343. dqctm571 comparetotmag 1E+15 1 -> 1
  344. dqctm572 comparetotmag 1E+16 1 -> 1
  345. dqctm573 comparetotmag 1E+17 1 -> 1
  346. -- similar with a useful coefficient, one side only
  347. dqctm578 comparetotmag 0.000000987654321 1E-17 -> 1
  348. dqctm579 comparetotmag 0.000000987654321 1E-16 -> 1
  349. dqctm580 comparetotmag 0.000000987654321 1E-15 -> 1
  350. dqctm581 comparetotmag 0.000000987654321 1E-14 -> 1
  351. dqctm582 comparetotmag 0.000000987654321 1E-13 -> 1
  352. dqctm583 comparetotmag 0.000000987654321 1E-12 -> 1
  353. dqctm584 comparetotmag 0.000000987654321 1E-11 -> 1
  354. dqctm585 comparetotmag 0.000000987654321 1E-10 -> 1
  355. dqctm586 comparetotmag 0.000000987654321 1E-9 -> 1
  356. dqctm587 comparetotmag 0.000000987654321 1E-8 -> 1
  357. dqctm588 comparetotmag 0.000000987654321 1E-7 -> 1
  358. dqctm589 comparetotmag 0.000000987654321 1E-6 -> -1
  359. dqctm590 comparetotmag 0.000000987654321 1E-5 -> -1
  360. dqctm591 comparetotmag 0.000000987654321 1E-4 -> -1
  361. dqctm592 comparetotmag 0.000000987654321 1E-3 -> -1
  362. dqctm593 comparetotmag 0.000000987654321 1E-2 -> -1
  363. dqctm594 comparetotmag 0.000000987654321 1E-1 -> -1
  364. dqctm595 comparetotmag 0.000000987654321 1E-0 -> -1
  365. dqctm596 comparetotmag 0.000000987654321 1E+1 -> -1
  366. dqctm597 comparetotmag 0.000000987654321 1E+2 -> -1
  367. dqctm598 comparetotmag 0.000000987654321 1E+3 -> -1
  368. dqctm599 comparetotmag 0.000000987654321 1E+4 -> -1
  369. -- check some unit-y traps
  370. dqctm600 comparetotmag 12 12.2345 -> -1
  371. dqctm601 comparetotmag 12.0 12.2345 -> -1
  372. dqctm602 comparetotmag 12.00 12.2345 -> -1
  373. dqctm603 comparetotmag 12.000 12.2345 -> -1
  374. dqctm604 comparetotmag 12.0000 12.2345 -> -1
  375. dqctm605 comparetotmag 12.00000 12.2345 -> -1
  376. dqctm606 comparetotmag 12.000000 12.2345 -> -1
  377. dqctm607 comparetotmag 12.0000000 12.2345 -> -1
  378. dqctm608 comparetotmag 12.00000000 12.2345 -> -1
  379. dqctm609 comparetotmag 12.000000000 12.2345 -> -1
  380. dqctm610 comparetotmag 12.1234 12 -> 1
  381. dqctm611 comparetotmag 12.1234 12.0 -> 1
  382. dqctm612 comparetotmag 12.1234 12.00 -> 1
  383. dqctm613 comparetotmag 12.1234 12.000 -> 1
  384. dqctm614 comparetotmag 12.1234 12.0000 -> 1
  385. dqctm615 comparetotmag 12.1234 12.00000 -> 1
  386. dqctm616 comparetotmag 12.1234 12.000000 -> 1
  387. dqctm617 comparetotmag 12.1234 12.0000000 -> 1
  388. dqctm618 comparetotmag 12.1234 12.00000000 -> 1
  389. dqctm619 comparetotmag 12.1234 12.000000000 -> 1
  390. dqctm620 comparetotmag -12 -12.2345 -> -1
  391. dqctm621 comparetotmag -12.0 -12.2345 -> -1
  392. dqctm622 comparetotmag -12.00 -12.2345 -> -1
  393. dqctm623 comparetotmag -12.000 -12.2345 -> -1
  394. dqctm624 comparetotmag -12.0000 -12.2345 -> -1
  395. dqctm625 comparetotmag -12.00000 -12.2345 -> -1
  396. dqctm626 comparetotmag -12.000000 -12.2345 -> -1
  397. dqctm627 comparetotmag -12.0000000 -12.2345 -> -1
  398. dqctm628 comparetotmag -12.00000000 -12.2345 -> -1
  399. dqctm629 comparetotmag -12.000000000 -12.2345 -> -1
  400. dqctm630 comparetotmag -12.1234 -12 -> 1
  401. dqctm631 comparetotmag -12.1234 -12.0 -> 1
  402. dqctm632 comparetotmag -12.1234 -12.00 -> 1
  403. dqctm633 comparetotmag -12.1234 -12.000 -> 1
  404. dqctm634 comparetotmag -12.1234 -12.0000 -> 1
  405. dqctm635 comparetotmag -12.1234 -12.00000 -> 1
  406. dqctm636 comparetotmag -12.1234 -12.000000 -> 1
  407. dqctm637 comparetotmag -12.1234 -12.0000000 -> 1
  408. dqctm638 comparetotmag -12.1234 -12.00000000 -> 1
  409. dqctm639 comparetotmag -12.1234 -12.000000000 -> 1
  410. -- extended zeros
  411. dqctm640 comparetotmag 0 0 -> 0
  412. dqctm641 comparetotmag 0 -0 -> 0
  413. dqctm642 comparetotmag 0 -0.0 -> 1
  414. dqctm643 comparetotmag 0 0.0 -> 1
  415. dqctm644 comparetotmag -0 0 -> 0
  416. dqctm645 comparetotmag -0 -0 -> 0
  417. dqctm646 comparetotmag -0 -0.0 -> 1
  418. dqctm647 comparetotmag -0 0.0 -> 1
  419. dqctm648 comparetotmag 0.0 0 -> -1
  420. dqctm649 comparetotmag 0.0 -0 -> -1
  421. dqctm650 comparetotmag 0.0 -0.0 -> 0
  422. dqctm651 comparetotmag 0.0 0.0 -> 0
  423. dqctm652 comparetotmag -0.0 0 -> -1
  424. dqctm653 comparetotmag -0.0 -0 -> -1
  425. dqctm654 comparetotmag -0.0 -0.0 -> 0
  426. dqctm655 comparetotmag -0.0 0.0 -> 0
  427. dqctm656 comparetotmag -0E1 0.0 -> 1
  428. dqctm657 comparetotmag -0E2 0.0 -> 1
  429. dqctm658 comparetotmag 0E1 0.0 -> 1
  430. dqctm659 comparetotmag 0E2 0.0 -> 1
  431. dqctm660 comparetotmag -0E1 0 -> 1
  432. dqctm661 comparetotmag -0E2 0 -> 1
  433. dqctm662 comparetotmag 0E1 0 -> 1
  434. dqctm663 comparetotmag 0E2 0 -> 1
  435. dqctm664 comparetotmag -0E1 -0E1 -> 0
  436. dqctm665 comparetotmag -0E2 -0E1 -> 1
  437. dqctm666 comparetotmag 0E1 -0E1 -> 0
  438. dqctm667 comparetotmag 0E2 -0E1 -> 1
  439. dqctm668 comparetotmag -0E1 -0E2 -> -1
  440. dqctm669 comparetotmag -0E2 -0E2 -> 0
  441. dqctm670 comparetotmag 0E1 -0E2 -> -1
  442. dqctm671 comparetotmag 0E2 -0E2 -> 0
  443. dqctm672 comparetotmag -0E1 0E1 -> 0
  444. dqctm673 comparetotmag -0E2 0E1 -> 1
  445. dqctm674 comparetotmag 0E1 0E1 -> 0
  446. dqctm675 comparetotmag 0E2 0E1 -> 1
  447. dqctm676 comparetotmag -0E1 0E2 -> -1
  448. dqctm677 comparetotmag -0E2 0E2 -> 0
  449. dqctm678 comparetotmag 0E1 0E2 -> -1
  450. dqctm679 comparetotmag 0E2 0E2 -> 0
  451. -- trailing zeros; unit-y
  452. dqctm680 comparetotmag 12 12 -> 0
  453. dqctm681 comparetotmag 12 12.0 -> 1
  454. dqctm682 comparetotmag 12 12.00 -> 1
  455. dqctm683 comparetotmag 12 12.000 -> 1
  456. dqctm684 comparetotmag 12 12.0000 -> 1
  457. dqctm685 comparetotmag 12 12.00000 -> 1
  458. dqctm686 comparetotmag 12 12.000000 -> 1
  459. dqctm687 comparetotmag 12 12.0000000 -> 1
  460. dqctm688 comparetotmag 12 12.00000000 -> 1
  461. dqctm689 comparetotmag 12 12.000000000 -> 1
  462. dqctm690 comparetotmag 12 12 -> 0
  463. dqctm691 comparetotmag 12.0 12 -> -1
  464. dqctm692 comparetotmag 12.00 12 -> -1
  465. dqctm693 comparetotmag 12.000 12 -> -1
  466. dqctm694 comparetotmag 12.0000 12 -> -1
  467. dqctm695 comparetotmag 12.00000 12 -> -1
  468. dqctm696 comparetotmag 12.000000 12 -> -1
  469. dqctm697 comparetotmag 12.0000000 12 -> -1
  470. dqctm698 comparetotmag 12.00000000 12 -> -1
  471. dqctm699 comparetotmag 12.000000000 12 -> -1
  472. -- old long operand checks
  473. dqctm701 comparetotmag 12345678000 1 -> 1
  474. dqctm702 comparetotmag 1 12345678000 -> -1
  475. dqctm703 comparetotmag 1234567800 1 -> 1
  476. dqctm704 comparetotmag 1 1234567800 -> -1
  477. dqctm705 comparetotmag 1234567890 1 -> 1
  478. dqctm706 comparetotmag 1 1234567890 -> -1
  479. dqctm707 comparetotmag 1234567891 1 -> 1
  480. dqctm708 comparetotmag 1 1234567891 -> -1
  481. dqctm709 comparetotmag 12345678901 1 -> 1
  482. dqctm710 comparetotmag 1 12345678901 -> -1
  483. dqctm711 comparetotmag 1234567896 1 -> 1
  484. dqctm712 comparetotmag 1 1234567896 -> -1
  485. dqctm713 comparetotmag -1234567891 1 -> 1
  486. dqctm714 comparetotmag 1 -1234567891 -> -1
  487. dqctm715 comparetotmag -12345678901 1 -> 1
  488. dqctm716 comparetotmag 1 -12345678901 -> -1
  489. dqctm717 comparetotmag -1234567896 1 -> 1
  490. dqctm718 comparetotmag 1 -1234567896 -> -1
  491. -- old residue cases
  492. dqctm740 comparetotmag 1 0.9999999 -> 1
  493. dqctm741 comparetotmag 1 0.999999 -> 1
  494. dqctm742 comparetotmag 1 0.99999 -> 1
  495. dqctm743 comparetotmag 1 1.0000 -> 1
  496. dqctm744 comparetotmag 1 1.00001 -> -1
  497. dqctm745 comparetotmag 1 1.000001 -> -1
  498. dqctm746 comparetotmag 1 1.0000001 -> -1
  499. dqctm750 comparetotmag 0.9999999 1 -> -1
  500. dqctm751 comparetotmag 0.999999 1 -> -1
  501. dqctm752 comparetotmag 0.99999 1 -> -1
  502. dqctm753 comparetotmag 1.0000 1 -> -1
  503. dqctm754 comparetotmag 1.00001 1 -> 1
  504. dqctm755 comparetotmag 1.000001 1 -> 1
  505. dqctm756 comparetotmag 1.0000001 1 -> 1
  506. -- Specials
  507. dqctm780 comparetotmag Inf -Inf -> 0
  508. dqctm781 comparetotmag Inf -1000 -> 1
  509. dqctm782 comparetotmag Inf -1 -> 1
  510. dqctm783 comparetotmag Inf -0 -> 1
  511. dqctm784 comparetotmag Inf 0 -> 1
  512. dqctm785 comparetotmag Inf 1 -> 1
  513. dqctm786 comparetotmag Inf 1000 -> 1
  514. dqctm787 comparetotmag Inf Inf -> 0
  515. dqctm788 comparetotmag -1000 Inf -> -1
  516. dqctm789 comparetotmag -Inf Inf -> 0
  517. dqctm790 comparetotmag -1 Inf -> -1
  518. dqctm791 comparetotmag -0 Inf -> -1
  519. dqctm792 comparetotmag 0 Inf -> -1
  520. dqctm793 comparetotmag 1 Inf -> -1
  521. dqctm794 comparetotmag 1000 Inf -> -1
  522. dqctm795 comparetotmag Inf Inf -> 0
  523. dqctm800 comparetotmag -Inf -Inf -> 0
  524. dqctm801 comparetotmag -Inf -1000 -> 1
  525. dqctm802 comparetotmag -Inf -1 -> 1
  526. dqctm803 comparetotmag -Inf -0 -> 1
  527. dqctm804 comparetotmag -Inf 0 -> 1
  528. dqctm805 comparetotmag -Inf 1 -> 1
  529. dqctm806 comparetotmag -Inf 1000 -> 1
  530. dqctm807 comparetotmag -Inf Inf -> 0
  531. dqctm808 comparetotmag -Inf -Inf -> 0
  532. dqctm809 comparetotmag -1000 -Inf -> -1
  533. dqctm810 comparetotmag -1 -Inf -> -1
  534. dqctm811 comparetotmag -0 -Inf -> -1
  535. dqctm812 comparetotmag 0 -Inf -> -1
  536. dqctm813 comparetotmag 1 -Inf -> -1
  537. dqctm814 comparetotmag 1000 -Inf -> -1
  538. dqctm815 comparetotmag Inf -Inf -> 0
  539. dqctm821 comparetotmag NaN -Inf -> 1
  540. dqctm822 comparetotmag NaN -1000 -> 1
  541. dqctm823 comparetotmag NaN -1 -> 1
  542. dqctm824 comparetotmag NaN -0 -> 1
  543. dqctm825 comparetotmag NaN 0 -> 1
  544. dqctm826 comparetotmag NaN 1 -> 1
  545. dqctm827 comparetotmag NaN 1000 -> 1
  546. dqctm828 comparetotmag NaN Inf -> 1
  547. dqctm829 comparetotmag NaN NaN -> 0
  548. dqctm830 comparetotmag -Inf NaN -> -1
  549. dqctm831 comparetotmag -1000 NaN -> -1
  550. dqctm832 comparetotmag -1 NaN -> -1
  551. dqctm833 comparetotmag -0 NaN -> -1
  552. dqctm834 comparetotmag 0 NaN -> -1
  553. dqctm835 comparetotmag 1 NaN -> -1
  554. dqctm836 comparetotmag 1000 NaN -> -1
  555. dqctm837 comparetotmag Inf NaN -> -1
  556. dqctm838 comparetotmag -NaN -NaN -> 0
  557. dqctm839 comparetotmag +NaN -NaN -> 0
  558. dqctm840 comparetotmag -NaN +NaN -> 0
  559. dqctm841 comparetotmag sNaN -sNaN -> 0
  560. dqctm842 comparetotmag sNaN -NaN -> -1
  561. dqctm843 comparetotmag sNaN -Inf -> 1
  562. dqctm844 comparetotmag sNaN -1000 -> 1
  563. dqctm845 comparetotmag sNaN -1 -> 1
  564. dqctm846 comparetotmag sNaN -0 -> 1
  565. dqctm847 comparetotmag sNaN 0 -> 1
  566. dqctm848 comparetotmag sNaN 1 -> 1
  567. dqctm849 comparetotmag sNaN 1000 -> 1
  568. dqctm850 comparetotmag sNaN NaN -> -1
  569. dqctm851 comparetotmag sNaN sNaN -> 0
  570. dqctm852 comparetotmag -sNaN sNaN -> 0
  571. dqctm853 comparetotmag -NaN sNaN -> 1
  572. dqctm854 comparetotmag -Inf sNaN -> -1
  573. dqctm855 comparetotmag -1000 sNaN -> -1
  574. dqctm856 comparetotmag -1 sNaN -> -1
  575. dqctm857 comparetotmag -0 sNaN -> -1
  576. dqctm858 comparetotmag 0 sNaN -> -1
  577. dqctm859 comparetotmag 1 sNaN -> -1
  578. dqctm860 comparetotmag 1000 sNaN -> -1
  579. dqctm861 comparetotmag Inf sNaN -> -1
  580. dqctm862 comparetotmag NaN sNaN -> 1
  581. dqctm863 comparetotmag sNaN sNaN -> 0
  582. dqctm871 comparetotmag -sNaN -sNaN -> 0
  583. dqctm872 comparetotmag -sNaN -NaN -> -1
  584. dqctm873 comparetotmag -sNaN -Inf -> 1
  585. dqctm874 comparetotmag -sNaN -1000 -> 1
  586. dqctm875 comparetotmag -sNaN -1 -> 1
  587. dqctm876 comparetotmag -sNaN -0 -> 1
  588. dqctm877 comparetotmag -sNaN 0 -> 1
  589. dqctm878 comparetotmag -sNaN 1 -> 1
  590. dqctm879 comparetotmag -sNaN 1000 -> 1
  591. dqctm880 comparetotmag -sNaN NaN -> -1
  592. dqctm881 comparetotmag -sNaN sNaN -> 0
  593. dqctm882 comparetotmag -sNaN -sNaN -> 0
  594. dqctm883 comparetotmag -NaN -sNaN -> 1
  595. dqctm884 comparetotmag -Inf -sNaN -> -1
  596. dqctm885 comparetotmag -1000 -sNaN -> -1
  597. dqctm886 comparetotmag -1 -sNaN -> -1
  598. dqctm887 comparetotmag -0 -sNaN -> -1
  599. dqctm888 comparetotmag 0 -sNaN -> -1
  600. dqctm889 comparetotmag 1 -sNaN -> -1
  601. dqctm890 comparetotmag 1000 -sNaN -> -1
  602. dqctm891 comparetotmag Inf -sNaN -> -1
  603. dqctm892 comparetotmag NaN -sNaN -> 1
  604. dqctm893 comparetotmag sNaN -sNaN -> 0
  605. -- NaNs with payload
  606. dqctm960 comparetotmag NaN9 -Inf -> 1
  607. dqctm961 comparetotmag NaN8 999 -> 1
  608. dqctm962 comparetotmag NaN77 Inf -> 1
  609. dqctm963 comparetotmag -NaN67 NaN5 -> 1
  610. dqctm964 comparetotmag -Inf -NaN4 -> -1
  611. dqctm965 comparetotmag -999 -NaN33 -> -1
  612. dqctm966 comparetotmag Inf NaN2 -> -1
  613. dqctm970 comparetotmag -NaN41 -NaN42 -> -1
  614. dqctm971 comparetotmag +NaN41 -NaN42 -> -1
  615. dqctm972 comparetotmag -NaN41 +NaN42 -> -1
  616. dqctm973 comparetotmag +NaN41 +NaN42 -> -1
  617. dqctm974 comparetotmag -NaN42 -NaN01 -> 1
  618. dqctm975 comparetotmag +NaN42 -NaN01 -> 1
  619. dqctm976 comparetotmag -NaN42 +NaN01 -> 1
  620. dqctm977 comparetotmag +NaN42 +NaN01 -> 1
  621. dqctm980 comparetotmag -sNaN771 -sNaN772 -> -1
  622. dqctm981 comparetotmag +sNaN771 -sNaN772 -> -1
  623. dqctm982 comparetotmag -sNaN771 +sNaN772 -> -1
  624. dqctm983 comparetotmag +sNaN771 +sNaN772 -> -1
  625. dqctm984 comparetotmag -sNaN772 -sNaN771 -> 1
  626. dqctm985 comparetotmag +sNaN772 -sNaN771 -> 1
  627. dqctm986 comparetotmag -sNaN772 +sNaN771 -> 1
  628. dqctm987 comparetotmag +sNaN772 +sNaN771 -> 1
  629. dqctm991 comparetotmag -sNaN99 -Inf -> 1
  630. dqctm992 comparetotmag sNaN98 -11 -> 1
  631. dqctm993 comparetotmag sNaN97 NaN -> -1
  632. dqctm994 comparetotmag sNaN16 sNaN94 -> -1
  633. dqctm995 comparetotmag NaN85 sNaN83 -> 1
  634. dqctm996 comparetotmag -Inf sNaN92 -> -1
  635. dqctm997 comparetotmag 088 sNaN81 -> -1
  636. dqctm998 comparetotmag Inf sNaN90 -> -1
  637. dqctm999 comparetotmag NaN -sNaN89 -> 1
  638. -- spread zeros
  639. dqctm1110 comparetotmag 0E-6143 0 -> -1
  640. dqctm1111 comparetotmag 0E-6143 -0 -> -1
  641. dqctm1112 comparetotmag -0E-6143 0 -> -1
  642. dqctm1113 comparetotmag -0E-6143 -0 -> -1
  643. dqctm1114 comparetotmag 0E-6143 0E+6144 -> -1
  644. dqctm1115 comparetotmag 0E-6143 -0E+6144 -> -1
  645. dqctm1116 comparetotmag -0E-6143 0E+6144 -> -1
  646. dqctm1117 comparetotmag -0E-6143 -0E+6144 -> -1
  647. dqctm1118 comparetotmag 0 0E+6144 -> -1
  648. dqctm1119 comparetotmag 0 -0E+6144 -> -1
  649. dqctm1120 comparetotmag -0 0E+6144 -> -1
  650. dqctm1121 comparetotmag -0 -0E+6144 -> -1
  651. dqctm1130 comparetotmag 0E+6144 0 -> 1
  652. dqctm1131 comparetotmag 0E+6144 -0 -> 1
  653. dqctm1132 comparetotmag -0E+6144 0 -> 1
  654. dqctm1133 comparetotmag -0E+6144 -0 -> 1
  655. dqctm1134 comparetotmag 0E+6144 0E-6143 -> 1
  656. dqctm1135 comparetotmag 0E+6144 -0E-6143 -> 1
  657. dqctm1136 comparetotmag -0E+6144 0E-6143 -> 1
  658. dqctm1137 comparetotmag -0E+6144 -0E-6143 -> 1
  659. dqctm1138 comparetotmag 0 0E-6143 -> 1
  660. dqctm1139 comparetotmag 0 -0E-6143 -> 1
  661. dqctm1140 comparetotmag -0 0E-6143 -> 1
  662. dqctm1141 comparetotmag -0 -0E-6143 -> 1
  663. -- Null tests
  664. dqctm9990 comparetotmag 10 # -> NaN Invalid_operation
  665. dqctm9991 comparetotmag # 10 -> NaN Invalid_operation