1------------------------------------------------------------------------ 2-- ddCompareTotalMag.decTest -- decDouble 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------------------------------------------------------------------------ 20version: 2.59 21 22-- Note that we cannot assume add/subtract tests cover paths adequately, 23-- here, because the code might be quite different (comparison cannot 24-- overflow or underflow, so actual subtractions are not necessary). 25-- Similarly, comparetotal will have some radically different paths 26-- than compare. 27 28-- All operands and results are decDoubles. 29precision: 16 30maxExponent: 384 31minExponent: -383 32extended: 1 33clamp: 1 34rounding: half_even 35 36-- sanity checks 37ddctm001 comparetotmag -2 -2 -> 0 38ddctm002 comparetotmag -2 -1 -> 1 39ddctm003 comparetotmag -2 0 -> 1 40ddctm004 comparetotmag -2 1 -> 1 41ddctm005 comparetotmag -2 2 -> 0 42ddctm006 comparetotmag -1 -2 -> -1 43ddctm007 comparetotmag -1 -1 -> 0 44ddctm008 comparetotmag -1 0 -> 1 45ddctm009 comparetotmag -1 1 -> 0 46ddctm010 comparetotmag -1 2 -> -1 47ddctm011 comparetotmag 0 -2 -> -1 48ddctm012 comparetotmag 0 -1 -> -1 49ddctm013 comparetotmag 0 0 -> 0 50ddctm014 comparetotmag 0 1 -> -1 51ddctm015 comparetotmag 0 2 -> -1 52ddctm016 comparetotmag 1 -2 -> -1 53ddctm017 comparetotmag 1 -1 -> 0 54ddctm018 comparetotmag 1 0 -> 1 55ddctm019 comparetotmag 1 1 -> 0 56ddctm020 comparetotmag 1 2 -> -1 57ddctm021 comparetotmag 2 -2 -> 0 58ddctm022 comparetotmag 2 -1 -> 1 59ddctm023 comparetotmag 2 0 -> 1 60ddctm025 comparetotmag 2 1 -> 1 61ddctm026 comparetotmag 2 2 -> 0 62 63ddctm031 comparetotmag -20 -20 -> 0 64ddctm032 comparetotmag -20 -10 -> 1 65ddctm033 comparetotmag -20 00 -> 1 66ddctm034 comparetotmag -20 10 -> 1 67ddctm035 comparetotmag -20 20 -> 0 68ddctm036 comparetotmag -10 -20 -> -1 69ddctm037 comparetotmag -10 -10 -> 0 70ddctm038 comparetotmag -10 00 -> 1 71ddctm039 comparetotmag -10 10 -> 0 72ddctm040 comparetotmag -10 20 -> -1 73ddctm041 comparetotmag 00 -20 -> -1 74ddctm042 comparetotmag 00 -10 -> -1 75ddctm043 comparetotmag 00 00 -> 0 76ddctm044 comparetotmag 00 10 -> -1 77ddctm045 comparetotmag 00 20 -> -1 78ddctm046 comparetotmag 10 -20 -> -1 79ddctm047 comparetotmag 10 -10 -> 0 80ddctm048 comparetotmag 10 00 -> 1 81ddctm049 comparetotmag 10 10 -> 0 82ddctm050 comparetotmag 10 20 -> -1 83ddctm051 comparetotmag 20 -20 -> 0 84ddctm052 comparetotmag 20 -10 -> 1 85ddctm053 comparetotmag 20 00 -> 1 86ddctm055 comparetotmag 20 10 -> 1 87ddctm056 comparetotmag 20 20 -> 0 88 89ddctm061 comparetotmag -2.0 -2.0 -> 0 90ddctm062 comparetotmag -2.0 -1.0 -> 1 91ddctm063 comparetotmag -2.0 0.0 -> 1 92ddctm064 comparetotmag -2.0 1.0 -> 1 93ddctm065 comparetotmag -2.0 2.0 -> 0 94ddctm066 comparetotmag -1.0 -2.0 -> -1 95ddctm067 comparetotmag -1.0 -1.0 -> 0 96ddctm068 comparetotmag -1.0 0.0 -> 1 97ddctm069 comparetotmag -1.0 1.0 -> 0 98ddctm070 comparetotmag -1.0 2.0 -> -1 99ddctm071 comparetotmag 0.0 -2.0 -> -1 100ddctm072 comparetotmag 0.0 -1.0 -> -1 101ddctm073 comparetotmag 0.0 0.0 -> 0 102ddctm074 comparetotmag 0.0 1.0 -> -1 103ddctm075 comparetotmag 0.0 2.0 -> -1 104ddctm076 comparetotmag 1.0 -2.0 -> -1 105ddctm077 comparetotmag 1.0 -1.0 -> 0 106ddctm078 comparetotmag 1.0 0.0 -> 1 107ddctm079 comparetotmag 1.0 1.0 -> 0 108ddctm080 comparetotmag 1.0 2.0 -> -1 109ddctm081 comparetotmag 2.0 -2.0 -> 0 110ddctm082 comparetotmag 2.0 -1.0 -> 1 111ddctm083 comparetotmag 2.0 0.0 -> 1 112ddctm085 comparetotmag 2.0 1.0 -> 1 113ddctm086 comparetotmag 2.0 2.0 -> 0 114 115-- now some cases which might overflow if subtract were used 116ddctm090 comparetotmag 9.99999999E+384 9.99999999E+384 -> 0 117ddctm091 comparetotmag -9.99999999E+384 9.99999999E+384 -> 0 118ddctm092 comparetotmag 9.99999999E+384 -9.99999999E+384 -> 0 119ddctm093 comparetotmag -9.99999999E+384 -9.99999999E+384 -> 0 120 121-- some differing length/exponent cases 122-- in this first group, compare would compare all equal 123ddctm100 comparetotmag 7.0 7.0 -> 0 124ddctm101 comparetotmag 7.0 7 -> -1 125ddctm102 comparetotmag 7 7.0 -> 1 126ddctm103 comparetotmag 7E+0 7.0 -> 1 127ddctm104 comparetotmag 70E-1 7.0 -> 0 128ddctm105 comparetotmag 0.7E+1 7 -> 0 129ddctm106 comparetotmag 70E-1 7 -> -1 130ddctm107 comparetotmag 7.0 7E+0 -> -1 131ddctm108 comparetotmag 7.0 70E-1 -> 0 132ddctm109 comparetotmag 7 0.7E+1 -> 0 133ddctm110 comparetotmag 7 70E-1 -> 1 134 135ddctm120 comparetotmag 8.0 7.0 -> 1 136ddctm121 comparetotmag 8.0 7 -> 1 137ddctm122 comparetotmag 8 7.0 -> 1 138ddctm123 comparetotmag 8E+0 7.0 -> 1 139ddctm124 comparetotmag 80E-1 7.0 -> 1 140ddctm125 comparetotmag 0.8E+1 7 -> 1 141ddctm126 comparetotmag 80E-1 7 -> 1 142ddctm127 comparetotmag 8.0 7E+0 -> 1 143ddctm128 comparetotmag 8.0 70E-1 -> 1 144ddctm129 comparetotmag 8 0.7E+1 -> 1 145ddctm130 comparetotmag 8 70E-1 -> 1 146 147ddctm140 comparetotmag 8.0 9.0 -> -1 148ddctm141 comparetotmag 8.0 9 -> -1 149ddctm142 comparetotmag 8 9.0 -> -1 150ddctm143 comparetotmag 8E+0 9.0 -> -1 151ddctm144 comparetotmag 80E-1 9.0 -> -1 152ddctm145 comparetotmag 0.8E+1 9 -> -1 153ddctm146 comparetotmag 80E-1 9 -> -1 154ddctm147 comparetotmag 8.0 9E+0 -> -1 155ddctm148 comparetotmag 8.0 90E-1 -> -1 156ddctm149 comparetotmag 8 0.9E+1 -> -1 157ddctm150 comparetotmag 8 90E-1 -> -1 158 159-- and again, with sign changes -+ .. 160ddctm200 comparetotmag -7.0 7.0 -> 0 161ddctm201 comparetotmag -7.0 7 -> -1 162ddctm202 comparetotmag -7 7.0 -> 1 163ddctm203 comparetotmag -7E+0 7.0 -> 1 164ddctm204 comparetotmag -70E-1 7.0 -> 0 165ddctm205 comparetotmag -0.7E+1 7 -> 0 166ddctm206 comparetotmag -70E-1 7 -> -1 167ddctm207 comparetotmag -7.0 7E+0 -> -1 168ddctm208 comparetotmag -7.0 70E-1 -> 0 169ddctm209 comparetotmag -7 0.7E+1 -> 0 170ddctm210 comparetotmag -7 70E-1 -> 1 171 172ddctm220 comparetotmag -8.0 7.0 -> 1 173ddctm221 comparetotmag -8.0 7 -> 1 174ddctm222 comparetotmag -8 7.0 -> 1 175ddctm223 comparetotmag -8E+0 7.0 -> 1 176ddctm224 comparetotmag -80E-1 7.0 -> 1 177ddctm225 comparetotmag -0.8E+1 7 -> 1 178ddctm226 comparetotmag -80E-1 7 -> 1 179ddctm227 comparetotmag -8.0 7E+0 -> 1 180ddctm228 comparetotmag -8.0 70E-1 -> 1 181ddctm229 comparetotmag -8 0.7E+1 -> 1 182ddctm230 comparetotmag -8 70E-1 -> 1 183 184ddctm240 comparetotmag -8.0 9.0 -> -1 185ddctm241 comparetotmag -8.0 9 -> -1 186ddctm242 comparetotmag -8 9.0 -> -1 187ddctm243 comparetotmag -8E+0 9.0 -> -1 188ddctm244 comparetotmag -80E-1 9.0 -> -1 189ddctm245 comparetotmag -0.8E+1 9 -> -1 190ddctm246 comparetotmag -80E-1 9 -> -1 191ddctm247 comparetotmag -8.0 9E+0 -> -1 192ddctm248 comparetotmag -8.0 90E-1 -> -1 193ddctm249 comparetotmag -8 0.9E+1 -> -1 194ddctm250 comparetotmag -8 90E-1 -> -1 195 196-- and again, with sign changes +- .. 197ddctm300 comparetotmag 7.0 -7.0 -> 0 198ddctm301 comparetotmag 7.0 -7 -> -1 199ddctm302 comparetotmag 7 -7.0 -> 1 200ddctm303 comparetotmag 7E+0 -7.0 -> 1 201ddctm304 comparetotmag 70E-1 -7.0 -> 0 202ddctm305 comparetotmag .7E+1 -7 -> 0 203ddctm306 comparetotmag 70E-1 -7 -> -1 204ddctm307 comparetotmag 7.0 -7E+0 -> -1 205ddctm308 comparetotmag 7.0 -70E-1 -> 0 206ddctm309 comparetotmag 7 -.7E+1 -> 0 207ddctm310 comparetotmag 7 -70E-1 -> 1 208 209ddctm320 comparetotmag 8.0 -7.0 -> 1 210ddctm321 comparetotmag 8.0 -7 -> 1 211ddctm322 comparetotmag 8 -7.0 -> 1 212ddctm323 comparetotmag 8E+0 -7.0 -> 1 213ddctm324 comparetotmag 80E-1 -7.0 -> 1 214ddctm325 comparetotmag .8E+1 -7 -> 1 215ddctm326 comparetotmag 80E-1 -7 -> 1 216ddctm327 comparetotmag 8.0 -7E+0 -> 1 217ddctm328 comparetotmag 8.0 -70E-1 -> 1 218ddctm329 comparetotmag 8 -.7E+1 -> 1 219ddctm330 comparetotmag 8 -70E-1 -> 1 220 221ddctm340 comparetotmag 8.0 -9.0 -> -1 222ddctm341 comparetotmag 8.0 -9 -> -1 223ddctm342 comparetotmag 8 -9.0 -> -1 224ddctm343 comparetotmag 8E+0 -9.0 -> -1 225ddctm344 comparetotmag 80E-1 -9.0 -> -1 226ddctm345 comparetotmag .8E+1 -9 -> -1 227ddctm346 comparetotmag 80E-1 -9 -> -1 228ddctm347 comparetotmag 8.0 -9E+0 -> -1 229ddctm348 comparetotmag 8.0 -90E-1 -> -1 230ddctm349 comparetotmag 8 -.9E+1 -> -1 231ddctm350 comparetotmag 8 -90E-1 -> -1 232 233-- and again, with sign changes -- .. 234ddctm400 comparetotmag -7.0 -7.0 -> 0 235ddctm401 comparetotmag -7.0 -7 -> -1 236ddctm402 comparetotmag -7 -7.0 -> 1 237ddctm403 comparetotmag -7E+0 -7.0 -> 1 238ddctm404 comparetotmag -70E-1 -7.0 -> 0 239ddctm405 comparetotmag -.7E+1 -7 -> 0 240ddctm406 comparetotmag -70E-1 -7 -> -1 241ddctm407 comparetotmag -7.0 -7E+0 -> -1 242ddctm408 comparetotmag -7.0 -70E-1 -> 0 243ddctm409 comparetotmag -7 -.7E+1 -> 0 244ddctm410 comparetotmag -7 -70E-1 -> 1 245 246ddctm420 comparetotmag -8.0 -7.0 -> 1 247ddctm421 comparetotmag -8.0 -7 -> 1 248ddctm422 comparetotmag -8 -7.0 -> 1 249ddctm423 comparetotmag -8E+0 -7.0 -> 1 250ddctm424 comparetotmag -80E-1 -7.0 -> 1 251ddctm425 comparetotmag -.8E+1 -7 -> 1 252ddctm426 comparetotmag -80E-1 -7 -> 1 253ddctm427 comparetotmag -8.0 -7E+0 -> 1 254ddctm428 comparetotmag -8.0 -70E-1 -> 1 255ddctm429 comparetotmag -8 -.7E+1 -> 1 256ddctm430 comparetotmag -8 -70E-1 -> 1 257 258ddctm440 comparetotmag -8.0 -9.0 -> -1 259ddctm441 comparetotmag -8.0 -9 -> -1 260ddctm442 comparetotmag -8 -9.0 -> -1 261ddctm443 comparetotmag -8E+0 -9.0 -> -1 262ddctm444 comparetotmag -80E-1 -9.0 -> -1 263ddctm445 comparetotmag -.8E+1 -9 -> -1 264ddctm446 comparetotmag -80E-1 -9 -> -1 265ddctm447 comparetotmag -8.0 -9E+0 -> -1 266ddctm448 comparetotmag -8.0 -90E-1 -> -1 267ddctm449 comparetotmag -8 -.9E+1 -> -1 268ddctm450 comparetotmag -8 -90E-1 -> -1 269 270 271-- testcases that subtract to lots of zeros at boundaries [pgr] 272ddctm473 comparetotmag 123.4560000000000E-89 123.456E-89 -> -1 273ddctm474 comparetotmag 123.456000000000E+89 123.456E+89 -> -1 274ddctm475 comparetotmag 123.45600000000E-89 123.456E-89 -> -1 275ddctm476 comparetotmag 123.4560000000E+89 123.456E+89 -> -1 276ddctm477 comparetotmag 123.456000000E-89 123.456E-89 -> -1 277ddctm478 comparetotmag 123.45600000E+89 123.456E+89 -> -1 278ddctm479 comparetotmag 123.4560000E-89 123.456E-89 -> -1 279ddctm480 comparetotmag 123.456000E+89 123.456E+89 -> -1 280ddctm481 comparetotmag 123.45600E-89 123.456E-89 -> -1 281ddctm482 comparetotmag 123.4560E+89 123.456E+89 -> -1 282ddctm483 comparetotmag 123.456E-89 123.456E-89 -> 0 283ddctm487 comparetotmag 123.456E+89 123.4560000000000E+89 -> 1 284ddctm488 comparetotmag 123.456E-89 123.456000000000E-89 -> 1 285ddctm489 comparetotmag 123.456E+89 123.45600000000E+89 -> 1 286ddctm490 comparetotmag 123.456E-89 123.4560000000E-89 -> 1 287ddctm491 comparetotmag 123.456E+89 123.456000000E+89 -> 1 288ddctm492 comparetotmag 123.456E-89 123.45600000E-89 -> 1 289ddctm493 comparetotmag 123.456E+89 123.4560000E+89 -> 1 290ddctm494 comparetotmag 123.456E-89 123.456000E-89 -> 1 291ddctm495 comparetotmag 123.456E+89 123.45600E+89 -> 1 292ddctm496 comparetotmag 123.456E-89 123.4560E-89 -> 1 293ddctm497 comparetotmag 123.456E+89 123.456E+89 -> 0 294 295-- wide-ranging, around precision; signs equal 296ddctm498 comparetotmag 1 1E-17 -> 1 297ddctm499 comparetotmag 1 1E-16 -> 1 298ddctm500 comparetotmag 1 1E-15 -> 1 299ddctm501 comparetotmag 1 1E-14 -> 1 300ddctm502 comparetotmag 1 1E-13 -> 1 301ddctm503 comparetotmag 1 1E-12 -> 1 302ddctm504 comparetotmag 1 1E-11 -> 1 303ddctm505 comparetotmag 1 1E-10 -> 1 304ddctm506 comparetotmag 1 1E-9 -> 1 305ddctm507 comparetotmag 1 1E-8 -> 1 306ddctm508 comparetotmag 1 1E-7 -> 1 307ddctm509 comparetotmag 1 1E-6 -> 1 308ddctm510 comparetotmag 1 1E-5 -> 1 309ddctm511 comparetotmag 1 1E-4 -> 1 310ddctm512 comparetotmag 1 1E-3 -> 1 311ddctm513 comparetotmag 1 1E-2 -> 1 312ddctm514 comparetotmag 1 1E-1 -> 1 313ddctm515 comparetotmag 1 1E-0 -> 0 314ddctm516 comparetotmag 1 1E+1 -> -1 315ddctm517 comparetotmag 1 1E+2 -> -1 316ddctm518 comparetotmag 1 1E+3 -> -1 317ddctm519 comparetotmag 1 1E+4 -> -1 318ddctm521 comparetotmag 1 1E+5 -> -1 319ddctm522 comparetotmag 1 1E+6 -> -1 320ddctm523 comparetotmag 1 1E+7 -> -1 321ddctm524 comparetotmag 1 1E+8 -> -1 322ddctm525 comparetotmag 1 1E+9 -> -1 323ddctm526 comparetotmag 1 1E+10 -> -1 324ddctm527 comparetotmag 1 1E+11 -> -1 325ddctm528 comparetotmag 1 1E+12 -> -1 326ddctm529 comparetotmag 1 1E+13 -> -1 327ddctm530 comparetotmag 1 1E+14 -> -1 328ddctm531 comparetotmag 1 1E+15 -> -1 329ddctm532 comparetotmag 1 1E+16 -> -1 330ddctm533 comparetotmag 1 1E+17 -> -1 331-- LR swap 332ddctm538 comparetotmag 1E-17 1 -> -1 333ddctm539 comparetotmag 1E-16 1 -> -1 334ddctm540 comparetotmag 1E-15 1 -> -1 335ddctm541 comparetotmag 1E-14 1 -> -1 336ddctm542 comparetotmag 1E-13 1 -> -1 337ddctm543 comparetotmag 1E-12 1 -> -1 338ddctm544 comparetotmag 1E-11 1 -> -1 339ddctm545 comparetotmag 1E-10 1 -> -1 340ddctm546 comparetotmag 1E-9 1 -> -1 341ddctm547 comparetotmag 1E-8 1 -> -1 342ddctm548 comparetotmag 1E-7 1 -> -1 343ddctm549 comparetotmag 1E-6 1 -> -1 344ddctm550 comparetotmag 1E-5 1 -> -1 345ddctm551 comparetotmag 1E-4 1 -> -1 346ddctm552 comparetotmag 1E-3 1 -> -1 347ddctm553 comparetotmag 1E-2 1 -> -1 348ddctm554 comparetotmag 1E-1 1 -> -1 349ddctm555 comparetotmag 1E-0 1 -> 0 350ddctm556 comparetotmag 1E+1 1 -> 1 351ddctm557 comparetotmag 1E+2 1 -> 1 352ddctm558 comparetotmag 1E+3 1 -> 1 353ddctm559 comparetotmag 1E+4 1 -> 1 354ddctm561 comparetotmag 1E+5 1 -> 1 355ddctm562 comparetotmag 1E+6 1 -> 1 356ddctm563 comparetotmag 1E+7 1 -> 1 357ddctm564 comparetotmag 1E+8 1 -> 1 358ddctm565 comparetotmag 1E+9 1 -> 1 359ddctm566 comparetotmag 1E+10 1 -> 1 360ddctm567 comparetotmag 1E+11 1 -> 1 361ddctm568 comparetotmag 1E+12 1 -> 1 362ddctm569 comparetotmag 1E+13 1 -> 1 363ddctm570 comparetotmag 1E+14 1 -> 1 364ddctm571 comparetotmag 1E+15 1 -> 1 365ddctm572 comparetotmag 1E+16 1 -> 1 366ddctm573 comparetotmag 1E+17 1 -> 1 367-- similar with a useful coefficient, one side only 368ddctm578 comparetotmag 0.000000987654321 1E-17 -> 1 369ddctm579 comparetotmag 0.000000987654321 1E-16 -> 1 370ddctm580 comparetotmag 0.000000987654321 1E-15 -> 1 371ddctm581 comparetotmag 0.000000987654321 1E-14 -> 1 372ddctm582 comparetotmag 0.000000987654321 1E-13 -> 1 373ddctm583 comparetotmag 0.000000987654321 1E-12 -> 1 374ddctm584 comparetotmag 0.000000987654321 1E-11 -> 1 375ddctm585 comparetotmag 0.000000987654321 1E-10 -> 1 376ddctm586 comparetotmag 0.000000987654321 1E-9 -> 1 377ddctm587 comparetotmag 0.000000987654321 1E-8 -> 1 378ddctm588 comparetotmag 0.000000987654321 1E-7 -> 1 379ddctm589 comparetotmag 0.000000987654321 1E-6 -> -1 380ddctm590 comparetotmag 0.000000987654321 1E-5 -> -1 381ddctm591 comparetotmag 0.000000987654321 1E-4 -> -1 382ddctm592 comparetotmag 0.000000987654321 1E-3 -> -1 383ddctm593 comparetotmag 0.000000987654321 1E-2 -> -1 384ddctm594 comparetotmag 0.000000987654321 1E-1 -> -1 385ddctm595 comparetotmag 0.000000987654321 1E-0 -> -1 386ddctm596 comparetotmag 0.000000987654321 1E+1 -> -1 387ddctm597 comparetotmag 0.000000987654321 1E+2 -> -1 388ddctm598 comparetotmag 0.000000987654321 1E+3 -> -1 389ddctm599 comparetotmag 0.000000987654321 1E+4 -> -1 390 391-- check some unit-y traps 392ddctm600 comparetotmag 12 12.2345 -> -1 393ddctm601 comparetotmag 12.0 12.2345 -> -1 394ddctm602 comparetotmag 12.00 12.2345 -> -1 395ddctm603 comparetotmag 12.000 12.2345 -> -1 396ddctm604 comparetotmag 12.0000 12.2345 -> -1 397ddctm605 comparetotmag 12.00000 12.2345 -> -1 398ddctm606 comparetotmag 12.000000 12.2345 -> -1 399ddctm607 comparetotmag 12.0000000 12.2345 -> -1 400ddctm608 comparetotmag 12.00000000 12.2345 -> -1 401ddctm609 comparetotmag 12.000000000 12.2345 -> -1 402ddctm610 comparetotmag 12.1234 12 -> 1 403ddctm611 comparetotmag 12.1234 12.0 -> 1 404ddctm612 comparetotmag 12.1234 12.00 -> 1 405ddctm613 comparetotmag 12.1234 12.000 -> 1 406ddctm614 comparetotmag 12.1234 12.0000 -> 1 407ddctm615 comparetotmag 12.1234 12.00000 -> 1 408ddctm616 comparetotmag 12.1234 12.000000 -> 1 409ddctm617 comparetotmag 12.1234 12.0000000 -> 1 410ddctm618 comparetotmag 12.1234 12.00000000 -> 1 411ddctm619 comparetotmag 12.1234 12.000000000 -> 1 412ddctm620 comparetotmag -12 -12.2345 -> -1 413ddctm621 comparetotmag -12.0 -12.2345 -> -1 414ddctm622 comparetotmag -12.00 -12.2345 -> -1 415ddctm623 comparetotmag -12.000 -12.2345 -> -1 416ddctm624 comparetotmag -12.0000 -12.2345 -> -1 417ddctm625 comparetotmag -12.00000 -12.2345 -> -1 418ddctm626 comparetotmag -12.000000 -12.2345 -> -1 419ddctm627 comparetotmag -12.0000000 -12.2345 -> -1 420ddctm628 comparetotmag -12.00000000 -12.2345 -> -1 421ddctm629 comparetotmag -12.000000000 -12.2345 -> -1 422ddctm630 comparetotmag -12.1234 -12 -> 1 423ddctm631 comparetotmag -12.1234 -12.0 -> 1 424ddctm632 comparetotmag -12.1234 -12.00 -> 1 425ddctm633 comparetotmag -12.1234 -12.000 -> 1 426ddctm634 comparetotmag -12.1234 -12.0000 -> 1 427ddctm635 comparetotmag -12.1234 -12.00000 -> 1 428ddctm636 comparetotmag -12.1234 -12.000000 -> 1 429ddctm637 comparetotmag -12.1234 -12.0000000 -> 1 430ddctm638 comparetotmag -12.1234 -12.00000000 -> 1 431ddctm639 comparetotmag -12.1234 -12.000000000 -> 1 432 433-- extended zeros 434ddctm640 comparetotmag 0 0 -> 0 435ddctm641 comparetotmag 0 -0 -> 0 436ddctm642 comparetotmag 0 -0.0 -> 1 437ddctm643 comparetotmag 0 0.0 -> 1 438ddctm644 comparetotmag -0 0 -> 0 439ddctm645 comparetotmag -0 -0 -> 0 440ddctm646 comparetotmag -0 -0.0 -> 1 441ddctm647 comparetotmag -0 0.0 -> 1 442ddctm648 comparetotmag 0.0 0 -> -1 443ddctm649 comparetotmag 0.0 -0 -> -1 444ddctm650 comparetotmag 0.0 -0.0 -> 0 445ddctm651 comparetotmag 0.0 0.0 -> 0 446ddctm652 comparetotmag -0.0 0 -> -1 447ddctm653 comparetotmag -0.0 -0 -> -1 448ddctm654 comparetotmag -0.0 -0.0 -> 0 449ddctm655 comparetotmag -0.0 0.0 -> 0 450 451ddctm656 comparetotmag -0E1 0.0 -> 1 452ddctm657 comparetotmag -0E2 0.0 -> 1 453ddctm658 comparetotmag 0E1 0.0 -> 1 454ddctm659 comparetotmag 0E2 0.0 -> 1 455ddctm660 comparetotmag -0E1 0 -> 1 456ddctm661 comparetotmag -0E2 0 -> 1 457ddctm662 comparetotmag 0E1 0 -> 1 458ddctm663 comparetotmag 0E2 0 -> 1 459ddctm664 comparetotmag -0E1 -0E1 -> 0 460ddctm665 comparetotmag -0E2 -0E1 -> 1 461ddctm666 comparetotmag 0E1 -0E1 -> 0 462ddctm667 comparetotmag 0E2 -0E1 -> 1 463ddctm668 comparetotmag -0E1 -0E2 -> -1 464ddctm669 comparetotmag -0E2 -0E2 -> 0 465ddctm670 comparetotmag 0E1 -0E2 -> -1 466ddctm671 comparetotmag 0E2 -0E2 -> 0 467ddctm672 comparetotmag -0E1 0E1 -> 0 468ddctm673 comparetotmag -0E2 0E1 -> 1 469ddctm674 comparetotmag 0E1 0E1 -> 0 470ddctm675 comparetotmag 0E2 0E1 -> 1 471ddctm676 comparetotmag -0E1 0E2 -> -1 472ddctm677 comparetotmag -0E2 0E2 -> 0 473ddctm678 comparetotmag 0E1 0E2 -> -1 474ddctm679 comparetotmag 0E2 0E2 -> 0 475 476-- trailing zeros; unit-y 477ddctm680 comparetotmag 12 12 -> 0 478ddctm681 comparetotmag 12 12.0 -> 1 479ddctm682 comparetotmag 12 12.00 -> 1 480ddctm683 comparetotmag 12 12.000 -> 1 481ddctm684 comparetotmag 12 12.0000 -> 1 482ddctm685 comparetotmag 12 12.00000 -> 1 483ddctm686 comparetotmag 12 12.000000 -> 1 484ddctm687 comparetotmag 12 12.0000000 -> 1 485ddctm688 comparetotmag 12 12.00000000 -> 1 486ddctm689 comparetotmag 12 12.000000000 -> 1 487ddctm690 comparetotmag 12 12 -> 0 488ddctm691 comparetotmag 12.0 12 -> -1 489ddctm692 comparetotmag 12.00 12 -> -1 490ddctm693 comparetotmag 12.000 12 -> -1 491ddctm694 comparetotmag 12.0000 12 -> -1 492ddctm695 comparetotmag 12.00000 12 -> -1 493ddctm696 comparetotmag 12.000000 12 -> -1 494ddctm697 comparetotmag 12.0000000 12 -> -1 495ddctm698 comparetotmag 12.00000000 12 -> -1 496ddctm699 comparetotmag 12.000000000 12 -> -1 497 498-- old long operand checks 499ddctm701 comparetotmag 12345678000 1 -> 1 500ddctm702 comparetotmag 1 12345678000 -> -1 501ddctm703 comparetotmag 1234567800 1 -> 1 502ddctm704 comparetotmag 1 1234567800 -> -1 503ddctm705 comparetotmag 1234567890 1 -> 1 504ddctm706 comparetotmag 1 1234567890 -> -1 505ddctm707 comparetotmag 1234567891 1 -> 1 506ddctm708 comparetotmag 1 1234567891 -> -1 507ddctm709 comparetotmag 12345678901 1 -> 1 508ddctm710 comparetotmag 1 12345678901 -> -1 509ddctm711 comparetotmag 1234567896 1 -> 1 510ddctm712 comparetotmag 1 1234567896 -> -1 511ddctm713 comparetotmag -1234567891 1 -> 1 512ddctm714 comparetotmag 1 -1234567891 -> -1 513ddctm715 comparetotmag -12345678901 1 -> 1 514ddctm716 comparetotmag 1 -12345678901 -> -1 515ddctm717 comparetotmag -1234567896 1 -> 1 516ddctm718 comparetotmag 1 -1234567896 -> -1 517 518-- old residue cases 519ddctm740 comparetotmag 1 0.9999999 -> 1 520ddctm741 comparetotmag 1 0.999999 -> 1 521ddctm742 comparetotmag 1 0.99999 -> 1 522ddctm743 comparetotmag 1 1.0000 -> 1 523ddctm744 comparetotmag 1 1.00001 -> -1 524ddctm745 comparetotmag 1 1.000001 -> -1 525ddctm746 comparetotmag 1 1.0000001 -> -1 526ddctm750 comparetotmag 0.9999999 1 -> -1 527ddctm751 comparetotmag 0.999999 1 -> -1 528ddctm752 comparetotmag 0.99999 1 -> -1 529ddctm753 comparetotmag 1.0000 1 -> -1 530ddctm754 comparetotmag 1.00001 1 -> 1 531ddctm755 comparetotmag 1.000001 1 -> 1 532ddctm756 comparetotmag 1.0000001 1 -> 1 533 534-- Specials 535ddctm780 comparetotmag Inf -Inf -> 0 536ddctm781 comparetotmag Inf -1000 -> 1 537ddctm782 comparetotmag Inf -1 -> 1 538ddctm783 comparetotmag Inf -0 -> 1 539ddctm784 comparetotmag Inf 0 -> 1 540ddctm785 comparetotmag Inf 1 -> 1 541ddctm786 comparetotmag Inf 1000 -> 1 542ddctm787 comparetotmag Inf Inf -> 0 543ddctm788 comparetotmag -1000 Inf -> -1 544ddctm789 comparetotmag -Inf Inf -> 0 545ddctm790 comparetotmag -1 Inf -> -1 546ddctm791 comparetotmag -0 Inf -> -1 547ddctm792 comparetotmag 0 Inf -> -1 548ddctm793 comparetotmag 1 Inf -> -1 549ddctm794 comparetotmag 1000 Inf -> -1 550ddctm795 comparetotmag Inf Inf -> 0 551 552ddctm800 comparetotmag -Inf -Inf -> 0 553ddctm801 comparetotmag -Inf -1000 -> 1 554ddctm802 comparetotmag -Inf -1 -> 1 555ddctm803 comparetotmag -Inf -0 -> 1 556ddctm804 comparetotmag -Inf 0 -> 1 557ddctm805 comparetotmag -Inf 1 -> 1 558ddctm806 comparetotmag -Inf 1000 -> 1 559ddctm807 comparetotmag -Inf Inf -> 0 560ddctm808 comparetotmag -Inf -Inf -> 0 561ddctm809 comparetotmag -1000 -Inf -> -1 562ddctm810 comparetotmag -1 -Inf -> -1 563ddctm811 comparetotmag -0 -Inf -> -1 564ddctm812 comparetotmag 0 -Inf -> -1 565ddctm813 comparetotmag 1 -Inf -> -1 566ddctm814 comparetotmag 1000 -Inf -> -1 567ddctm815 comparetotmag Inf -Inf -> 0 568 569ddctm821 comparetotmag NaN -Inf -> 1 570ddctm822 comparetotmag NaN -1000 -> 1 571ddctm823 comparetotmag NaN -1 -> 1 572ddctm824 comparetotmag NaN -0 -> 1 573ddctm825 comparetotmag NaN 0 -> 1 574ddctm826 comparetotmag NaN 1 -> 1 575ddctm827 comparetotmag NaN 1000 -> 1 576ddctm828 comparetotmag NaN Inf -> 1 577ddctm829 comparetotmag NaN NaN -> 0 578ddctm830 comparetotmag -Inf NaN -> -1 579ddctm831 comparetotmag -1000 NaN -> -1 580ddctm832 comparetotmag -1 NaN -> -1 581ddctm833 comparetotmag -0 NaN -> -1 582ddctm834 comparetotmag 0 NaN -> -1 583ddctm835 comparetotmag 1 NaN -> -1 584ddctm836 comparetotmag 1000 NaN -> -1 585ddctm837 comparetotmag Inf NaN -> -1 586ddctm838 comparetotmag -NaN -NaN -> 0 587ddctm839 comparetotmag +NaN -NaN -> 0 588ddctm840 comparetotmag -NaN +NaN -> 0 589 590ddctm841 comparetotmag sNaN -sNaN -> 0 591ddctm842 comparetotmag sNaN -NaN -> -1 592ddctm843 comparetotmag sNaN -Inf -> 1 593ddctm844 comparetotmag sNaN -1000 -> 1 594ddctm845 comparetotmag sNaN -1 -> 1 595ddctm846 comparetotmag sNaN -0 -> 1 596ddctm847 comparetotmag sNaN 0 -> 1 597ddctm848 comparetotmag sNaN 1 -> 1 598ddctm849 comparetotmag sNaN 1000 -> 1 599ddctm850 comparetotmag sNaN NaN -> -1 600ddctm851 comparetotmag sNaN sNaN -> 0 601 602ddctm852 comparetotmag -sNaN sNaN -> 0 603ddctm853 comparetotmag -NaN sNaN -> 1 604ddctm854 comparetotmag -Inf sNaN -> -1 605ddctm855 comparetotmag -1000 sNaN -> -1 606ddctm856 comparetotmag -1 sNaN -> -1 607ddctm857 comparetotmag -0 sNaN -> -1 608ddctm858 comparetotmag 0 sNaN -> -1 609ddctm859 comparetotmag 1 sNaN -> -1 610ddctm860 comparetotmag 1000 sNaN -> -1 611ddctm861 comparetotmag Inf sNaN -> -1 612ddctm862 comparetotmag NaN sNaN -> 1 613ddctm863 comparetotmag sNaN sNaN -> 0 614 615ddctm871 comparetotmag -sNaN -sNaN -> 0 616ddctm872 comparetotmag -sNaN -NaN -> -1 617ddctm873 comparetotmag -sNaN -Inf -> 1 618ddctm874 comparetotmag -sNaN -1000 -> 1 619ddctm875 comparetotmag -sNaN -1 -> 1 620ddctm876 comparetotmag -sNaN -0 -> 1 621ddctm877 comparetotmag -sNaN 0 -> 1 622ddctm878 comparetotmag -sNaN 1 -> 1 623ddctm879 comparetotmag -sNaN 1000 -> 1 624ddctm880 comparetotmag -sNaN NaN -> -1 625ddctm881 comparetotmag -sNaN sNaN -> 0 626 627ddctm882 comparetotmag -sNaN -sNaN -> 0 628ddctm883 comparetotmag -NaN -sNaN -> 1 629ddctm884 comparetotmag -Inf -sNaN -> -1 630ddctm885 comparetotmag -1000 -sNaN -> -1 631ddctm886 comparetotmag -1 -sNaN -> -1 632ddctm887 comparetotmag -0 -sNaN -> -1 633ddctm888 comparetotmag 0 -sNaN -> -1 634ddctm889 comparetotmag 1 -sNaN -> -1 635ddctm890 comparetotmag 1000 -sNaN -> -1 636ddctm891 comparetotmag Inf -sNaN -> -1 637ddctm892 comparetotmag NaN -sNaN -> 1 638ddctm893 comparetotmag sNaN -sNaN -> 0 639 640-- NaNs with payload 641ddctm960 comparetotmag NaN9 -Inf -> 1 642ddctm961 comparetotmag NaN8 999 -> 1 643ddctm962 comparetotmag NaN77 Inf -> 1 644ddctm963 comparetotmag -NaN67 NaN5 -> 1 645ddctm964 comparetotmag -Inf -NaN4 -> -1 646ddctm965 comparetotmag -999 -NaN33 -> -1 647ddctm966 comparetotmag Inf NaN2 -> -1 648 649ddctm970 comparetotmag -NaN41 -NaN42 -> -1 650ddctm971 comparetotmag +NaN41 -NaN42 -> -1 651ddctm972 comparetotmag -NaN41 +NaN42 -> -1 652ddctm973 comparetotmag +NaN41 +NaN42 -> -1 653ddctm974 comparetotmag -NaN42 -NaN01 -> 1 654ddctm975 comparetotmag +NaN42 -NaN01 -> 1 655ddctm976 comparetotmag -NaN42 +NaN01 -> 1 656ddctm977 comparetotmag +NaN42 +NaN01 -> 1 657 658ddctm980 comparetotmag -sNaN771 -sNaN772 -> -1 659ddctm981 comparetotmag +sNaN771 -sNaN772 -> -1 660ddctm982 comparetotmag -sNaN771 +sNaN772 -> -1 661ddctm983 comparetotmag +sNaN771 +sNaN772 -> -1 662ddctm984 comparetotmag -sNaN772 -sNaN771 -> 1 663ddctm985 comparetotmag +sNaN772 -sNaN771 -> 1 664ddctm986 comparetotmag -sNaN772 +sNaN771 -> 1 665ddctm987 comparetotmag +sNaN772 +sNaN771 -> 1 666 667ddctm991 comparetotmag -sNaN99 -Inf -> 1 668ddctm992 comparetotmag sNaN98 -11 -> 1 669ddctm993 comparetotmag sNaN97 NaN -> -1 670ddctm994 comparetotmag sNaN16 sNaN94 -> -1 671ddctm995 comparetotmag NaN85 sNaN83 -> 1 672ddctm996 comparetotmag -Inf sNaN92 -> -1 673ddctm997 comparetotmag 088 sNaN81 -> -1 674ddctm998 comparetotmag Inf sNaN90 -> -1 675ddctm999 comparetotmag NaN -sNaN89 -> 1 676 677-- spread zeros 678ddctm1110 comparetotmag 0E-383 0 -> -1 679ddctm1111 comparetotmag 0E-383 -0 -> -1 680ddctm1112 comparetotmag -0E-383 0 -> -1 681ddctm1113 comparetotmag -0E-383 -0 -> -1 682ddctm1114 comparetotmag 0E-383 0E+384 -> -1 683ddctm1115 comparetotmag 0E-383 -0E+384 -> -1 684ddctm1116 comparetotmag -0E-383 0E+384 -> -1 685ddctm1117 comparetotmag -0E-383 -0E+384 -> -1 686ddctm1118 comparetotmag 0 0E+384 -> -1 687ddctm1119 comparetotmag 0 -0E+384 -> -1 688ddctm1120 comparetotmag -0 0E+384 -> -1 689ddctm1121 comparetotmag -0 -0E+384 -> -1 690 691ddctm1130 comparetotmag 0E+384 0 -> 1 692ddctm1131 comparetotmag 0E+384 -0 -> 1 693ddctm1132 comparetotmag -0E+384 0 -> 1 694ddctm1133 comparetotmag -0E+384 -0 -> 1 695ddctm1134 comparetotmag 0E+384 0E-383 -> 1 696ddctm1135 comparetotmag 0E+384 -0E-383 -> 1 697ddctm1136 comparetotmag -0E+384 0E-383 -> 1 698ddctm1137 comparetotmag -0E+384 -0E-383 -> 1 699ddctm1138 comparetotmag 0 0E-383 -> 1 700ddctm1139 comparetotmag 0 -0E-383 -> 1 701ddctm1140 comparetotmag -0 0E-383 -> 1 702ddctm1141 comparetotmag -0 -0E-383 -> 1 703 704-- Null tests 705ddctm9990 comparetotmag 10 # -> NaN Invalid_operation 706ddctm9991 comparetotmag # 10 -> NaN Invalid_operation 707