ddCompareSig.decTest 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. ------------------------------------------------------------------------
  2. -- ddCompareSig.decTest -- decDouble 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 decDoubles.
  25. precision: 16
  26. maxExponent: 384
  27. minExponent: -383
  28. extended: 1
  29. clamp: 1
  30. rounding: half_even
  31. -- sanity checks
  32. ddcms001 comparesig -2 -2 -> 0
  33. ddcms002 comparesig -2 -1 -> -1
  34. ddcms003 comparesig -2 0 -> -1
  35. ddcms004 comparesig -2 1 -> -1
  36. ddcms005 comparesig -2 2 -> -1
  37. ddcms006 comparesig -1 -2 -> 1
  38. ddcms007 comparesig -1 -1 -> 0
  39. ddcms008 comparesig -1 0 -> -1
  40. ddcms009 comparesig -1 1 -> -1
  41. ddcms010 comparesig -1 2 -> -1
  42. ddcms011 comparesig 0 -2 -> 1
  43. ddcms012 comparesig 0 -1 -> 1
  44. ddcms013 comparesig 0 0 -> 0
  45. ddcms014 comparesig 0 1 -> -1
  46. ddcms015 comparesig 0 2 -> -1
  47. ddcms016 comparesig 1 -2 -> 1
  48. ddcms017 comparesig 1 -1 -> 1
  49. ddcms018 comparesig 1 0 -> 1
  50. ddcms019 comparesig 1 1 -> 0
  51. ddcms020 comparesig 1 2 -> -1
  52. ddcms021 comparesig 2 -2 -> 1
  53. ddcms022 comparesig 2 -1 -> 1
  54. ddcms023 comparesig 2 0 -> 1
  55. ddcms025 comparesig 2 1 -> 1
  56. ddcms026 comparesig 2 2 -> 0
  57. ddcms031 comparesig -20 -20 -> 0
  58. ddcms032 comparesig -20 -10 -> -1
  59. ddcms033 comparesig -20 00 -> -1
  60. ddcms034 comparesig -20 10 -> -1
  61. ddcms035 comparesig -20 20 -> -1
  62. ddcms036 comparesig -10 -20 -> 1
  63. ddcms037 comparesig -10 -10 -> 0
  64. ddcms038 comparesig -10 00 -> -1
  65. ddcms039 comparesig -10 10 -> -1
  66. ddcms040 comparesig -10 20 -> -1
  67. ddcms041 comparesig 00 -20 -> 1
  68. ddcms042 comparesig 00 -10 -> 1
  69. ddcms043 comparesig 00 00 -> 0
  70. ddcms044 comparesig 00 10 -> -1
  71. ddcms045 comparesig 00 20 -> -1
  72. ddcms046 comparesig 10 -20 -> 1
  73. ddcms047 comparesig 10 -10 -> 1
  74. ddcms048 comparesig 10 00 -> 1
  75. ddcms049 comparesig 10 10 -> 0
  76. ddcms050 comparesig 10 20 -> -1
  77. ddcms051 comparesig 20 -20 -> 1
  78. ddcms052 comparesig 20 -10 -> 1
  79. ddcms053 comparesig 20 00 -> 1
  80. ddcms055 comparesig 20 10 -> 1
  81. ddcms056 comparesig 20 20 -> 0
  82. ddcms061 comparesig -2.0 -2.0 -> 0
  83. ddcms062 comparesig -2.0 -1.0 -> -1
  84. ddcms063 comparesig -2.0 0.0 -> -1
  85. ddcms064 comparesig -2.0 1.0 -> -1
  86. ddcms065 comparesig -2.0 2.0 -> -1
  87. ddcms066 comparesig -1.0 -2.0 -> 1
  88. ddcms067 comparesig -1.0 -1.0 -> 0
  89. ddcms068 comparesig -1.0 0.0 -> -1
  90. ddcms069 comparesig -1.0 1.0 -> -1
  91. ddcms070 comparesig -1.0 2.0 -> -1
  92. ddcms071 comparesig 0.0 -2.0 -> 1
  93. ddcms072 comparesig 0.0 -1.0 -> 1
  94. ddcms073 comparesig 0.0 0.0 -> 0
  95. ddcms074 comparesig 0.0 1.0 -> -1
  96. ddcms075 comparesig 0.0 2.0 -> -1
  97. ddcms076 comparesig 1.0 -2.0 -> 1
  98. ddcms077 comparesig 1.0 -1.0 -> 1
  99. ddcms078 comparesig 1.0 0.0 -> 1
  100. ddcms079 comparesig 1.0 1.0 -> 0
  101. ddcms080 comparesig 1.0 2.0 -> -1
  102. ddcms081 comparesig 2.0 -2.0 -> 1
  103. ddcms082 comparesig 2.0 -1.0 -> 1
  104. ddcms083 comparesig 2.0 0.0 -> 1
  105. ddcms085 comparesig 2.0 1.0 -> 1
  106. ddcms086 comparesig 2.0 2.0 -> 0
  107. -- now some cases which might overflow if subtract were used
  108. ddcms090 comparesig 9.999999999999999E+384 9.999999999999999E+384 -> 0
  109. ddcms091 comparesig -9.999999999999999E+384 9.999999999999999E+384 -> -1
  110. ddcms092 comparesig 9.999999999999999E+384 -9.999999999999999E+384 -> 1
  111. ddcms093 comparesig -9.999999999999999E+384 -9.999999999999999E+384 -> 0
  112. -- some differing length/exponent cases
  113. ddcms100 comparesig 7.0 7.0 -> 0
  114. ddcms101 comparesig 7.0 7 -> 0
  115. ddcms102 comparesig 7 7.0 -> 0
  116. ddcms103 comparesig 7E+0 7.0 -> 0
  117. ddcms104 comparesig 70E-1 7.0 -> 0
  118. ddcms105 comparesig 0.7E+1 7 -> 0
  119. ddcms106 comparesig 70E-1 7 -> 0
  120. ddcms107 comparesig 7.0 7E+0 -> 0
  121. ddcms108 comparesig 7.0 70E-1 -> 0
  122. ddcms109 comparesig 7 0.7E+1 -> 0
  123. ddcms110 comparesig 7 70E-1 -> 0
  124. ddcms120 comparesig 8.0 7.0 -> 1
  125. ddcms121 comparesig 8.0 7 -> 1
  126. ddcms122 comparesig 8 7.0 -> 1
  127. ddcms123 comparesig 8E+0 7.0 -> 1
  128. ddcms124 comparesig 80E-1 7.0 -> 1
  129. ddcms125 comparesig 0.8E+1 7 -> 1
  130. ddcms126 comparesig 80E-1 7 -> 1
  131. ddcms127 comparesig 8.0 7E+0 -> 1
  132. ddcms128 comparesig 8.0 70E-1 -> 1
  133. ddcms129 comparesig 8 0.7E+1 -> 1
  134. ddcms130 comparesig 8 70E-1 -> 1
  135. ddcms140 comparesig 8.0 9.0 -> -1
  136. ddcms141 comparesig 8.0 9 -> -1
  137. ddcms142 comparesig 8 9.0 -> -1
  138. ddcms143 comparesig 8E+0 9.0 -> -1
  139. ddcms144 comparesig 80E-1 9.0 -> -1
  140. ddcms145 comparesig 0.8E+1 9 -> -1
  141. ddcms146 comparesig 80E-1 9 -> -1
  142. ddcms147 comparesig 8.0 9E+0 -> -1
  143. ddcms148 comparesig 8.0 90E-1 -> -1
  144. ddcms149 comparesig 8 0.9E+1 -> -1
  145. ddcms150 comparesig 8 90E-1 -> -1
  146. -- and again, with sign changes -+ ..
  147. ddcms200 comparesig -7.0 7.0 -> -1
  148. ddcms201 comparesig -7.0 7 -> -1
  149. ddcms202 comparesig -7 7.0 -> -1
  150. ddcms203 comparesig -7E+0 7.0 -> -1
  151. ddcms204 comparesig -70E-1 7.0 -> -1
  152. ddcms205 comparesig -0.7E+1 7 -> -1
  153. ddcms206 comparesig -70E-1 7 -> -1
  154. ddcms207 comparesig -7.0 7E+0 -> -1
  155. ddcms208 comparesig -7.0 70E-1 -> -1
  156. ddcms209 comparesig -7 0.7E+1 -> -1
  157. ddcms210 comparesig -7 70E-1 -> -1
  158. ddcms220 comparesig -8.0 7.0 -> -1
  159. ddcms221 comparesig -8.0 7 -> -1
  160. ddcms222 comparesig -8 7.0 -> -1
  161. ddcms223 comparesig -8E+0 7.0 -> -1
  162. ddcms224 comparesig -80E-1 7.0 -> -1
  163. ddcms225 comparesig -0.8E+1 7 -> -1
  164. ddcms226 comparesig -80E-1 7 -> -1
  165. ddcms227 comparesig -8.0 7E+0 -> -1
  166. ddcms228 comparesig -8.0 70E-1 -> -1
  167. ddcms229 comparesig -8 0.7E+1 -> -1
  168. ddcms230 comparesig -8 70E-1 -> -1
  169. ddcms240 comparesig -8.0 9.0 -> -1
  170. ddcms241 comparesig -8.0 9 -> -1
  171. ddcms242 comparesig -8 9.0 -> -1
  172. ddcms243 comparesig -8E+0 9.0 -> -1
  173. ddcms244 comparesig -80E-1 9.0 -> -1
  174. ddcms245 comparesig -0.8E+1 9 -> -1
  175. ddcms246 comparesig -80E-1 9 -> -1
  176. ddcms247 comparesig -8.0 9E+0 -> -1
  177. ddcms248 comparesig -8.0 90E-1 -> -1
  178. ddcms249 comparesig -8 0.9E+1 -> -1
  179. ddcms250 comparesig -8 90E-1 -> -1
  180. -- and again, with sign changes +- ..
  181. ddcms300 comparesig 7.0 -7.0 -> 1
  182. ddcms301 comparesig 7.0 -7 -> 1
  183. ddcms302 comparesig 7 -7.0 -> 1
  184. ddcms303 comparesig 7E+0 -7.0 -> 1
  185. ddcms304 comparesig 70E-1 -7.0 -> 1
  186. ddcms305 comparesig .7E+1 -7 -> 1
  187. ddcms306 comparesig 70E-1 -7 -> 1
  188. ddcms307 comparesig 7.0 -7E+0 -> 1
  189. ddcms308 comparesig 7.0 -70E-1 -> 1
  190. ddcms309 comparesig 7 -.7E+1 -> 1
  191. ddcms310 comparesig 7 -70E-1 -> 1
  192. ddcms320 comparesig 8.0 -7.0 -> 1
  193. ddcms321 comparesig 8.0 -7 -> 1
  194. ddcms322 comparesig 8 -7.0 -> 1
  195. ddcms323 comparesig 8E+0 -7.0 -> 1
  196. ddcms324 comparesig 80E-1 -7.0 -> 1
  197. ddcms325 comparesig .8E+1 -7 -> 1
  198. ddcms326 comparesig 80E-1 -7 -> 1
  199. ddcms327 comparesig 8.0 -7E+0 -> 1
  200. ddcms328 comparesig 8.0 -70E-1 -> 1
  201. ddcms329 comparesig 8 -.7E+1 -> 1
  202. ddcms330 comparesig 8 -70E-1 -> 1
  203. ddcms340 comparesig 8.0 -9.0 -> 1
  204. ddcms341 comparesig 8.0 -9 -> 1
  205. ddcms342 comparesig 8 -9.0 -> 1
  206. ddcms343 comparesig 8E+0 -9.0 -> 1
  207. ddcms344 comparesig 80E-1 -9.0 -> 1
  208. ddcms345 comparesig .8E+1 -9 -> 1
  209. ddcms346 comparesig 80E-1 -9 -> 1
  210. ddcms347 comparesig 8.0 -9E+0 -> 1
  211. ddcms348 comparesig 8.0 -90E-1 -> 1
  212. ddcms349 comparesig 8 -.9E+1 -> 1
  213. ddcms350 comparesig 8 -90E-1 -> 1
  214. -- and again, with sign changes -- ..
  215. ddcms400 comparesig -7.0 -7.0 -> 0
  216. ddcms401 comparesig -7.0 -7 -> 0
  217. ddcms402 comparesig -7 -7.0 -> 0
  218. ddcms403 comparesig -7E+0 -7.0 -> 0
  219. ddcms404 comparesig -70E-1 -7.0 -> 0
  220. ddcms405 comparesig -.7E+1 -7 -> 0
  221. ddcms406 comparesig -70E-1 -7 -> 0
  222. ddcms407 comparesig -7.0 -7E+0 -> 0
  223. ddcms408 comparesig -7.0 -70E-1 -> 0
  224. ddcms409 comparesig -7 -.7E+1 -> 0
  225. ddcms410 comparesig -7 -70E-1 -> 0
  226. ddcms420 comparesig -8.0 -7.0 -> -1
  227. ddcms421 comparesig -8.0 -7 -> -1
  228. ddcms422 comparesig -8 -7.0 -> -1
  229. ddcms423 comparesig -8E+0 -7.0 -> -1
  230. ddcms424 comparesig -80E-1 -7.0 -> -1
  231. ddcms425 comparesig -.8E+1 -7 -> -1
  232. ddcms426 comparesig -80E-1 -7 -> -1
  233. ddcms427 comparesig -8.0 -7E+0 -> -1
  234. ddcms428 comparesig -8.0 -70E-1 -> -1
  235. ddcms429 comparesig -8 -.7E+1 -> -1
  236. ddcms430 comparesig -8 -70E-1 -> -1
  237. ddcms440 comparesig -8.0 -9.0 -> 1
  238. ddcms441 comparesig -8.0 -9 -> 1
  239. ddcms442 comparesig -8 -9.0 -> 1
  240. ddcms443 comparesig -8E+0 -9.0 -> 1
  241. ddcms444 comparesig -80E-1 -9.0 -> 1
  242. ddcms445 comparesig -.8E+1 -9 -> 1
  243. ddcms446 comparesig -80E-1 -9 -> 1
  244. ddcms447 comparesig -8.0 -9E+0 -> 1
  245. ddcms448 comparesig -8.0 -90E-1 -> 1
  246. ddcms449 comparesig -8 -.9E+1 -> 1
  247. ddcms450 comparesig -8 -90E-1 -> 1
  248. -- testcases that subtract to lots of zeros at boundaries [pgr]
  249. ddcms473 comparesig 123.4560000000000E-89 123.456E-89 -> 0
  250. ddcms474 comparesig 123.456000000000E+89 123.456E+89 -> 0
  251. ddcms475 comparesig 123.45600000000E-89 123.456E-89 -> 0
  252. ddcms476 comparesig 123.4560000000E+89 123.456E+89 -> 0
  253. ddcms477 comparesig 123.456000000E-89 123.456E-89 -> 0
  254. ddcms478 comparesig 123.45600000E+89 123.456E+89 -> 0
  255. ddcms479 comparesig 123.4560000E-89 123.456E-89 -> 0
  256. ddcms480 comparesig 123.456000E+89 123.456E+89 -> 0
  257. ddcms481 comparesig 123.45600E-89 123.456E-89 -> 0
  258. ddcms482 comparesig 123.4560E+89 123.456E+89 -> 0
  259. ddcms483 comparesig 123.456E-89 123.456E-89 -> 0
  260. ddcms487 comparesig 123.456E+89 123.4560000000000E+89 -> 0
  261. ddcms488 comparesig 123.456E-89 123.456000000000E-89 -> 0
  262. ddcms489 comparesig 123.456E+89 123.45600000000E+89 -> 0
  263. ddcms490 comparesig 123.456E-89 123.4560000000E-89 -> 0
  264. ddcms491 comparesig 123.456E+89 123.456000000E+89 -> 0
  265. ddcms492 comparesig 123.456E-89 123.45600000E-89 -> 0
  266. ddcms493 comparesig 123.456E+89 123.4560000E+89 -> 0
  267. ddcms494 comparesig 123.456E-89 123.456000E-89 -> 0
  268. ddcms495 comparesig 123.456E+89 123.45600E+89 -> 0
  269. ddcms496 comparesig 123.456E-89 123.4560E-89 -> 0
  270. ddcms497 comparesig 123.456E+89 123.456E+89 -> 0
  271. -- wide-ranging, around precision; signs equal
  272. ddcms500 comparesig 1 1E-15 -> 1
  273. ddcms501 comparesig 1 1E-14 -> 1
  274. ddcms502 comparesig 1 1E-13 -> 1
  275. ddcms503 comparesig 1 1E-12 -> 1
  276. ddcms504 comparesig 1 1E-11 -> 1
  277. ddcms505 comparesig 1 1E-10 -> 1
  278. ddcms506 comparesig 1 1E-9 -> 1
  279. ddcms507 comparesig 1 1E-8 -> 1
  280. ddcms508 comparesig 1 1E-7 -> 1
  281. ddcms509 comparesig 1 1E-6 -> 1
  282. ddcms510 comparesig 1 1E-5 -> 1
  283. ddcms511 comparesig 1 1E-4 -> 1
  284. ddcms512 comparesig 1 1E-3 -> 1
  285. ddcms513 comparesig 1 1E-2 -> 1
  286. ddcms514 comparesig 1 1E-1 -> 1
  287. ddcms515 comparesig 1 1E-0 -> 0
  288. ddcms516 comparesig 1 1E+1 -> -1
  289. ddcms517 comparesig 1 1E+2 -> -1
  290. ddcms518 comparesig 1 1E+3 -> -1
  291. ddcms519 comparesig 1 1E+4 -> -1
  292. ddcms521 comparesig 1 1E+5 -> -1
  293. ddcms522 comparesig 1 1E+6 -> -1
  294. ddcms523 comparesig 1 1E+7 -> -1
  295. ddcms524 comparesig 1 1E+8 -> -1
  296. ddcms525 comparesig 1 1E+9 -> -1
  297. ddcms526 comparesig 1 1E+10 -> -1
  298. ddcms527 comparesig 1 1E+11 -> -1
  299. ddcms528 comparesig 1 1E+12 -> -1
  300. ddcms529 comparesig 1 1E+13 -> -1
  301. ddcms530 comparesig 1 1E+14 -> -1
  302. ddcms531 comparesig 1 1E+15 -> -1
  303. -- LR swap
  304. ddcms540 comparesig 1E-15 1 -> -1
  305. ddcms541 comparesig 1E-14 1 -> -1
  306. ddcms542 comparesig 1E-13 1 -> -1
  307. ddcms543 comparesig 1E-12 1 -> -1
  308. ddcms544 comparesig 1E-11 1 -> -1
  309. ddcms545 comparesig 1E-10 1 -> -1
  310. ddcms546 comparesig 1E-9 1 -> -1
  311. ddcms547 comparesig 1E-8 1 -> -1
  312. ddcms548 comparesig 1E-7 1 -> -1
  313. ddcms549 comparesig 1E-6 1 -> -1
  314. ddcms550 comparesig 1E-5 1 -> -1
  315. ddcms551 comparesig 1E-4 1 -> -1
  316. ddcms552 comparesig 1E-3 1 -> -1
  317. ddcms553 comparesig 1E-2 1 -> -1
  318. ddcms554 comparesig 1E-1 1 -> -1
  319. ddcms555 comparesig 1E-0 1 -> 0
  320. ddcms556 comparesig 1E+1 1 -> 1
  321. ddcms557 comparesig 1E+2 1 -> 1
  322. ddcms558 comparesig 1E+3 1 -> 1
  323. ddcms559 comparesig 1E+4 1 -> 1
  324. ddcms561 comparesig 1E+5 1 -> 1
  325. ddcms562 comparesig 1E+6 1 -> 1
  326. ddcms563 comparesig 1E+7 1 -> 1
  327. ddcms564 comparesig 1E+8 1 -> 1
  328. ddcms565 comparesig 1E+9 1 -> 1
  329. ddcms566 comparesig 1E+10 1 -> 1
  330. ddcms567 comparesig 1E+11 1 -> 1
  331. ddcms568 comparesig 1E+12 1 -> 1
  332. ddcms569 comparesig 1E+13 1 -> 1
  333. ddcms570 comparesig 1E+14 1 -> 1
  334. ddcms571 comparesig 1E+15 1 -> 1
  335. -- similar with a useful coefficient, one side only
  336. ddcms580 comparesig 0.000000987654321 1E-15 -> 1
  337. ddcms581 comparesig 0.000000987654321 1E-14 -> 1
  338. ddcms582 comparesig 0.000000987654321 1E-13 -> 1
  339. ddcms583 comparesig 0.000000987654321 1E-12 -> 1
  340. ddcms584 comparesig 0.000000987654321 1E-11 -> 1
  341. ddcms585 comparesig 0.000000987654321 1E-10 -> 1
  342. ddcms586 comparesig 0.000000987654321 1E-9 -> 1
  343. ddcms587 comparesig 0.000000987654321 1E-8 -> 1
  344. ddcms588 comparesig 0.000000987654321 1E-7 -> 1
  345. ddcms589 comparesig 0.000000987654321 1E-6 -> -1
  346. ddcms590 comparesig 0.000000987654321 1E-5 -> -1
  347. ddcms591 comparesig 0.000000987654321 1E-4 -> -1
  348. ddcms592 comparesig 0.000000987654321 1E-3 -> -1
  349. ddcms593 comparesig 0.000000987654321 1E-2 -> -1
  350. ddcms594 comparesig 0.000000987654321 1E-1 -> -1
  351. ddcms595 comparesig 0.000000987654321 1E-0 -> -1
  352. ddcms596 comparesig 0.000000987654321 1E+1 -> -1
  353. ddcms597 comparesig 0.000000987654321 1E+2 -> -1
  354. ddcms598 comparesig 0.000000987654321 1E+3 -> -1
  355. ddcms599 comparesig 0.000000987654321 1E+4 -> -1
  356. -- check some unit-y traps
  357. ddcms600 comparesig 12 12.2345 -> -1
  358. ddcms601 comparesig 12.0 12.2345 -> -1
  359. ddcms602 comparesig 12.00 12.2345 -> -1
  360. ddcms603 comparesig 12.000 12.2345 -> -1
  361. ddcms604 comparesig 12.0000 12.2345 -> -1
  362. ddcms605 comparesig 12.00000 12.2345 -> -1
  363. ddcms606 comparesig 12.000000 12.2345 -> -1
  364. ddcms607 comparesig 12.0000000 12.2345 -> -1
  365. ddcms608 comparesig 12.00000000 12.2345 -> -1
  366. ddcms609 comparesig 12.000000000 12.2345 -> -1
  367. ddcms610 comparesig 12.1234 12 -> 1
  368. ddcms611 comparesig 12.1234 12.0 -> 1
  369. ddcms612 comparesig 12.1234 12.00 -> 1
  370. ddcms613 comparesig 12.1234 12.000 -> 1
  371. ddcms614 comparesig 12.1234 12.0000 -> 1
  372. ddcms615 comparesig 12.1234 12.00000 -> 1
  373. ddcms616 comparesig 12.1234 12.000000 -> 1
  374. ddcms617 comparesig 12.1234 12.0000000 -> 1
  375. ddcms618 comparesig 12.1234 12.00000000 -> 1
  376. ddcms619 comparesig 12.1234 12.000000000 -> 1
  377. ddcms620 comparesig -12 -12.2345 -> 1
  378. ddcms621 comparesig -12.0 -12.2345 -> 1
  379. ddcms622 comparesig -12.00 -12.2345 -> 1
  380. ddcms623 comparesig -12.000 -12.2345 -> 1
  381. ddcms624 comparesig -12.0000 -12.2345 -> 1
  382. ddcms625 comparesig -12.00000 -12.2345 -> 1
  383. ddcms626 comparesig -12.000000 -12.2345 -> 1
  384. ddcms627 comparesig -12.0000000 -12.2345 -> 1
  385. ddcms628 comparesig -12.00000000 -12.2345 -> 1
  386. ddcms629 comparesig -12.000000000 -12.2345 -> 1
  387. ddcms630 comparesig -12.1234 -12 -> -1
  388. ddcms631 comparesig -12.1234 -12.0 -> -1
  389. ddcms632 comparesig -12.1234 -12.00 -> -1
  390. ddcms633 comparesig -12.1234 -12.000 -> -1
  391. ddcms634 comparesig -12.1234 -12.0000 -> -1
  392. ddcms635 comparesig -12.1234 -12.00000 -> -1
  393. ddcms636 comparesig -12.1234 -12.000000 -> -1
  394. ddcms637 comparesig -12.1234 -12.0000000 -> -1
  395. ddcms638 comparesig -12.1234 -12.00000000 -> -1
  396. ddcms639 comparesig -12.1234 -12.000000000 -> -1
  397. -- extended zeros
  398. ddcms640 comparesig 0 0 -> 0
  399. ddcms641 comparesig 0 -0 -> 0
  400. ddcms642 comparesig 0 -0.0 -> 0
  401. ddcms643 comparesig 0 0.0 -> 0
  402. ddcms644 comparesig -0 0 -> 0
  403. ddcms645 comparesig -0 -0 -> 0
  404. ddcms646 comparesig -0 -0.0 -> 0
  405. ddcms647 comparesig -0 0.0 -> 0
  406. ddcms648 comparesig 0.0 0 -> 0
  407. ddcms649 comparesig 0.0 -0 -> 0
  408. ddcms650 comparesig 0.0 -0.0 -> 0
  409. ddcms651 comparesig 0.0 0.0 -> 0
  410. ddcms652 comparesig -0.0 0 -> 0
  411. ddcms653 comparesig -0.0 -0 -> 0
  412. ddcms654 comparesig -0.0 -0.0 -> 0
  413. ddcms655 comparesig -0.0 0.0 -> 0
  414. ddcms656 comparesig -0E1 0.0 -> 0
  415. ddcms657 comparesig -0E2 0.0 -> 0
  416. ddcms658 comparesig 0E1 0.0 -> 0
  417. ddcms659 comparesig 0E2 0.0 -> 0
  418. ddcms660 comparesig -0E1 0 -> 0
  419. ddcms661 comparesig -0E2 0 -> 0
  420. ddcms662 comparesig 0E1 0 -> 0
  421. ddcms663 comparesig 0E2 0 -> 0
  422. ddcms664 comparesig -0E1 -0E1 -> 0
  423. ddcms665 comparesig -0E2 -0E1 -> 0
  424. ddcms666 comparesig 0E1 -0E1 -> 0
  425. ddcms667 comparesig 0E2 -0E1 -> 0
  426. ddcms668 comparesig -0E1 -0E2 -> 0
  427. ddcms669 comparesig -0E2 -0E2 -> 0
  428. ddcms670 comparesig 0E1 -0E2 -> 0
  429. ddcms671 comparesig 0E2 -0E2 -> 0
  430. ddcms672 comparesig -0E1 0E1 -> 0
  431. ddcms673 comparesig -0E2 0E1 -> 0
  432. ddcms674 comparesig 0E1 0E1 -> 0
  433. ddcms675 comparesig 0E2 0E1 -> 0
  434. ddcms676 comparesig -0E1 0E2 -> 0
  435. ddcms677 comparesig -0E2 0E2 -> 0
  436. ddcms678 comparesig 0E1 0E2 -> 0
  437. ddcms679 comparesig 0E2 0E2 -> 0
  438. -- trailing zeros; unit-y
  439. ddcms680 comparesig 12 12 -> 0
  440. ddcms681 comparesig 12 12.0 -> 0
  441. ddcms682 comparesig 12 12.00 -> 0
  442. ddcms683 comparesig 12 12.000 -> 0
  443. ddcms684 comparesig 12 12.0000 -> 0
  444. ddcms685 comparesig 12 12.00000 -> 0
  445. ddcms686 comparesig 12 12.000000 -> 0
  446. ddcms687 comparesig 12 12.0000000 -> 0
  447. ddcms688 comparesig 12 12.00000000 -> 0
  448. ddcms689 comparesig 12 12.000000000 -> 0
  449. ddcms690 comparesig 12 12 -> 0
  450. ddcms691 comparesig 12.0 12 -> 0
  451. ddcms692 comparesig 12.00 12 -> 0
  452. ddcms693 comparesig 12.000 12 -> 0
  453. ddcms694 comparesig 12.0000 12 -> 0
  454. ddcms695 comparesig 12.00000 12 -> 0
  455. ddcms696 comparesig 12.000000 12 -> 0
  456. ddcms697 comparesig 12.0000000 12 -> 0
  457. ddcms698 comparesig 12.00000000 12 -> 0
  458. ddcms699 comparesig 12.000000000 12 -> 0
  459. -- first, second, & last digit
  460. ddcms700 comparesig 1234567890123456 1234567890123455 -> 1
  461. ddcms701 comparesig 1234567890123456 1234567890123456 -> 0
  462. ddcms702 comparesig 1234567890123456 1234567890123457 -> -1
  463. ddcms703 comparesig 1234567890123456 0234567890123456 -> 1
  464. ddcms704 comparesig 1234567890123456 1234567890123456 -> 0
  465. ddcms705 comparesig 1234567890123456 2234567890123456 -> -1
  466. ddcms706 comparesig 1134567890123456 1034567890123456 -> 1
  467. ddcms707 comparesig 1134567890123456 1134567890123456 -> 0
  468. ddcms708 comparesig 1134567890123456 1234567890123456 -> -1
  469. -- miscellaneous
  470. ddcms721 comparesig 12345678000 1 -> 1
  471. ddcms722 comparesig 1 12345678000 -> -1
  472. ddcms723 comparesig 1234567800 1 -> 1
  473. ddcms724 comparesig 1 1234567800 -> -1
  474. ddcms725 comparesig 1234567890 1 -> 1
  475. ddcms726 comparesig 1 1234567890 -> -1
  476. ddcms727 comparesig 1234567891 1 -> 1
  477. ddcms728 comparesig 1 1234567891 -> -1
  478. ddcms729 comparesig 12345678901 1 -> 1
  479. ddcms730 comparesig 1 12345678901 -> -1
  480. ddcms731 comparesig 1234567896 1 -> 1
  481. ddcms732 comparesig 1 1234567896 -> -1
  482. -- residue cases at lower precision
  483. ddcms740 comparesig 1 0.9999999 -> 1
  484. ddcms741 comparesig 1 0.999999 -> 1
  485. ddcms742 comparesig 1 0.99999 -> 1
  486. ddcms743 comparesig 1 1.0000 -> 0
  487. ddcms744 comparesig 1 1.00001 -> -1
  488. ddcms745 comparesig 1 1.000001 -> -1
  489. ddcms746 comparesig 1 1.0000001 -> -1
  490. ddcms750 comparesig 0.9999999 1 -> -1
  491. ddcms751 comparesig 0.999999 1 -> -1
  492. ddcms752 comparesig 0.99999 1 -> -1
  493. ddcms753 comparesig 1.0000 1 -> 0
  494. ddcms754 comparesig 1.00001 1 -> 1
  495. ddcms755 comparesig 1.000001 1 -> 1
  496. ddcms756 comparesig 1.0000001 1 -> 1
  497. -- Specials
  498. ddcms780 comparesig Inf -Inf -> 1
  499. ddcms781 comparesig Inf -1000 -> 1
  500. ddcms782 comparesig Inf -1 -> 1
  501. ddcms783 comparesig Inf -0 -> 1
  502. ddcms784 comparesig Inf 0 -> 1
  503. ddcms785 comparesig Inf 1 -> 1
  504. ddcms786 comparesig Inf 1000 -> 1
  505. ddcms787 comparesig Inf Inf -> 0
  506. ddcms788 comparesig -1000 Inf -> -1
  507. ddcms789 comparesig -Inf Inf -> -1
  508. ddcms790 comparesig -1 Inf -> -1
  509. ddcms791 comparesig -0 Inf -> -1
  510. ddcms792 comparesig 0 Inf -> -1
  511. ddcms793 comparesig 1 Inf -> -1
  512. ddcms794 comparesig 1000 Inf -> -1
  513. ddcms795 comparesig Inf Inf -> 0
  514. ddcms800 comparesig -Inf -Inf -> 0
  515. ddcms801 comparesig -Inf -1000 -> -1
  516. ddcms802 comparesig -Inf -1 -> -1
  517. ddcms803 comparesig -Inf -0 -> -1
  518. ddcms804 comparesig -Inf 0 -> -1
  519. ddcms805 comparesig -Inf 1 -> -1
  520. ddcms806 comparesig -Inf 1000 -> -1
  521. ddcms807 comparesig -Inf Inf -> -1
  522. ddcms808 comparesig -Inf -Inf -> 0
  523. ddcms809 comparesig -1000 -Inf -> 1
  524. ddcms810 comparesig -1 -Inf -> 1
  525. ddcms811 comparesig -0 -Inf -> 1
  526. ddcms812 comparesig 0 -Inf -> 1
  527. ddcms813 comparesig 1 -Inf -> 1
  528. ddcms814 comparesig 1000 -Inf -> 1
  529. ddcms815 comparesig Inf -Inf -> 1
  530. ddcms821 comparesig NaN -Inf -> NaN Invalid_operation
  531. ddcms822 comparesig NaN -1000 -> NaN Invalid_operation
  532. ddcms823 comparesig NaN -1 -> NaN Invalid_operation
  533. ddcms824 comparesig NaN -0 -> NaN Invalid_operation
  534. ddcms825 comparesig NaN 0 -> NaN Invalid_operation
  535. ddcms826 comparesig NaN 1 -> NaN Invalid_operation
  536. ddcms827 comparesig NaN 1000 -> NaN Invalid_operation
  537. ddcms828 comparesig NaN Inf -> NaN Invalid_operation
  538. ddcms829 comparesig NaN NaN -> NaN Invalid_operation
  539. ddcms830 comparesig -Inf NaN -> NaN Invalid_operation
  540. ddcms831 comparesig -1000 NaN -> NaN Invalid_operation
  541. ddcms832 comparesig -1 NaN -> NaN Invalid_operation
  542. ddcms833 comparesig -0 NaN -> NaN Invalid_operation
  543. ddcms834 comparesig 0 NaN -> NaN Invalid_operation
  544. ddcms835 comparesig 1 NaN -> NaN Invalid_operation
  545. ddcms836 comparesig 1000 NaN -> NaN Invalid_operation
  546. ddcms837 comparesig Inf NaN -> NaN Invalid_operation
  547. ddcms838 comparesig -NaN -NaN -> -NaN Invalid_operation
  548. ddcms839 comparesig +NaN -NaN -> NaN Invalid_operation
  549. ddcms840 comparesig -NaN +NaN -> -NaN Invalid_operation
  550. ddcms841 comparesig sNaN -Inf -> NaN Invalid_operation
  551. ddcms842 comparesig sNaN -1000 -> NaN Invalid_operation
  552. ddcms843 comparesig sNaN -1 -> NaN Invalid_operation
  553. ddcms844 comparesig sNaN -0 -> NaN Invalid_operation
  554. ddcms845 comparesig sNaN 0 -> NaN Invalid_operation
  555. ddcms846 comparesig sNaN 1 -> NaN Invalid_operation
  556. ddcms847 comparesig sNaN 1000 -> NaN Invalid_operation
  557. ddcms848 comparesig sNaN NaN -> NaN Invalid_operation
  558. ddcms849 comparesig sNaN sNaN -> NaN Invalid_operation
  559. ddcms850 comparesig NaN sNaN -> NaN Invalid_operation
  560. ddcms851 comparesig -Inf sNaN -> NaN Invalid_operation
  561. ddcms852 comparesig -1000 sNaN -> NaN Invalid_operation
  562. ddcms853 comparesig -1 sNaN -> NaN Invalid_operation
  563. ddcms854 comparesig -0 sNaN -> NaN Invalid_operation
  564. ddcms855 comparesig 0 sNaN -> NaN Invalid_operation
  565. ddcms856 comparesig 1 sNaN -> NaN Invalid_operation
  566. ddcms857 comparesig 1000 sNaN -> NaN Invalid_operation
  567. ddcms858 comparesig Inf sNaN -> NaN Invalid_operation
  568. ddcms859 comparesig NaN sNaN -> NaN Invalid_operation
  569. -- propagating NaNs
  570. ddcms860 comparesig NaN9 -Inf -> NaN9 Invalid_operation
  571. ddcms861 comparesig NaN8 999 -> NaN8 Invalid_operation
  572. ddcms862 comparesig NaN77 Inf -> NaN77 Invalid_operation
  573. ddcms863 comparesig -NaN67 NaN5 -> -NaN67 Invalid_operation
  574. ddcms864 comparesig -Inf -NaN4 -> -NaN4 Invalid_operation
  575. ddcms865 comparesig -999 -NaN33 -> -NaN33 Invalid_operation
  576. ddcms866 comparesig Inf NaN2 -> NaN2 Invalid_operation
  577. ddcms867 comparesig -NaN41 -NaN42 -> -NaN41 Invalid_operation
  578. ddcms868 comparesig +NaN41 -NaN42 -> NaN41 Invalid_operation
  579. ddcms869 comparesig -NaN41 +NaN42 -> -NaN41 Invalid_operation
  580. ddcms870 comparesig +NaN41 +NaN42 -> NaN41 Invalid_operation
  581. ddcms871 comparesig -sNaN99 -Inf -> -NaN99 Invalid_operation
  582. ddcms872 comparesig sNaN98 -11 -> NaN98 Invalid_operation
  583. ddcms873 comparesig sNaN97 NaN -> NaN97 Invalid_operation
  584. ddcms874 comparesig sNaN16 sNaN94 -> NaN16 Invalid_operation
  585. ddcms875 comparesig NaN85 sNaN83 -> NaN83 Invalid_operation
  586. ddcms876 comparesig -Inf sNaN92 -> NaN92 Invalid_operation
  587. ddcms877 comparesig 088 sNaN81 -> NaN81 Invalid_operation
  588. ddcms878 comparesig Inf sNaN90 -> NaN90 Invalid_operation
  589. ddcms879 comparesig NaN -sNaN89 -> -NaN89 Invalid_operation
  590. -- wide range
  591. ddcms880 comparesig +1.23456789012345E-0 9E+384 -> -1
  592. ddcms881 comparesig 9E+384 +1.23456789012345E-0 -> 1
  593. ddcms882 comparesig +0.100 9E-383 -> 1
  594. ddcms883 comparesig 9E-383 +0.100 -> -1
  595. ddcms885 comparesig -1.23456789012345E-0 9E+384 -> -1
  596. ddcms886 comparesig 9E+384 -1.23456789012345E-0 -> 1
  597. ddcms887 comparesig -0.100 9E-383 -> -1
  598. ddcms888 comparesig 9E-383 -0.100 -> 1
  599. -- signs
  600. ddcms901 comparesig 1e+77 1e+11 -> 1
  601. ddcms902 comparesig 1e+77 -1e+11 -> 1
  602. ddcms903 comparesig -1e+77 1e+11 -> -1
  603. ddcms904 comparesig -1e+77 -1e+11 -> -1
  604. ddcms905 comparesig 1e-77 1e-11 -> -1
  605. ddcms906 comparesig 1e-77 -1e-11 -> 1
  606. ddcms907 comparesig -1e-77 1e-11 -> -1
  607. ddcms908 comparesig -1e-77 -1e-11 -> 1
  608. -- Null tests
  609. ddcms990 comparesig 10 # -> NaN Invalid_operation
  610. ddcms991 comparesig # 10 -> NaN Invalid_operation