コード例 #1
0
        public void FermatFactorTest()
        {
            const long value = 10873;

            var result = Factorization.FermatFactor(value);

            const long expectedX = 131;
            const long expectedY = 83;

            Assert.IsTrue(result.X == expectedX && result.Y == expectedY, "Fermat Factor has an incorrect result");
        }