示例#1
0
        public void Gcd4ZeroInArgumentsMustBeZeroOutput()
        {
            var euclidGcd = Euclidean.Euclidean.Gcd4(0, 0, 0, 0);
            var steinGcd  = Stein.Gcd4(0, 0, 0, 0);

            Assert.AreEqual(euclidGcd, steinGcd);
            Assert.AreEqual(euclidGcd, (uint)0);
        }
示例#2
0
 public void Gcd4QuadsShouldBeEquivalent()
 {
     for (uint i = 1, j = 1; i < 32; j <<= 1, i++)
     {
         var euclidGcd = Euclidean.Euclidean.Gcd4(j, j / 2, j / 2, j / 2);
         var steinGcd  = Stein.Gcd4(j, j / 2, j / 2, j / 2);
         Assert.AreEqual(euclidGcd, steinGcd);
     }
 }