1------------------------------------------------------------------------ 2-- dqNextPlus.decTest -- decQuad next that is greater [754r nextup] -- 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-- All operands and results are decQuads. 23extended: 1 24clamp: 1 25precision: 34 26maxExponent: 6144 27minExponent: -6143 28rounding: half_even 29 30dqnextp001 nextplus 0.9999999999999999999999999999999995 -> 0.9999999999999999999999999999999996 31dqnextp002 nextplus 0.9999999999999999999999999999999996 -> 0.9999999999999999999999999999999997 32dqnextp003 nextplus 0.9999999999999999999999999999999997 -> 0.9999999999999999999999999999999998 33dqnextp004 nextplus 0.9999999999999999999999999999999998 -> 0.9999999999999999999999999999999999 34dqnextp005 nextplus 0.9999999999999999999999999999999999 -> 1.000000000000000000000000000000000 35dqnextp006 nextplus 1.000000000000000000000000000000000 -> 1.000000000000000000000000000000001 36dqnextp007 nextplus 1.0 -> 1.000000000000000000000000000000001 37dqnextp008 nextplus 1 -> 1.000000000000000000000000000000001 38dqnextp009 nextplus 1.000000000000000000000000000000001 -> 1.000000000000000000000000000000002 39dqnextp010 nextplus 1.000000000000000000000000000000002 -> 1.000000000000000000000000000000003 40dqnextp011 nextplus 1.000000000000000000000000000000003 -> 1.000000000000000000000000000000004 41dqnextp012 nextplus 1.000000000000000000000000000000004 -> 1.000000000000000000000000000000005 42dqnextp013 nextplus 1.000000000000000000000000000000005 -> 1.000000000000000000000000000000006 43dqnextp014 nextplus 1.000000000000000000000000000000006 -> 1.000000000000000000000000000000007 44dqnextp015 nextplus 1.000000000000000000000000000000007 -> 1.000000000000000000000000000000008 45dqnextp016 nextplus 1.000000000000000000000000000000008 -> 1.000000000000000000000000000000009 46dqnextp017 nextplus 1.000000000000000000000000000000009 -> 1.000000000000000000000000000000010 47dqnextp018 nextplus 1.000000000000000000000000000000010 -> 1.000000000000000000000000000000011 48dqnextp019 nextplus 1.000000000000000000000000000000011 -> 1.000000000000000000000000000000012 49 50dqnextp021 nextplus -0.9999999999999999999999999999999995 -> -0.9999999999999999999999999999999994 51dqnextp022 nextplus -0.9999999999999999999999999999999996 -> -0.9999999999999999999999999999999995 52dqnextp023 nextplus -0.9999999999999999999999999999999997 -> -0.9999999999999999999999999999999996 53dqnextp024 nextplus -0.9999999999999999999999999999999998 -> -0.9999999999999999999999999999999997 54dqnextp025 nextplus -0.9999999999999999999999999999999999 -> -0.9999999999999999999999999999999998 55dqnextp026 nextplus -1.000000000000000000000000000000000 -> -0.9999999999999999999999999999999999 56dqnextp027 nextplus -1.0 -> -0.9999999999999999999999999999999999 57dqnextp028 nextplus -1 -> -0.9999999999999999999999999999999999 58dqnextp029 nextplus -1.000000000000000000000000000000001 -> -1.000000000000000000000000000000000 59dqnextp030 nextplus -1.000000000000000000000000000000002 -> -1.000000000000000000000000000000001 60dqnextp031 nextplus -1.000000000000000000000000000000003 -> -1.000000000000000000000000000000002 61dqnextp032 nextplus -1.000000000000000000000000000000004 -> -1.000000000000000000000000000000003 62dqnextp033 nextplus -1.000000000000000000000000000000005 -> -1.000000000000000000000000000000004 63dqnextp034 nextplus -1.000000000000000000000000000000006 -> -1.000000000000000000000000000000005 64dqnextp035 nextplus -1.000000000000000000000000000000007 -> -1.000000000000000000000000000000006 65dqnextp036 nextplus -1.000000000000000000000000000000008 -> -1.000000000000000000000000000000007 66dqnextp037 nextplus -1.000000000000000000000000000000009 -> -1.000000000000000000000000000000008 67dqnextp038 nextplus -1.000000000000000000000000000000010 -> -1.000000000000000000000000000000009 68dqnextp039 nextplus -1.000000000000000000000000000000011 -> -1.000000000000000000000000000000010 69dqnextp040 nextplus -1.000000000000000000000000000000012 -> -1.000000000000000000000000000000011 70 71-- Zeros 72dqnextp100 nextplus 0 -> 1E-6176 73dqnextp101 nextplus 0.00 -> 1E-6176 74dqnextp102 nextplus 0E-300 -> 1E-6176 75dqnextp103 nextplus 0E+300 -> 1E-6176 76dqnextp104 nextplus 0E+30000 -> 1E-6176 77dqnextp105 nextplus -0 -> 1E-6176 78dqnextp106 nextplus -0.00 -> 1E-6176 79dqnextp107 nextplus -0E-300 -> 1E-6176 80dqnextp108 nextplus -0E+300 -> 1E-6176 81dqnextp109 nextplus -0E+30000 -> 1E-6176 82 83-- specials 84dqnextp150 nextplus Inf -> Infinity 85dqnextp151 nextplus -Inf -> -9.999999999999999999999999999999999E+6144 86dqnextp152 nextplus NaN -> NaN 87dqnextp153 nextplus sNaN -> NaN Invalid_operation 88dqnextp154 nextplus NaN77 -> NaN77 89dqnextp155 nextplus sNaN88 -> NaN88 Invalid_operation 90dqnextp156 nextplus -NaN -> -NaN 91dqnextp157 nextplus -sNaN -> -NaN Invalid_operation 92dqnextp158 nextplus -NaN77 -> -NaN77 93dqnextp159 nextplus -sNaN88 -> -NaN88 Invalid_operation 94 95-- Nmax, Nmin, Ntiny, subnormals 96dqnextp170 nextplus -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999998E+6144 97dqnextp171 nextplus -9.999999999999999999999999999999998E+6144 -> -9.999999999999999999999999999999997E+6144 98dqnextp172 nextplus -1E-6143 -> -9.99999999999999999999999999999999E-6144 99dqnextp173 nextplus -1.000000000000000E-6143 -> -9.99999999999999999999999999999999E-6144 100dqnextp174 nextplus -9E-6176 -> -8E-6176 101dqnextp175 nextplus -9.9E-6175 -> -9.8E-6175 102dqnextp176 nextplus -9.99999999999999999999999999999E-6147 -> -9.99999999999999999999999999998E-6147 103dqnextp177 nextplus -9.99999999999999999999999999999999E-6144 -> -9.99999999999999999999999999999998E-6144 104dqnextp178 nextplus -9.99999999999999999999999999999998E-6144 -> -9.99999999999999999999999999999997E-6144 105dqnextp179 nextplus -9.99999999999999999999999999999997E-6144 -> -9.99999999999999999999999999999996E-6144 106dqnextp180 nextplus -0E-6176 -> 1E-6176 107dqnextp181 nextplus -1E-6176 -> -0E-6176 108dqnextp182 nextplus -2E-6176 -> -1E-6176 109 110dqnextp183 nextplus 0E-6176 -> 1E-6176 111dqnextp184 nextplus 1E-6176 -> 2E-6176 112dqnextp185 nextplus 2E-6176 -> 3E-6176 113dqnextp186 nextplus 10E-6176 -> 1.1E-6175 114dqnextp187 nextplus 100E-6176 -> 1.01E-6174 115dqnextp188 nextplus 100000E-6176 -> 1.00001E-6171 116dqnextp189 nextplus 1.00000000000000000000000000000E-6143 -> 1.000000000000000000000000000000001E-6143 117dqnextp190 nextplus 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000001E-6143 118dqnextp191 nextplus 1E-6143 -> 1.000000000000000000000000000000001E-6143 119dqnextp192 nextplus 9.999999999999999999999999999999998E+6144 -> 9.999999999999999999999999999999999E+6144 120dqnextp193 nextplus 9.999999999999999999999999999999999E+6144 -> Infinity 121 122-- Null tests 123dqnextp900 nextplus # -> NaN Invalid_operation 124 125