Exemple #1
0
        public void DivisionIntoSmall_AtRadix()
        {
            var result = LongIntegerMath.DivisionIntoSmall(LongInteger.Parse("78652868637835437863"), 1000);

            Assert.AreEqual(LongInteger.Parse("78652868637835437"), result);
        }
Exemple #2
0
        public void DivisionIntoSmall_AtIntegerGreaterThenRadix()
        {
            var result = LongIntegerMath.DivisionIntoSmall(LongInteger.Parse("78652868637835437863"), 5887637);

            Assert.AreEqual(LongInteger.Parse("13358987423619"), result);
        }
Exemple #3
0
        public void DivisionIntoSmall_AtBigInteger()
        {
            var result = LongIntegerMath.DivisionIntoSmall(LongInteger.Parse("78652868637835437863"), 999);

            Assert.AreEqual(LongInteger.Parse("78731600238073511"), result);
        }
Exemple #4
0
        public void DivisionIntoSmall_AtSomeInteger()
        {
            var result = LongIntegerMath.DivisionIntoSmall(LongInteger.Parse("78652868637835437863"), 37);

            Assert.AreEqual(LongInteger.Parse("2125753206427984807"), result);
        }
Exemple #5
0
        public void DivisionIntoSmall_AtTwo()
        {
            var result = LongIntegerMath.DivisionIntoSmall(LongInteger.Parse("78652868637835437863"), 2);

            Assert.AreEqual(LongInteger.Parse("39326434318917718931"), result);
        }
Exemple #6
0
        public void DivisionIntoSmall_NegativeAtNegativeOne()
        {
            var result = LongIntegerMath.DivisionIntoSmall(LongInteger.Parse("-78652868637835437863"), -1);

            Assert.AreEqual(LongInteger.Parse("78652868637835437863"), result);
        }
Exemple #7
0
        public void DivisionIntoSmall_NegativeAtZero()
        {
            var result = LongIntegerMath.DivisionIntoSmall(LongInteger.Parse("-78652868637835437863"), 0);

            Assert.AreEqual(new InfinityLongNumber(true), result);
        }