示例#1
0
        public void op_SubtractionTest()
        {
            LargeInteger int1     = new LargeInteger("-4788888888888888888888888888888888");
            LargeInteger int2     = new LargeInteger("2");
            LargeInteger expected = new LargeInteger("-4788888888888888888888888888888890");
            LargeInteger actual;

            actual = (int1 - int2);
            Assert.AreEqual(expected.ToString(), actual.ToString());
        }
示例#2
0
        public void op_AdditionSpecialTest()
        {
            LargeInteger int1     = new LargeInteger("-0");
            LargeInteger int2     = new LargeInteger("-000000");
            LargeInteger expected = new LargeInteger("0"); //
            LargeInteger actual;

            actual = (int1 + int2);
            Assert.AreEqual(expected.ToString(), actual.ToString());
        }
示例#3
0
        public void op_MultiplyTest()
        {
            LargeInteger int1     = new LargeInteger("-4788888888888888888888888888888888");
            LargeInteger int2     = new LargeInteger("37888888888888888888887777777777777777777776666666666666");
            LargeInteger expected = new LargeInteger("-181445679012345679012340358024691324345679007024691358022486419753086419753087407407407408");
            LargeInteger actual;

            actual = (int1 * int2);
            Assert.AreEqual(expected.ToString(), actual.ToString());
        }
示例#4
0
 public static double GetStandardUnits(LargeInteger ammount)
 {
     return(double.Parse(ammount.ToString()) / Math.Pow(10, 12));
 }