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