Repository URL to install this package:
------------------------------------------------------------------------
-- ddCompareSig.decTest -- decDouble comparison; all NaNs signal --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Note that we cannot assume add/subtract tests cover paths adequately,
-- here, because the code might be quite different (comparison cannot
-- overflow or underflow, so actual subtractions are not necessary).
-- All operands and results are decDoubles.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
-- sanity checks
ddcms001 comparesig -2 -2 -> 0
ddcms002 comparesig -2 -1 -> -1
ddcms003 comparesig -2 0 -> -1
ddcms004 comparesig -2 1 -> -1
ddcms005 comparesig -2 2 -> -1
ddcms006 comparesig -1 -2 -> 1
ddcms007 comparesig -1 -1 -> 0
ddcms008 comparesig -1 0 -> -1
ddcms009 comparesig -1 1 -> -1
ddcms010 comparesig -1 2 -> -1
ddcms011 comparesig 0 -2 -> 1
ddcms012 comparesig 0 -1 -> 1
ddcms013 comparesig 0 0 -> 0
ddcms014 comparesig 0 1 -> -1
ddcms015 comparesig 0 2 -> -1
ddcms016 comparesig 1 -2 -> 1
ddcms017 comparesig 1 -1 -> 1
ddcms018 comparesig 1 0 -> 1
ddcms019 comparesig 1 1 -> 0
ddcms020 comparesig 1 2 -> -1
ddcms021 comparesig 2 -2 -> 1
ddcms022 comparesig 2 -1 -> 1
ddcms023 comparesig 2 0 -> 1
ddcms025 comparesig 2 1 -> 1
ddcms026 comparesig 2 2 -> 0
ddcms031 comparesig -20 -20 -> 0
ddcms032 comparesig -20 -10 -> -1
ddcms033 comparesig -20 00 -> -1
ddcms034 comparesig -20 10 -> -1
ddcms035 comparesig -20 20 -> -1
ddcms036 comparesig -10 -20 -> 1
ddcms037 comparesig -10 -10 -> 0
ddcms038 comparesig -10 00 -> -1
ddcms039 comparesig -10 10 -> -1
ddcms040 comparesig -10 20 -> -1
ddcms041 comparesig 00 -20 -> 1
ddcms042 comparesig 00 -10 -> 1
ddcms043 comparesig 00 00 -> 0
ddcms044 comparesig 00 10 -> -1
ddcms045 comparesig 00 20 -> -1
ddcms046 comparesig 10 -20 -> 1
ddcms047 comparesig 10 -10 -> 1
ddcms048 comparesig 10 00 -> 1
ddcms049 comparesig 10 10 -> 0
ddcms050 comparesig 10 20 -> -1
ddcms051 comparesig 20 -20 -> 1
ddcms052 comparesig 20 -10 -> 1
ddcms053 comparesig 20 00 -> 1
ddcms055 comparesig 20 10 -> 1
ddcms056 comparesig 20 20 -> 0
ddcms061 comparesig -2.0 -2.0 -> 0
ddcms062 comparesig -2.0 -1.0 -> -1
ddcms063 comparesig -2.0 0.0 -> -1
ddcms064 comparesig -2.0 1.0 -> -1
ddcms065 comparesig -2.0 2.0 -> -1
ddcms066 comparesig -1.0 -2.0 -> 1
ddcms067 comparesig -1.0 -1.0 -> 0
ddcms068 comparesig -1.0 0.0 -> -1
ddcms069 comparesig -1.0 1.0 -> -1
ddcms070 comparesig -1.0 2.0 -> -1
ddcms071 comparesig 0.0 -2.0 -> 1
ddcms072 comparesig 0.0 -1.0 -> 1
ddcms073 comparesig 0.0 0.0 -> 0
ddcms074 comparesig 0.0 1.0 -> -1
ddcms075 comparesig 0.0 2.0 -> -1
ddcms076 comparesig 1.0 -2.0 -> 1
ddcms077 comparesig 1.0 -1.0 -> 1
ddcms078 comparesig 1.0 0.0 -> 1
ddcms079 comparesig 1.0 1.0 -> 0
ddcms080 comparesig 1.0 2.0 -> -1
ddcms081 comparesig 2.0 -2.0 -> 1
ddcms082 comparesig 2.0 -1.0 -> 1
ddcms083 comparesig 2.0 0.0 -> 1
ddcms085 comparesig 2.0 1.0 -> 1
ddcms086 comparesig 2.0 2.0 -> 0
-- now some cases which might overflow if subtract were used
ddcms090 comparesig 9.999999999999999E+384 9.999999999999999E+384 -> 0
ddcms091 comparesig -9.999999999999999E+384 9.999999999999999E+384 -> -1
ddcms092 comparesig 9.999999999999999E+384 -9.999999999999999E+384 -> 1
ddcms093 comparesig -9.999999999999999E+384 -9.999999999999999E+384 -> 0
-- some differing length/exponent cases
ddcms100 comparesig 7.0 7.0 -> 0
ddcms101 comparesig 7.0 7 -> 0
ddcms102 comparesig 7 7.0 -> 0
ddcms103 comparesig 7E+0 7.0 -> 0
ddcms104 comparesig 70E-1 7.0 -> 0
ddcms105 comparesig 0.7E+1 7 -> 0
ddcms106 comparesig 70E-1 7 -> 0
ddcms107 comparesig 7.0 7E+0 -> 0
ddcms108 comparesig 7.0 70E-1 -> 0
ddcms109 comparesig 7 0.7E+1 -> 0
ddcms110 comparesig 7 70E-1 -> 0
ddcms120 comparesig 8.0 7.0 -> 1
ddcms121 comparesig 8.0 7 -> 1
ddcms122 comparesig 8 7.0 -> 1
ddcms123 comparesig 8E+0 7.0 -> 1
ddcms124 comparesig 80E-1 7.0 -> 1
ddcms125 comparesig 0.8E+1 7 -> 1
ddcms126 comparesig 80E-1 7 -> 1
ddcms127 comparesig 8.0 7E+0 -> 1
ddcms128 comparesig 8.0 70E-1 -> 1
ddcms129 comparesig 8 0.7E+1 -> 1
ddcms130 comparesig 8 70E-1 -> 1
ddcms140 comparesig 8.0 9.0 -> -1
ddcms141 comparesig 8.0 9 -> -1
ddcms142 comparesig 8 9.0 -> -1
ddcms143 comparesig 8E+0 9.0 -> -1
ddcms144 comparesig 80E-1 9.0 -> -1
ddcms145 comparesig 0.8E+1 9 -> -1
ddcms146 comparesig 80E-1 9 -> -1
ddcms147 comparesig 8.0 9E+0 -> -1
ddcms148 comparesig 8.0 90E-1 -> -1
ddcms149 comparesig 8 0.9E+1 -> -1
ddcms150 comparesig 8 90E-1 -> -1
-- and again, with sign changes -+ ..
ddcms200 comparesig -7.0 7.0 -> -1
ddcms201 comparesig -7.0 7 -> -1
ddcms202 comparesig -7 7.0 -> -1
ddcms203 comparesig -7E+0 7.0 -> -1
ddcms204 comparesig -70E-1 7.0 -> -1
ddcms205 comparesig -0.7E+1 7 -> -1
ddcms206 comparesig -70E-1 7 -> -1
ddcms207 comparesig -7.0 7E+0 -> -1
ddcms208 comparesig -7.0 70E-1 -> -1
ddcms209 comparesig -7 0.7E+1 -> -1
ddcms210 comparesig -7 70E-1 -> -1
ddcms220 comparesig -8.0 7.0 -> -1
ddcms221 comparesig -8.0 7 -> -1
ddcms222 comparesig -8 7.0 -> -1
ddcms223 comparesig -8E+0 7.0 -> -1
ddcms224 comparesig -80E-1 7.0 -> -1
ddcms225 comparesig -0.8E+1 7 -> -1
ddcms226 comparesig -80E-1 7 -> -1
ddcms227 comparesig -8.0 7E+0 -> -1
ddcms228 comparesig -8.0 70E-1 -> -1
ddcms229 comparesig -8 0.7E+1 -> -1
ddcms230 comparesig -8 70E-1 -> -1
ddcms240 comparesig -8.0 9.0 -> -1
ddcms241 comparesig -8.0 9 -> -1
ddcms242 comparesig -8 9.0 -> -1
ddcms243 comparesig -8E+0 9.0 -> -1
ddcms244 comparesig -80E-1 9.0 -> -1
ddcms245 comparesig -0.8E+1 9 -> -1
ddcms246 comparesig -80E-1 9 -> -1
ddcms247 comparesig -8.0 9E+0 -> -1
ddcms248 comparesig -8.0 90E-1 -> -1
ddcms249 comparesig -8 0.9E+1 -> -1
ddcms250 comparesig -8 90E-1 -> -1
-- and again, with sign changes +- ..
ddcms300 comparesig 7.0 -7.0 -> 1
ddcms301 comparesig 7.0 -7 -> 1
ddcms302 comparesig 7 -7.0 -> 1
ddcms303 comparesig 7E+0 -7.0 -> 1
ddcms304 comparesig 70E-1 -7.0 -> 1
ddcms305 comparesig .7E+1 -7 -> 1
ddcms306 comparesig 70E-1 -7 -> 1
ddcms307 comparesig 7.0 -7E+0 -> 1
ddcms308 comparesig 7.0 -70E-1 -> 1
ddcms309 comparesig 7 -.7E+1 -> 1
ddcms310 comparesig 7 -70E-1 -> 1
ddcms320 comparesig 8.0 -7.0 -> 1
ddcms321 comparesig 8.0 -7 -> 1
ddcms322 comparesig 8 -7.0 -> 1
ddcms323 comparesig 8E+0 -7.0 -> 1
ddcms324 comparesig 80E-1 -7.0 -> 1
ddcms325 comparesig .8E+1 -7 -> 1
ddcms326 comparesig 80E-1 -7 -> 1
ddcms327 comparesig 8.0 -7E+0 -> 1
ddcms328 comparesig 8.0 -70E-1 -> 1
ddcms329 comparesig 8 -.7E+1 -> 1
ddcms330 comparesig 8 -70E-1 -> 1
ddcms340 comparesig 8.0 -9.0 -> 1
ddcms341 comparesig 8.0 -9 -> 1
ddcms342 comparesig 8 -9.0 -> 1
ddcms343 comparesig 8E+0 -9.0 -> 1
ddcms344 comparesig 80E-1 -9.0 -> 1
ddcms345 comparesig .8E+1 -9 -> 1
ddcms346 comparesig 80E-1 -9 -> 1
ddcms347 comparesig 8.0 -9E+0 -> 1
ddcms348 comparesig 8.0 -90E-1 -> 1
ddcms349 comparesig 8 -.9E+1 -> 1
ddcms350 comparesig 8 -90E-1 -> 1
-- and again, with sign changes -- ..
ddcms400 comparesig -7.0 -7.0 -> 0
ddcms401 comparesig -7.0 -7 -> 0
ddcms402 comparesig -7 -7.0 -> 0
ddcms403 comparesig -7E+0 -7.0 -> 0
ddcms404 comparesig -70E-1 -7.0 -> 0
ddcms405 comparesig -.7E+1 -7 -> 0
ddcms406 comparesig -70E-1 -7 -> 0
ddcms407 comparesig -7.0 -7E+0 -> 0
ddcms408 comparesig -7.0 -70E-1 -> 0
ddcms409 comparesig -7 -.7E+1 -> 0
ddcms410 comparesig -7 -70E-1 -> 0
ddcms420 comparesig -8.0 -7.0 -> -1
ddcms421 comparesig -8.0 -7 -> -1
ddcms422 comparesig -8 -7.0 -> -1
ddcms423 comparesig -8E+0 -7.0 -> -1
ddcms424 comparesig -80E-1 -7.0 -> -1
ddcms425 comparesig -.8E+1 -7 -> -1
ddcms426 comparesig -80E-1 -7 -> -1
ddcms427 comparesig -8.0 -7E+0 -> -1
ddcms428 comparesig -8.0 -70E-1 -> -1
ddcms429 comparesig -8 -.7E+1 -> -1
ddcms430 comparesig -8 -70E-1 -> -1
ddcms440 comparesig -8.0 -9.0 -> 1
ddcms441 comparesig -8.0 -9 -> 1
ddcms442 comparesig -8 -9.0 -> 1
ddcms443 comparesig -8E+0 -9.0 -> 1
ddcms444 comparesig -80E-1 -9.0 -> 1
ddcms445 comparesig -.8E+1 -9 -> 1
ddcms446 comparesig -80E-1 -9 -> 1
ddcms447 comparesig -8.0 -9E+0 -> 1
ddcms448 comparesig -8.0 -90E-1 -> 1
ddcms449 comparesig -8 -.9E+1 -> 1
ddcms450 comparesig -8 -90E-1 -> 1
-- testcases that subtract to lots of zeros at boundaries [pgr]
ddcms473 comparesig 123.4560000000000E-89 123.456E-89 -> 0
ddcms474 comparesig 123.456000000000E+89 123.456E+89 -> 0
ddcms475 comparesig 123.45600000000E-89 123.456E-89 -> 0
ddcms476 comparesig 123.4560000000E+89 123.456E+89 -> 0
ddcms477 comparesig 123.456000000E-89 123.456E-89 -> 0
ddcms478 comparesig 123.45600000E+89 123.456E+89 -> 0
ddcms479 comparesig 123.4560000E-89 123.456E-89 -> 0
ddcms480 comparesig 123.456000E+89 123.456E+89 -> 0
ddcms481 comparesig 123.45600E-89 123.456E-89 -> 0
ddcms482 comparesig 123.4560E+89 123.456E+89 -> 0
ddcms483 comparesig 123.456E-89 123.456E-89 -> 0
ddcms487 comparesig 123.456E+89 123.4560000000000E+89 -> 0
ddcms488 comparesig 123.456E-89 123.456000000000E-89 -> 0
ddcms489 comparesig 123.456E+89 123.45600000000E+89 -> 0
ddcms490 comparesig 123.456E-89 123.4560000000E-89 -> 0
ddcms491 comparesig 123.456E+89 123.456000000E+89 -> 0
ddcms492 comparesig 123.456E-89 123.45600000E-89 -> 0
ddcms493 comparesig 123.456E+89 123.4560000E+89 -> 0
ddcms494 comparesig 123.456E-89 123.456000E-89 -> 0
ddcms495 comparesig 123.456E+89 123.45600E+89 -> 0
ddcms496 comparesig 123.456E-89 123.4560E-89 -> 0
ddcms497 comparesig 123.456E+89 123.456E+89 -> 0
-- wide-ranging, around precision; signs equal
ddcms500 comparesig 1 1E-15 -> 1
ddcms501 comparesig 1 1E-14 -> 1
ddcms502 comparesig 1 1E-13 -> 1
ddcms503 comparesig 1 1E-12 -> 1
ddcms504 comparesig 1 1E-11 -> 1
ddcms505 comparesig 1 1E-10 -> 1
ddcms506 comparesig 1 1E-9 -> 1
ddcms507 comparesig 1 1E-8 -> 1
ddcms508 comparesig 1 1E-7 -> 1
ddcms509 comparesig 1 1E-6 -> 1
ddcms510 comparesig 1 1E-5 -> 1
ddcms511 comparesig 1 1E-4 -> 1
ddcms512 comparesig 1 1E-3 -> 1
ddcms513 comparesig 1 1E-2 -> 1
ddcms514 comparesig 1 1E-1 -> 1
ddcms515 comparesig 1 1E-0 -> 0
ddcms516 comparesig 1 1E+1 -> -1
ddcms517 comparesig 1 1E+2 -> -1
ddcms518 comparesig 1 1E+3 -> -1
ddcms519 comparesig 1 1E+4 -> -1
ddcms521 comparesig 1 1E+5 -> -1
ddcms522 comparesig 1 1E+6 -> -1
ddcms523 comparesig 1 1E+7 -> -1
ddcms524 comparesig 1 1E+8 -> -1
ddcms525 comparesig 1 1E+9 -> -1
ddcms526 comparesig 1 1E+10 -> -1
ddcms527 comparesig 1 1E+11 -> -1
ddcms528 comparesig 1 1E+12 -> -1
ddcms529 comparesig 1 1E+13 -> -1
ddcms530 comparesig 1 1E+14 -> -1
ddcms531 comparesig 1 1E+15 -> -1
-- LR swap
ddcms540 comparesig 1E-15 1 -> -1
ddcms541 comparesig 1E-14 1 -> -1
ddcms542 comparesig 1E-13 1 -> -1
ddcms543 comparesig 1E-12 1 -> -1
ddcms544 comparesig 1E-11 1 -> -1
ddcms545 comparesig 1E-10 1 -> -1
ddcms546 comparesig 1E-9 1 -> -1
ddcms547 comparesig 1E-8 1 -> -1
ddcms548 comparesig 1E-7 1 -> -1
ddcms549 comparesig 1E-6 1 -> -1
ddcms550 comparesig 1E-5 1 -> -1
ddcms551 comparesig 1E-4 1 -> -1
ddcms552 comparesig 1E-3 1 -> -1
ddcms553 comparesig 1E-2 1 -> -1
ddcms554 comparesig 1E-1 1 -> -1
ddcms555 comparesig 1E-0 1 -> 0
ddcms556 comparesig 1E+1 1 -> 1
ddcms557 comparesig 1E+2 1 -> 1
ddcms558 comparesig 1E+3 1 -> 1
ddcms559 comparesig 1E+4 1 -> 1
ddcms561 comparesig 1E+5 1 -> 1
Loading ...