------------------------------------------------------------------------ -- minus0.decTest -- decimal negation (simplified) -- -- 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.58 -- This set of tests primarily tests the existence of the operator. -- Subtraction, rounding, and more overflows are tested elsewhere. extended: 0 precision: 9 rounding: half_up maxExponent: 999 minexponent: -999 min001 minus '1' -> '-1' min002 minus '-1' -> '1' min003 minus '1.00' -> '-1.00' min004 minus '-1.00' -> '1.00' min005 minus '0' -> '0' min006 minus '0.00' -> '0' min007 minus '00.0' -> '0' min008 minus '00.00' -> '0' min009 minus '00' -> '0' min010 minus '-2' -> '2' min011 minus '2' -> '-2' min012 minus '-2.00' -> '2.00' min013 minus '2.00' -> '-2.00' min014 minus '-0' -> '0' min015 minus '-0.00' -> '0' min016 minus '-00.0' -> '0' min017 minus '-00.00' -> '0' min018 minus '-00' -> '0' min020 minus '-2000000' -> '2000000' min021 minus '2000000' -> '-2000000' precision: 7 min022 minus '-2000000' -> '2000000' min023 minus '2000000' -> '-2000000' precision: 6 min024 minus '-2000000' -> '2.00000E+6' Rounded min025 minus '2000000' -> '-2.00000E+6' Rounded precision: 3 min026 minus '-2000000' -> '2.00E+6' Rounded min027 minus '2000000' -> '-2.00E+6' Rounded -- more fixed, potential LHS swaps/overlays if done by subtract 0 precision: 9 min060 minus '-56267E-10' -> '0.0000056267' min061 minus '-56267E-5' -> '0.56267' min062 minus '-56267E-2' -> '562.67' min063 minus '-56267E-1' -> '5626.7' min065 minus '-56267E-0' -> '56267' -- overflow tests [underflow not possible] maxexponent: 999999999 minexponent: -999999999 precision: 3 min120 minus 9.999E+999999999 -> ? Inexact Lost_digits Overflow Rounded -- lostDigits checks maxexponent: 999 minexponent: -999 precision: 9 min301 minus 12345678000 -> -1.23456780E+10 Rounded min302 minus 1234567800 -> -1.23456780E+9 Rounded min303 minus 1234567890 -> -1.23456789E+9 Rounded min304 minus 1234567891 -> -1.23456789E+9 Inexact Lost_digits Rounded min305 minus 12345678901 -> -1.23456789E+10 Inexact Lost_digits Rounded min306 minus 1234567896 -> -1.23456790E+9 Inexact Lost_digits Rounded precision: 15 -- still checking for [no] lostDigits min321 minus 12345678000 -> -12345678000 min322 minus 1234567800 -> -1234567800 min323 minus 1234567890 -> -1234567890 min324 minus 1234567891 -> -1234567891 min325 minus 12345678901 -> -12345678901 min326 minus 1234567896 -> -1234567896 -- Null tests min400 minus # -> ? Invalid_operation