1 ------------------------------------------------------------------------ 2 -- dqNextMinus.decTest -- decQuad next that is less [754r nextdown] -- 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 (a] uk.ibm.com -- 19 ------------------------------------------------------------------------ 20 version: 2.59 21 22 -- All operands and results are decQuads. 23 extended: 1 24 clamp: 1 25 precision: 34 26 maxExponent: 6144 27 minExponent: -6143 28 rounding: half_even 29 30 dqnextm001 nextminus 0.9999999999999999999999999999999995 -> 0.9999999999999999999999999999999994 31 dqnextm002 nextminus 0.9999999999999999999999999999999996 -> 0.9999999999999999999999999999999995 32 dqnextm003 nextminus 0.9999999999999999999999999999999997 -> 0.9999999999999999999999999999999996 33 dqnextm004 nextminus 0.9999999999999999999999999999999998 -> 0.9999999999999999999999999999999997 34 dqnextm005 nextminus 0.9999999999999999999999999999999999 -> 0.9999999999999999999999999999999998 35 dqnextm006 nextminus 1.000000000000000000000000000000000 -> 0.9999999999999999999999999999999999 36 dqnextm007 nextminus 1.0 -> 0.9999999999999999999999999999999999 37 dqnextm008 nextminus 1 -> 0.9999999999999999999999999999999999 38 dqnextm009 nextminus 1.000000000000000000000000000000001 -> 1.000000000000000000000000000000000 39 dqnextm010 nextminus 1.000000000000000000000000000000002 -> 1.000000000000000000000000000000001 40 dqnextm011 nextminus 1.000000000000000000000000000000003 -> 1.000000000000000000000000000000002 41 dqnextm012 nextminus 1.000000000000000000000000000000004 -> 1.000000000000000000000000000000003 42 dqnextm013 nextminus 1.000000000000000000000000000000005 -> 1.000000000000000000000000000000004 43 dqnextm014 nextminus 1.000000000000000000000000000000006 -> 1.000000000000000000000000000000005 44 dqnextm015 nextminus 1.000000000000000000000000000000007 -> 1.000000000000000000000000000000006 45 dqnextm016 nextminus 1.000000000000000000000000000000008 -> 1.000000000000000000000000000000007 46 dqnextm017 nextminus 1.000000000000000000000000000000009 -> 1.000000000000000000000000000000008 47 dqnextm018 nextminus 1.000000000000000000000000000000010 -> 1.000000000000000000000000000000009 48 dqnextm019 nextminus 1.000000000000000000000000000000011 -> 1.000000000000000000000000000000010 49 dqnextm020 nextminus 1.000000000000000000000000000000012 -> 1.000000000000000000000000000000011 50 51 dqnextm021 nextminus -0.9999999999999999999999999999999995 -> -0.9999999999999999999999999999999996 52 dqnextm022 nextminus -0.9999999999999999999999999999999996 -> -0.9999999999999999999999999999999997 53 dqnextm023 nextminus -0.9999999999999999999999999999999997 -> -0.9999999999999999999999999999999998 54 dqnextm024 nextminus -0.9999999999999999999999999999999998 -> -0.9999999999999999999999999999999999 55 dqnextm025 nextminus -0.9999999999999999999999999999999999 -> -1.000000000000000000000000000000000 56 dqnextm026 nextminus -1.000000000000000000000000000000000 -> -1.000000000000000000000000000000001 57 dqnextm027 nextminus -1.0 -> -1.000000000000000000000000000000001 58 dqnextm028 nextminus -1 -> -1.000000000000000000000000000000001 59 dqnextm029 nextminus -1.000000000000000000000000000000001 -> -1.000000000000000000000000000000002 60 dqnextm030 nextminus -1.000000000000000000000000000000002 -> -1.000000000000000000000000000000003 61 dqnextm031 nextminus -1.000000000000000000000000000000003 -> -1.000000000000000000000000000000004 62 dqnextm032 nextminus -1.000000000000000000000000000000004 -> -1.000000000000000000000000000000005 63 dqnextm033 nextminus -1.000000000000000000000000000000005 -> -1.000000000000000000000000000000006 64 dqnextm034 nextminus -1.000000000000000000000000000000006 -> -1.000000000000000000000000000000007 65 dqnextm035 nextminus -1.000000000000000000000000000000007 -> -1.000000000000000000000000000000008 66 dqnextm036 nextminus -1.000000000000000000000000000000008 -> -1.000000000000000000000000000000009 67 dqnextm037 nextminus -1.000000000000000000000000000000009 -> -1.000000000000000000000000000000010 68 dqnextm038 nextminus -1.000000000000000000000000000000010 -> -1.000000000000000000000000000000011 69 dqnextm039 nextminus -1.000000000000000000000000000000011 -> -1.000000000000000000000000000000012 70 71 -- ultra-tiny inputs 72 dqnextm062 nextminus 1E-6176 -> 0E-6176 73 dqnextm065 nextminus -1E-6176 -> -2E-6176 74 75 -- Zeros 76 dqnextm100 nextminus -0 -> -1E-6176 77 dqnextm101 nextminus 0 -> -1E-6176 78 dqnextm102 nextminus 0.00 -> -1E-6176 79 dqnextm103 nextminus -0.00 -> -1E-6176 80 dqnextm104 nextminus 0E-300 -> -1E-6176 81 dqnextm105 nextminus 0E+300 -> -1E-6176 82 dqnextm106 nextminus 0E+30000 -> -1E-6176 83 dqnextm107 nextminus -0E+30000 -> -1E-6176 84 85 -- specials 86 dqnextm150 nextminus Inf -> 9.999999999999999999999999999999999E+6144 87 dqnextm151 nextminus -Inf -> -Infinity 88 dqnextm152 nextminus NaN -> NaN 89 dqnextm153 nextminus sNaN -> NaN Invalid_operation 90 dqnextm154 nextminus NaN77 -> NaN77 91 dqnextm155 nextminus sNaN88 -> NaN88 Invalid_operation 92 dqnextm156 nextminus -NaN -> -NaN 93 dqnextm157 nextminus -sNaN -> -NaN Invalid_operation 94 dqnextm158 nextminus -NaN77 -> -NaN77 95 dqnextm159 nextminus -sNaN88 -> -NaN88 Invalid_operation 96 97 -- Nmax, Nmin, Ntiny, subnormals 98 dqnextm170 nextminus 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999998E+6144 99 dqnextm171 nextminus 9.999999999999999999999999999999998E+6144 -> 9.999999999999999999999999999999997E+6144 100 dqnextm172 nextminus 1E-6143 -> 9.99999999999999999999999999999999E-6144 101 dqnextm173 nextminus 1.000000000000000000000000000000000E-6143 -> 9.99999999999999999999999999999999E-6144 102 dqnextm174 nextminus 9E-6176 -> 8E-6176 103 dqnextm175 nextminus 9.9E-6175 -> 9.8E-6175 104 dqnextm176 nextminus 9.99999999999999999999999999999E-6147 -> 9.99999999999999999999999999998E-6147 105 dqnextm177 nextminus 9.99999999999999999999999999999999E-6144 -> 9.99999999999999999999999999999998E-6144 106 dqnextm178 nextminus 9.99999999999999999999999999999998E-6144 -> 9.99999999999999999999999999999997E-6144 107 dqnextm179 nextminus 9.99999999999999999999999999999997E-6144 -> 9.99999999999999999999999999999996E-6144 108 dqnextm180 nextminus 0E-6176 -> -1E-6176 109 dqnextm181 nextminus 1E-6176 -> 0E-6176 110 dqnextm182 nextminus 2E-6176 -> 1E-6176 111 112 dqnextm183 nextminus -0E-6176 -> -1E-6176 113 dqnextm184 nextminus -1E-6176 -> -2E-6176 114 dqnextm185 nextminus -2E-6176 -> -3E-6176 115 dqnextm186 nextminus -10E-6176 -> -1.1E-6175 116 dqnextm187 nextminus -100E-6176 -> -1.01E-6174 117 dqnextm188 nextminus -100000E-6176 -> -1.00001E-6171 118 dqnextm189 nextminus -1.00000000000000000000000000000E-6143 -> -1.000000000000000000000000000000001E-6143 119 dqnextm190 nextminus -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000001E-6143 120 dqnextm191 nextminus -1E-6143 -> -1.000000000000000000000000000000001E-6143 121 dqnextm192 nextminus -9.999999999999999999999999999999998E+6144 -> -9.999999999999999999999999999999999E+6144 122 dqnextm193 nextminus -9.999999999999999999999999999999999E+6144 -> -Infinity 123 124 -- Null tests 125 dqnextm900 nextminus # -> NaN Invalid_operation 126 127