dqCompareSig.decTest 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. ------------------------------------------------------------------------
  2. -- dqCompareSig.decTest -- decQuad comparison; all NaNs signal --
  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. -- All operands and results are decQuads.
  25. extended: 1
  26. clamp: 1
  27. precision: 34
  28. maxExponent: 6144
  29. minExponent: -6143
  30. rounding: half_even
  31. -- sanity checks
  32. dqcms001 comparesig -2 -2 -> 0
  33. dqcms002 comparesig -2 -1 -> -1
  34. dqcms003 comparesig -2 0 -> -1
  35. dqcms004 comparesig -2 1 -> -1
  36. dqcms005 comparesig -2 2 -> -1
  37. dqcms006 comparesig -1 -2 -> 1
  38. dqcms007 comparesig -1 -1 -> 0
  39. dqcms008 comparesig -1 0 -> -1
  40. dqcms009 comparesig -1 1 -> -1
  41. dqcms010 comparesig -1 2 -> -1
  42. dqcms011 comparesig 0 -2 -> 1
  43. dqcms012 comparesig 0 -1 -> 1
  44. dqcms013 comparesig 0 0 -> 0
  45. dqcms014 comparesig 0 1 -> -1
  46. dqcms015 comparesig 0 2 -> -1
  47. dqcms016 comparesig 1 -2 -> 1
  48. dqcms017 comparesig 1 -1 -> 1
  49. dqcms018 comparesig 1 0 -> 1
  50. dqcms019 comparesig 1 1 -> 0
  51. dqcms020 comparesig 1 2 -> -1
  52. dqcms021 comparesig 2 -2 -> 1
  53. dqcms022 comparesig 2 -1 -> 1
  54. dqcms023 comparesig 2 0 -> 1
  55. dqcms025 comparesig 2 1 -> 1
  56. dqcms026 comparesig 2 2 -> 0
  57. dqcms031 comparesig -20 -20 -> 0
  58. dqcms032 comparesig -20 -10 -> -1
  59. dqcms033 comparesig -20 00 -> -1
  60. dqcms034 comparesig -20 10 -> -1
  61. dqcms035 comparesig -20 20 -> -1
  62. dqcms036 comparesig -10 -20 -> 1
  63. dqcms037 comparesig -10 -10 -> 0
  64. dqcms038 comparesig -10 00 -> -1
  65. dqcms039 comparesig -10 10 -> -1
  66. dqcms040 comparesig -10 20 -> -1
  67. dqcms041 comparesig 00 -20 -> 1
  68. dqcms042 comparesig 00 -10 -> 1
  69. dqcms043 comparesig 00 00 -> 0
  70. dqcms044 comparesig 00 10 -> -1
  71. dqcms045 comparesig 00 20 -> -1
  72. dqcms046 comparesig 10 -20 -> 1
  73. dqcms047 comparesig 10 -10 -> 1
  74. dqcms048 comparesig 10 00 -> 1
  75. dqcms049 comparesig 10 10 -> 0
  76. dqcms050 comparesig 10 20 -> -1
  77. dqcms051 comparesig 20 -20 -> 1
  78. dqcms052 comparesig 20 -10 -> 1
  79. dqcms053 comparesig 20 00 -> 1
  80. dqcms055 comparesig 20 10 -> 1
  81. dqcms056 comparesig 20 20 -> 0
  82. dqcms061 comparesig -2.0 -2.0 -> 0
  83. dqcms062 comparesig -2.0 -1.0 -> -1
  84. dqcms063 comparesig -2.0 0.0 -> -1
  85. dqcms064 comparesig -2.0 1.0 -> -1
  86. dqcms065 comparesig -2.0 2.0 -> -1
  87. dqcms066 comparesig -1.0 -2.0 -> 1
  88. dqcms067 comparesig -1.0 -1.0 -> 0
  89. dqcms068 comparesig -1.0 0.0 -> -1
  90. dqcms069 comparesig -1.0 1.0 -> -1
  91. dqcms070 comparesig -1.0 2.0 -> -1
  92. dqcms071 comparesig 0.0 -2.0 -> 1
  93. dqcms072 comparesig 0.0 -1.0 -> 1
  94. dqcms073 comparesig 0.0 0.0 -> 0
  95. dqcms074 comparesig 0.0 1.0 -> -1
  96. dqcms075 comparesig 0.0 2.0 -> -1
  97. dqcms076 comparesig 1.0 -2.0 -> 1
  98. dqcms077 comparesig 1.0 -1.0 -> 1
  99. dqcms078 comparesig 1.0 0.0 -> 1
  100. dqcms079 comparesig 1.0 1.0 -> 0
  101. dqcms080 comparesig 1.0 2.0 -> -1
  102. dqcms081 comparesig 2.0 -2.0 -> 1
  103. dqcms082 comparesig 2.0 -1.0 -> 1
  104. dqcms083 comparesig 2.0 0.0 -> 1
  105. dqcms085 comparesig 2.0 1.0 -> 1
  106. dqcms086 comparesig 2.0 2.0 -> 0
  107. -- now some cases which might overflow if subtract were used
  108. dqcms090 comparesig 9.999999999999999999999999999999999E+6144 9.999999999999999999999999999999999E+6144 -> 0
  109. dqcms091 comparesig -9.999999999999999999999999999999999E+6144 9.999999999999999999999999999999999E+6144 -> -1
  110. dqcms092 comparesig 9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144 -> 1
  111. dqcms093 comparesig -9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144 -> 0
  112. -- some differing length/exponent cases
  113. dqcms100 comparesig 7.0 7.0 -> 0
  114. dqcms101 comparesig 7.0 7 -> 0
  115. dqcms102 comparesig 7 7.0 -> 0
  116. dqcms103 comparesig 7E+0 7.0 -> 0
  117. dqcms104 comparesig 70E-1 7.0 -> 0
  118. dqcms105 comparesig 0.7E+1 7 -> 0
  119. dqcms106 comparesig 70E-1 7 -> 0
  120. dqcms107 comparesig 7.0 7E+0 -> 0
  121. dqcms108 comparesig 7.0 70E-1 -> 0
  122. dqcms109 comparesig 7 0.7E+1 -> 0
  123. dqcms110 comparesig 7 70E-1 -> 0
  124. dqcms120 comparesig 8.0 7.0 -> 1
  125. dqcms121 comparesig 8.0 7 -> 1
  126. dqcms122 comparesig 8 7.0 -> 1
  127. dqcms123 comparesig 8E+0 7.0 -> 1
  128. dqcms124 comparesig 80E-1 7.0 -> 1
  129. dqcms125 comparesig 0.8E+1 7 -> 1
  130. dqcms126 comparesig 80E-1 7 -> 1
  131. dqcms127 comparesig 8.0 7E+0 -> 1
  132. dqcms128 comparesig 8.0 70E-1 -> 1
  133. dqcms129 comparesig 8 0.7E+1 -> 1
  134. dqcms130 comparesig 8 70E-1 -> 1
  135. dqcms140 comparesig 8.0 9.0 -> -1
  136. dqcms141 comparesig 8.0 9 -> -1
  137. dqcms142 comparesig 8 9.0 -> -1
  138. dqcms143 comparesig 8E+0 9.0 -> -1
  139. dqcms144 comparesig 80E-1 9.0 -> -1
  140. dqcms145 comparesig 0.8E+1 9 -> -1
  141. dqcms146 comparesig 80E-1 9 -> -1
  142. dqcms147 comparesig 8.0 9E+0 -> -1
  143. dqcms148 comparesig 8.0 90E-1 -> -1
  144. dqcms149 comparesig 8 0.9E+1 -> -1
  145. dqcms150 comparesig 8 90E-1 -> -1
  146. -- and again, with sign changes -+ ..
  147. dqcms200 comparesig -7.0 7.0 -> -1
  148. dqcms201 comparesig -7.0 7 -> -1
  149. dqcms202 comparesig -7 7.0 -> -1
  150. dqcms203 comparesig -7E+0 7.0 -> -1
  151. dqcms204 comparesig -70E-1 7.0 -> -1
  152. dqcms205 comparesig -0.7E+1 7 -> -1
  153. dqcms206 comparesig -70E-1 7 -> -1
  154. dqcms207 comparesig -7.0 7E+0 -> -1
  155. dqcms208 comparesig -7.0 70E-1 -> -1
  156. dqcms209 comparesig -7 0.7E+1 -> -1
  157. dqcms210 comparesig -7 70E-1 -> -1
  158. dqcms220 comparesig -8.0 7.0 -> -1
  159. dqcms221 comparesig -8.0 7 -> -1
  160. dqcms222 comparesig -8 7.0 -> -1
  161. dqcms223 comparesig -8E+0 7.0 -> -1
  162. dqcms224 comparesig -80E-1 7.0 -> -1
  163. dqcms225 comparesig -0.8E+1 7 -> -1
  164. dqcms226 comparesig -80E-1 7 -> -1
  165. dqcms227 comparesig -8.0 7E+0 -> -1
  166. dqcms228 comparesig -8.0 70E-1 -> -1
  167. dqcms229 comparesig -8 0.7E+1 -> -1
  168. dqcms230 comparesig -8 70E-1 -> -1
  169. dqcms240 comparesig -8.0 9.0 -> -1
  170. dqcms241 comparesig -8.0 9 -> -1
  171. dqcms242 comparesig -8 9.0 -> -1
  172. dqcms243 comparesig -8E+0 9.0 -> -1
  173. dqcms244 comparesig -80E-1 9.0 -> -1
  174. dqcms245 comparesig -0.8E+1 9 -> -1
  175. dqcms246 comparesig -80E-1 9 -> -1
  176. dqcms247 comparesig -8.0 9E+0 -> -1
  177. dqcms248 comparesig -8.0 90E-1 -> -1
  178. dqcms249 comparesig -8 0.9E+1 -> -1
  179. dqcms250 comparesig -8 90E-1 -> -1
  180. -- and again, with sign changes +- ..
  181. dqcms300 comparesig 7.0 -7.0 -> 1
  182. dqcms301 comparesig 7.0 -7 -> 1
  183. dqcms302 comparesig 7 -7.0 -> 1
  184. dqcms303 comparesig 7E+0 -7.0 -> 1
  185. dqcms304 comparesig 70E-1 -7.0 -> 1
  186. dqcms305 comparesig .7E+1 -7 -> 1
  187. dqcms306 comparesig 70E-1 -7 -> 1
  188. dqcms307 comparesig 7.0 -7E+0 -> 1
  189. dqcms308 comparesig 7.0 -70E-1 -> 1
  190. dqcms309 comparesig 7 -.7E+1 -> 1
  191. dqcms310 comparesig 7 -70E-1 -> 1
  192. dqcms320 comparesig 8.0 -7.0 -> 1
  193. dqcms321 comparesig 8.0 -7 -> 1
  194. dqcms322 comparesig 8 -7.0 -> 1
  195. dqcms323 comparesig 8E+0 -7.0 -> 1
  196. dqcms324 comparesig 80E-1 -7.0 -> 1
  197. dqcms325 comparesig .8E+1 -7 -> 1
  198. dqcms326 comparesig 80E-1 -7 -> 1
  199. dqcms327 comparesig 8.0 -7E+0 -> 1
  200. dqcms328 comparesig 8.0 -70E-1 -> 1
  201. dqcms329 comparesig 8 -.7E+1 -> 1
  202. dqcms330 comparesig 8 -70E-1 -> 1
  203. dqcms340 comparesig 8.0 -9.0 -> 1
  204. dqcms341 comparesig 8.0 -9 -> 1
  205. dqcms342 comparesig 8 -9.0 -> 1
  206. dqcms343 comparesig 8E+0 -9.0 -> 1
  207. dqcms344 comparesig 80E-1 -9.0 -> 1
  208. dqcms345 comparesig .8E+1 -9 -> 1
  209. dqcms346 comparesig 80E-1 -9 -> 1
  210. dqcms347 comparesig 8.0 -9E+0 -> 1
  211. dqcms348 comparesig 8.0 -90E-1 -> 1
  212. dqcms349 comparesig 8 -.9E+1 -> 1
  213. dqcms350 comparesig 8 -90E-1 -> 1
  214. -- and again, with sign changes -- ..
  215. dqcms400 comparesig -7.0 -7.0 -> 0
  216. dqcms401 comparesig -7.0 -7 -> 0
  217. dqcms402 comparesig -7 -7.0 -> 0
  218. dqcms403 comparesig -7E+0 -7.0 -> 0
  219. dqcms404 comparesig -70E-1 -7.0 -> 0
  220. dqcms405 comparesig -.7E+1 -7 -> 0
  221. dqcms406 comparesig -70E-1 -7 -> 0
  222. dqcms407 comparesig -7.0 -7E+0 -> 0
  223. dqcms408 comparesig -7.0 -70E-1 -> 0
  224. dqcms409 comparesig -7 -.7E+1 -> 0
  225. dqcms410 comparesig -7 -70E-1 -> 0
  226. dqcms420 comparesig -8.0 -7.0 -> -1
  227. dqcms421 comparesig -8.0 -7 -> -1
  228. dqcms422 comparesig -8 -7.0 -> -1
  229. dqcms423 comparesig -8E+0 -7.0 -> -1
  230. dqcms424 comparesig -80E-1 -7.0 -> -1
  231. dqcms425 comparesig -.8E+1 -7 -> -1
  232. dqcms426 comparesig -80E-1 -7 -> -1
  233. dqcms427 comparesig -8.0 -7E+0 -> -1
  234. dqcms428 comparesig -8.0 -70E-1 -> -1
  235. dqcms429 comparesig -8 -.7E+1 -> -1
  236. dqcms430 comparesig -8 -70E-1 -> -1
  237. dqcms440 comparesig -8.0 -9.0 -> 1
  238. dqcms441 comparesig -8.0 -9 -> 1
  239. dqcms442 comparesig -8 -9.0 -> 1
  240. dqcms443 comparesig -8E+0 -9.0 -> 1
  241. dqcms444 comparesig -80E-1 -9.0 -> 1
  242. dqcms445 comparesig -.8E+1 -9 -> 1
  243. dqcms446 comparesig -80E-1 -9 -> 1
  244. dqcms447 comparesig -8.0 -9E+0 -> 1
  245. dqcms448 comparesig -8.0 -90E-1 -> 1
  246. dqcms449 comparesig -8 -.9E+1 -> 1
  247. dqcms450 comparesig -8 -90E-1 -> 1
  248. -- testcases that subtract to lots of zeros at boundaries [pgr]
  249. dqcms473 comparesig 123.9999999999999999994560000000000E-89 123.999999999999999999456E-89 -> 0
  250. dqcms474 comparesig 123.999999999999999999456000000000E+89 123.999999999999999999456E+89 -> 0
  251. dqcms475 comparesig 123.99999999999999999945600000000E-89 123.999999999999999999456E-89 -> 0
  252. dqcms476 comparesig 123.9999999999999999994560000000E+89 123.999999999999999999456E+89 -> 0
  253. dqcms477 comparesig 123.999999999999999999456000000E-89 123.999999999999999999456E-89 -> 0
  254. dqcms478 comparesig 123.99999999999999999945600000E+89 123.999999999999999999456E+89 -> 0
  255. dqcms479 comparesig 123.9999999999999999994560000E-89 123.999999999999999999456E-89 -> 0
  256. dqcms480 comparesig 123.999999999999999999456000E+89 123.999999999999999999456E+89 -> 0
  257. dqcms481 comparesig 123.99999999999999999945600E-89 123.999999999999999999456E-89 -> 0
  258. dqcms482 comparesig 123.9999999999999999994560E+89 123.999999999999999999456E+89 -> 0
  259. dqcms483 comparesig 123.999999999999999999456E-89 123.999999999999999999456E-89 -> 0
  260. dqcms487 comparesig 123.999999999999999999456E+89 123.9999999999999999994560000000000E+89 -> 0
  261. dqcms488 comparesig 123.999999999999999999456E-89 123.999999999999999999456000000000E-89 -> 0
  262. dqcms489 comparesig 123.999999999999999999456E+89 123.99999999999999999945600000000E+89 -> 0
  263. dqcms490 comparesig 123.999999999999999999456E-89 123.9999999999999999994560000000E-89 -> 0
  264. dqcms491 comparesig 123.999999999999999999456E+89 123.999999999999999999456000000E+89 -> 0
  265. dqcms492 comparesig 123.999999999999999999456E-89 123.99999999999999999945600000E-89 -> 0
  266. dqcms493 comparesig 123.999999999999999999456E+89 123.9999999999999999994560000E+89 -> 0
  267. dqcms494 comparesig 123.999999999999999999456E-89 123.999999999999999999456000E-89 -> 0
  268. dqcms495 comparesig 123.999999999999999999456E+89 123.99999999999999999945600E+89 -> 0
  269. dqcms496 comparesig 123.999999999999999999456E-89 123.9999999999999999994560E-89 -> 0
  270. dqcms497 comparesig 123.999999999999999999456E+89 123.999999999999999999456E+89 -> 0
  271. -- wide-ranging, around precision; signs equal
  272. dqcms500 comparesig 1 1E-15 -> 1
  273. dqcms501 comparesig 1 1E-14 -> 1
  274. dqcms502 comparesig 1 1E-13 -> 1
  275. dqcms503 comparesig 1 1E-12 -> 1
  276. dqcms504 comparesig 1 1E-11 -> 1
  277. dqcms505 comparesig 1 1E-10 -> 1
  278. dqcms506 comparesig 1 1E-9 -> 1
  279. dqcms507 comparesig 1 1E-8 -> 1
  280. dqcms508 comparesig 1 1E-7 -> 1
  281. dqcms509 comparesig 1 1E-6 -> 1
  282. dqcms510 comparesig 1 1E-5 -> 1
  283. dqcms511 comparesig 1 1E-4 -> 1
  284. dqcms512 comparesig 1 1E-3 -> 1
  285. dqcms513 comparesig 1 1E-2 -> 1
  286. dqcms514 comparesig 1 1E-1 -> 1
  287. dqcms515 comparesig 1 1E-0 -> 0
  288. dqcms516 comparesig 1 1E+1 -> -1
  289. dqcms517 comparesig 1 1E+2 -> -1
  290. dqcms518 comparesig 1 1E+3 -> -1
  291. dqcms519 comparesig 1 1E+4 -> -1
  292. dqcms521 comparesig 1 1E+5 -> -1
  293. dqcms522 comparesig 1 1E+6 -> -1
  294. dqcms523 comparesig 1 1E+7 -> -1
  295. dqcms524 comparesig 1 1E+8 -> -1
  296. dqcms525 comparesig 1 1E+9 -> -1
  297. dqcms526 comparesig 1 1E+10 -> -1
  298. dqcms527 comparesig 1 1E+11 -> -1
  299. dqcms528 comparesig 1 1E+12 -> -1
  300. dqcms529 comparesig 1 1E+13 -> -1
  301. dqcms530 comparesig 1 1E+14 -> -1
  302. dqcms531 comparesig 1 1E+15 -> -1
  303. -- LR swap
  304. dqcms540 comparesig 1E-15 1 -> -1
  305. dqcms541 comparesig 1E-14 1 -> -1
  306. dqcms542 comparesig 1E-13 1 -> -1
  307. dqcms543 comparesig 1E-12 1 -> -1
  308. dqcms544 comparesig 1E-11 1 -> -1
  309. dqcms545 comparesig 1E-10 1 -> -1
  310. dqcms546 comparesig 1E-9 1 -> -1
  311. dqcms547 comparesig 1E-8 1 -> -1
  312. dqcms548 comparesig 1E-7 1 -> -1
  313. dqcms549 comparesig 1E-6 1 -> -1
  314. dqcms550 comparesig 1E-5 1 -> -1
  315. dqcms551 comparesig 1E-4 1 -> -1
  316. dqcms552 comparesig 1E-3 1 -> -1
  317. dqcms553 comparesig 1E-2 1 -> -1
  318. dqcms554 comparesig 1E-1 1 -> -1
  319. dqcms555 comparesig 1E-0 1 -> 0
  320. dqcms556 comparesig 1E+1 1 -> 1
  321. dqcms557 comparesig 1E+2 1 -> 1
  322. dqcms558 comparesig 1E+3 1 -> 1
  323. dqcms559 comparesig 1E+4 1 -> 1
  324. dqcms561 comparesig 1E+5 1 -> 1
  325. dqcms562 comparesig 1E+6 1 -> 1
  326. dqcms563 comparesig 1E+7 1 -> 1
  327. dqcms564 comparesig 1E+8 1 -> 1
  328. dqcms565 comparesig 1E+9 1 -> 1
  329. dqcms566 comparesig 1E+10 1 -> 1
  330. dqcms567 comparesig 1E+11 1 -> 1
  331. dqcms568 comparesig 1E+12 1 -> 1
  332. dqcms569 comparesig 1E+13 1 -> 1
  333. dqcms570 comparesig 1E+14 1 -> 1
  334. dqcms571 comparesig 1E+15 1 -> 1
  335. -- similar with a useful coefficient, one side only
  336. dqcms580 comparesig 0.000000987654321 1E-15 -> 1
  337. dqcms581 comparesig 0.000000987654321 1E-14 -> 1
  338. dqcms582 comparesig 0.000000987654321 1E-13 -> 1
  339. dqcms583 comparesig 0.000000987654321 1E-12 -> 1
  340. dqcms584 comparesig 0.000000987654321 1E-11 -> 1
  341. dqcms585 comparesig 0.000000987654321 1E-10 -> 1
  342. dqcms586 comparesig 0.000000987654321 1E-9 -> 1
  343. dqcms587 comparesig 0.000000987654321 1E-8 -> 1
  344. dqcms588 comparesig 0.000000987654321 1E-7 -> 1
  345. dqcms589 comparesig 0.000000987654321 1E-6 -> -1
  346. dqcms590 comparesig 0.000000987654321 1E-5 -> -1
  347. dqcms591 comparesig 0.000000987654321 1E-4 -> -1
  348. dqcms592 comparesig 0.000000987654321 1E-3 -> -1
  349. dqcms593 comparesig 0.000000987654321 1E-2 -> -1
  350. dqcms594 comparesig 0.000000987654321 1E-1 -> -1
  351. dqcms595 comparesig 0.000000987654321 1E-0 -> -1
  352. dqcms596 comparesig 0.000000987654321 1E+1 -> -1
  353. dqcms597 comparesig 0.000000987654321 1E+2 -> -1
  354. dqcms598 comparesig 0.000000987654321 1E+3 -> -1
  355. dqcms599 comparesig 0.000000987654321 1E+4 -> -1
  356. -- check some unit-y traps
  357. dqcms600 comparesig 12 12.2345 -> -1
  358. dqcms601 comparesig 12.0 12.2345 -> -1
  359. dqcms602 comparesig 12.00 12.2345 -> -1
  360. dqcms603 comparesig 12.000 12.2345 -> -1
  361. dqcms604 comparesig 12.0000 12.2345 -> -1
  362. dqcms605 comparesig 12.00000 12.2345 -> -1
  363. dqcms606 comparesig 12.000000 12.2345 -> -1
  364. dqcms607 comparesig 12.0000000 12.2345 -> -1
  365. dqcms608 comparesig 12.00000000 12.2345 -> -1
  366. dqcms609 comparesig 12.000000000 12.2345 -> -1
  367. dqcms610 comparesig 12.1234 12 -> 1
  368. dqcms611 comparesig 12.1234 12.0 -> 1
  369. dqcms612 comparesig 12.1234 12.00 -> 1
  370. dqcms613 comparesig 12.1234 12.000 -> 1
  371. dqcms614 comparesig 12.1234 12.0000 -> 1
  372. dqcms615 comparesig 12.1234 12.00000 -> 1
  373. dqcms616 comparesig 12.1234 12.000000 -> 1
  374. dqcms617 comparesig 12.1234 12.0000000 -> 1
  375. dqcms618 comparesig 12.1234 12.00000000 -> 1
  376. dqcms619 comparesig 12.1234 12.000000000 -> 1
  377. dqcms620 comparesig -12 -12.2345 -> 1
  378. dqcms621 comparesig -12.0 -12.2345 -> 1
  379. dqcms622 comparesig -12.00 -12.2345 -> 1
  380. dqcms623 comparesig -12.000 -12.2345 -> 1
  381. dqcms624 comparesig -12.0000 -12.2345 -> 1
  382. dqcms625 comparesig -12.00000 -12.2345 -> 1
  383. dqcms626 comparesig -12.000000 -12.2345 -> 1
  384. dqcms627 comparesig -12.0000000 -12.2345 -> 1
  385. dqcms628 comparesig -12.00000000 -12.2345 -> 1
  386. dqcms629 comparesig -12.000000000 -12.2345 -> 1
  387. dqcms630 comparesig -12.1234 -12 -> -1
  388. dqcms631 comparesig -12.1234 -12.0 -> -1
  389. dqcms632 comparesig -12.1234 -12.00 -> -1
  390. dqcms633 comparesig -12.1234 -12.000 -> -1
  391. dqcms634 comparesig -12.1234 -12.0000 -> -1
  392. dqcms635 comparesig -12.1234 -12.00000 -> -1
  393. dqcms636 comparesig -12.1234 -12.000000 -> -1
  394. dqcms637 comparesig -12.1234 -12.0000000 -> -1
  395. dqcms638 comparesig -12.1234 -12.00000000 -> -1
  396. dqcms639 comparesig -12.1234 -12.000000000 -> -1
  397. -- extended zeros
  398. dqcms640 comparesig 0 0 -> 0
  399. dqcms641 comparesig 0 -0 -> 0
  400. dqcms642 comparesig 0 -0.0 -> 0
  401. dqcms643 comparesig 0 0.0 -> 0
  402. dqcms644 comparesig -0 0 -> 0
  403. dqcms645 comparesig -0 -0 -> 0
  404. dqcms646 comparesig -0 -0.0 -> 0
  405. dqcms647 comparesig -0 0.0 -> 0
  406. dqcms648 comparesig 0.0 0 -> 0
  407. dqcms649 comparesig 0.0 -0 -> 0
  408. dqcms650 comparesig 0.0 -0.0 -> 0
  409. dqcms651 comparesig 0.0 0.0 -> 0
  410. dqcms652 comparesig -0.0 0 -> 0
  411. dqcms653 comparesig -0.0 -0 -> 0
  412. dqcms654 comparesig -0.0 -0.0 -> 0
  413. dqcms655 comparesig -0.0 0.0 -> 0
  414. dqcms656 comparesig -0E1 0.0 -> 0
  415. dqcms657 comparesig -0E2 0.0 -> 0
  416. dqcms658 comparesig 0E1 0.0 -> 0
  417. dqcms659 comparesig 0E2 0.0 -> 0
  418. dqcms660 comparesig -0E1 0 -> 0
  419. dqcms661 comparesig -0E2 0 -> 0
  420. dqcms662 comparesig 0E1 0 -> 0
  421. dqcms663 comparesig 0E2 0 -> 0
  422. dqcms664 comparesig -0E1 -0E1 -> 0
  423. dqcms665 comparesig -0E2 -0E1 -> 0
  424. dqcms666 comparesig 0E1 -0E1 -> 0
  425. dqcms667 comparesig 0E2 -0E1 -> 0
  426. dqcms668 comparesig -0E1 -0E2 -> 0
  427. dqcms669 comparesig -0E2 -0E2 -> 0
  428. dqcms670 comparesig 0E1 -0E2 -> 0
  429. dqcms671 comparesig 0E2 -0E2 -> 0
  430. dqcms672 comparesig -0E1 0E1 -> 0
  431. dqcms673 comparesig -0E2 0E1 -> 0
  432. dqcms674 comparesig 0E1 0E1 -> 0
  433. dqcms675 comparesig 0E2 0E1 -> 0
  434. dqcms676 comparesig -0E1 0E2 -> 0
  435. dqcms677 comparesig -0E2 0E2 -> 0
  436. dqcms678 comparesig 0E1 0E2 -> 0
  437. dqcms679 comparesig 0E2 0E2 -> 0
  438. -- trailing zeros; unit-y
  439. dqcms680 comparesig 12 12 -> 0
  440. dqcms681 comparesig 12 12.0 -> 0
  441. dqcms682 comparesig 12 12.00 -> 0
  442. dqcms683 comparesig 12 12.000 -> 0
  443. dqcms684 comparesig 12 12.0000 -> 0
  444. dqcms685 comparesig 12 12.00000 -> 0
  445. dqcms686 comparesig 12 12.000000 -> 0
  446. dqcms687 comparesig 12 12.0000000 -> 0
  447. dqcms688 comparesig 12 12.00000000 -> 0
  448. dqcms689 comparesig 12 12.000000000 -> 0
  449. dqcms690 comparesig 12 12 -> 0
  450. dqcms691 comparesig 12.0 12 -> 0
  451. dqcms692 comparesig 12.00 12 -> 0
  452. dqcms693 comparesig 12.000 12 -> 0
  453. dqcms694 comparesig 12.0000 12 -> 0
  454. dqcms695 comparesig 12.00000 12 -> 0
  455. dqcms696 comparesig 12.000000 12 -> 0
  456. dqcms697 comparesig 12.0000000 12 -> 0
  457. dqcms698 comparesig 12.00000000 12 -> 0
  458. dqcms699 comparesig 12.000000000 12 -> 0
  459. -- first, second, & last digit
  460. dqcms700 comparesig 1234567899999999999999999990123456 1234567899999999999999999990123455 -> 1
  461. dqcms701 comparesig 1234567899999999999999999990123456 1234567899999999999999999990123456 -> 0
  462. dqcms702 comparesig 1234567899999999999999999990123456 1234567899999999999999999990123457 -> -1
  463. dqcms703 comparesig 1234567899999999999999999990123456 0234567899999999999999999990123456 -> 1
  464. dqcms704 comparesig 1234567899999999999999999990123456 1234567899999999999999999990123456 -> 0
  465. dqcms705 comparesig 1234567899999999999999999990123456 2234567899999999999999999990123456 -> -1
  466. dqcms706 comparesig 1134567899999999999999999990123456 1034567899999999999999999990123456 -> 1
  467. dqcms707 comparesig 1134567899999999999999999990123456 1134567899999999999999999990123456 -> 0
  468. dqcms708 comparesig 1134567899999999999999999990123456 1234567899999999999999999990123456 -> -1
  469. -- miscellaneous
  470. dqcms721 comparesig 12345678000 1 -> 1
  471. dqcms722 comparesig 1 12345678000 -> -1
  472. dqcms723 comparesig 1234567800 1 -> 1
  473. dqcms724 comparesig 1 1234567800 -> -1
  474. dqcms725 comparesig 1234567890 1 -> 1
  475. dqcms726 comparesig 1 1234567890 -> -1
  476. dqcms727 comparesig 1234567891 1 -> 1
  477. dqcms728 comparesig 1 1234567891 -> -1
  478. dqcms729 comparesig 12345678901 1 -> 1
  479. dqcms730 comparesig 1 12345678901 -> -1
  480. dqcms731 comparesig 1234567896 1 -> 1
  481. dqcms732 comparesig 1 1234567896 -> -1
  482. -- residue cases at lower precision
  483. dqcms740 comparesig 1 0.9999999 -> 1
  484. dqcms741 comparesig 1 0.999999 -> 1
  485. dqcms742 comparesig 1 0.99999 -> 1
  486. dqcms743 comparesig 1 1.0000 -> 0
  487. dqcms744 comparesig 1 1.00001 -> -1
  488. dqcms745 comparesig 1 1.000001 -> -1
  489. dqcms746 comparesig 1 1.0000001 -> -1
  490. dqcms750 comparesig 0.9999999 1 -> -1
  491. dqcms751 comparesig 0.999999 1 -> -1
  492. dqcms752 comparesig 0.99999 1 -> -1
  493. dqcms753 comparesig 1.0000 1 -> 0
  494. dqcms754 comparesig 1.00001 1 -> 1
  495. dqcms755 comparesig 1.000001 1 -> 1
  496. dqcms756 comparesig 1.0000001 1 -> 1
  497. -- Specials
  498. dqcms780 comparesig Inf -Inf -> 1
  499. dqcms781 comparesig Inf -1000 -> 1
  500. dqcms782 comparesig Inf -1 -> 1
  501. dqcms783 comparesig Inf -0 -> 1
  502. dqcms784 comparesig Inf 0 -> 1
  503. dqcms785 comparesig Inf 1 -> 1
  504. dqcms786 comparesig Inf 1000 -> 1
  505. dqcms787 comparesig Inf Inf -> 0
  506. dqcms788 comparesig -1000 Inf -> -1
  507. dqcms789 comparesig -Inf Inf -> -1
  508. dqcms790 comparesig -1 Inf -> -1
  509. dqcms791 comparesig -0 Inf -> -1
  510. dqcms792 comparesig 0 Inf -> -1
  511. dqcms793 comparesig 1 Inf -> -1
  512. dqcms794 comparesig 1000 Inf -> -1
  513. dqcms795 comparesig Inf Inf -> 0
  514. dqcms800 comparesig -Inf -Inf -> 0
  515. dqcms801 comparesig -Inf -1000 -> -1
  516. dqcms802 comparesig -Inf -1 -> -1
  517. dqcms803 comparesig -Inf -0 -> -1
  518. dqcms804 comparesig -Inf 0 -> -1
  519. dqcms805 comparesig -Inf 1 -> -1
  520. dqcms806 comparesig -Inf 1000 -> -1
  521. dqcms807 comparesig -Inf Inf -> -1
  522. dqcms808 comparesig -Inf -Inf -> 0
  523. dqcms809 comparesig -1000 -Inf -> 1
  524. dqcms810 comparesig -1 -Inf -> 1
  525. dqcms811 comparesig -0 -Inf -> 1
  526. dqcms812 comparesig 0 -Inf -> 1
  527. dqcms813 comparesig 1 -Inf -> 1
  528. dqcms814 comparesig 1000 -Inf -> 1
  529. dqcms815 comparesig Inf -Inf -> 1
  530. dqcms821 comparesig NaN -Inf -> NaN Invalid_operation
  531. dqcms822 comparesig NaN -1000 -> NaN Invalid_operation
  532. dqcms823 comparesig NaN -1 -> NaN Invalid_operation
  533. dqcms824 comparesig NaN -0 -> NaN Invalid_operation
  534. dqcms825 comparesig NaN 0 -> NaN Invalid_operation
  535. dqcms826 comparesig NaN 1 -> NaN Invalid_operation
  536. dqcms827 comparesig NaN 1000 -> NaN Invalid_operation
  537. dqcms828 comparesig NaN Inf -> NaN Invalid_operation
  538. dqcms829 comparesig NaN NaN -> NaN Invalid_operation
  539. dqcms830 comparesig -Inf NaN -> NaN Invalid_operation
  540. dqcms831 comparesig -1000 NaN -> NaN Invalid_operation
  541. dqcms832 comparesig -1 NaN -> NaN Invalid_operation
  542. dqcms833 comparesig -0 NaN -> NaN Invalid_operation
  543. dqcms834 comparesig 0 NaN -> NaN Invalid_operation
  544. dqcms835 comparesig 1 NaN -> NaN Invalid_operation
  545. dqcms836 comparesig 1000 NaN -> NaN Invalid_operation
  546. dqcms837 comparesig Inf NaN -> NaN Invalid_operation
  547. dqcms838 comparesig -NaN -NaN -> -NaN Invalid_operation
  548. dqcms839 comparesig +NaN -NaN -> NaN Invalid_operation
  549. dqcms840 comparesig -NaN +NaN -> -NaN Invalid_operation
  550. dqcms841 comparesig sNaN -Inf -> NaN Invalid_operation
  551. dqcms842 comparesig sNaN -1000 -> NaN Invalid_operation
  552. dqcms843 comparesig sNaN -1 -> NaN Invalid_operation
  553. dqcms844 comparesig sNaN -0 -> NaN Invalid_operation
  554. dqcms845 comparesig sNaN 0 -> NaN Invalid_operation
  555. dqcms846 comparesig sNaN 1 -> NaN Invalid_operation
  556. dqcms847 comparesig sNaN 1000 -> NaN Invalid_operation
  557. dqcms848 comparesig sNaN NaN -> NaN Invalid_operation
  558. dqcms849 comparesig sNaN sNaN -> NaN Invalid_operation
  559. dqcms850 comparesig NaN sNaN -> NaN Invalid_operation
  560. dqcms851 comparesig -Inf sNaN -> NaN Invalid_operation
  561. dqcms852 comparesig -1000 sNaN -> NaN Invalid_operation
  562. dqcms853 comparesig -1 sNaN -> NaN Invalid_operation
  563. dqcms854 comparesig -0 sNaN -> NaN Invalid_operation
  564. dqcms855 comparesig 0 sNaN -> NaN Invalid_operation
  565. dqcms856 comparesig 1 sNaN -> NaN Invalid_operation
  566. dqcms857 comparesig 1000 sNaN -> NaN Invalid_operation
  567. dqcms858 comparesig Inf sNaN -> NaN Invalid_operation
  568. dqcms859 comparesig NaN sNaN -> NaN Invalid_operation
  569. -- propagating NaNs
  570. dqcms860 comparesig NaN9 -Inf -> NaN9 Invalid_operation
  571. dqcms861 comparesig NaN8 999 -> NaN8 Invalid_operation
  572. dqcms862 comparesig NaN77 Inf -> NaN77 Invalid_operation
  573. dqcms863 comparesig -NaN67 NaN5 -> -NaN67 Invalid_operation
  574. dqcms864 comparesig -Inf -NaN4 -> -NaN4 Invalid_operation
  575. dqcms865 comparesig -999 -NaN33 -> -NaN33 Invalid_operation
  576. dqcms866 comparesig Inf NaN2 -> NaN2 Invalid_operation
  577. dqcms867 comparesig -NaN41 -NaN42 -> -NaN41 Invalid_operation
  578. dqcms868 comparesig +NaN41 -NaN42 -> NaN41 Invalid_operation
  579. dqcms869 comparesig -NaN41 +NaN42 -> -NaN41 Invalid_operation
  580. dqcms870 comparesig +NaN41 +NaN42 -> NaN41 Invalid_operation
  581. dqcms871 comparesig -sNaN99 -Inf -> -NaN99 Invalid_operation
  582. dqcms872 comparesig sNaN98 -11 -> NaN98 Invalid_operation
  583. dqcms873 comparesig sNaN97 NaN -> NaN97 Invalid_operation
  584. dqcms874 comparesig sNaN16 sNaN94 -> NaN16 Invalid_operation
  585. dqcms875 comparesig NaN85 sNaN83 -> NaN83 Invalid_operation
  586. dqcms876 comparesig -Inf sNaN92 -> NaN92 Invalid_operation
  587. dqcms877 comparesig 088 sNaN81 -> NaN81 Invalid_operation
  588. dqcms878 comparesig Inf sNaN90 -> NaN90 Invalid_operation
  589. dqcms879 comparesig NaN -sNaN89 -> -NaN89 Invalid_operation
  590. -- wide range
  591. dqcms880 comparesig +1.23456789012345E-0 9E+6144 -> -1
  592. dqcms881 comparesig 9E+6144 +1.23456789012345E-0 -> 1
  593. dqcms882 comparesig +0.100 9E-6143 -> 1
  594. dqcms883 comparesig 9E-6143 +0.100 -> -1
  595. dqcms885 comparesig -1.23456789012345E-0 9E+6144 -> -1
  596. dqcms886 comparesig 9E+6144 -1.23456789012345E-0 -> 1
  597. dqcms887 comparesig -0.100 9E-6143 -> -1
  598. dqcms888 comparesig 9E-6143 -0.100 -> 1
  599. -- signs
  600. dqcms901 comparesig 1e+77 1e+11 -> 1
  601. dqcms902 comparesig 1e+77 -1e+11 -> 1
  602. dqcms903 comparesig -1e+77 1e+11 -> -1
  603. dqcms904 comparesig -1e+77 -1e+11 -> -1
  604. dqcms905 comparesig 1e-77 1e-11 -> -1
  605. dqcms906 comparesig 1e-77 -1e-11 -> 1
  606. dqcms907 comparesig -1e-77 1e-11 -> -1
  607. dqcms908 comparesig -1e-77 -1e-11 -> 1
  608. -- Null tests
  609. dqcms990 comparesig 10 # -> NaN Invalid_operation
  610. dqcms991 comparesig # 10 -> NaN Invalid_operation