public void PowerTest() { ModulusMatrix matrix = new ModulusMatrix(2, 2); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { matrix[i, j] = new ModulusNumber((uint)(i * 2 + j)); } } ModulusMatrix manualMatrix = matrix * matrix * matrix; ModulusMatrix powerMatrix = ModulusMatrix.Power(matrix, 3); Assert.IsTrue(manualMatrix == powerMatrix); }
public void F100_10e12() { ModulusNumber result = Program.F(100, BigInteger.Pow(10, 12)); Assert.AreEqual <ulong>(635147632, result.Value); }
public void F10000_10000() { ModulusNumber result = Program.F(10000, 10000); Assert.AreEqual <ulong>(749784357, result.Value); }
public void F10e12_100() { ModulusNumber result = Program.F(BigInteger.Pow(10, 12), 100); Assert.AreEqual <ulong>(364553235, result.Value); }
public void F100_100() { ModulusNumber result = Program.F(100, 100); Assert.AreEqual <ulong>(841913936, result.Value); }
public void F10_13() { ModulusNumber result = Program.F(10, 13); Assert.AreEqual <ulong>(37959702514 % ModulusNumber.Mod, result.Value); }
public void F13_10() { ModulusNumber result = Program.F(13, 10); Assert.AreEqual <ulong>(3729050610636 % ModulusNumber.Mod, result.Value); }
public void F10_3() { ModulusNumber result = Program.F(10, 3); Assert.AreEqual <ulong>(28479, result.Value); }
public void F4_2() { ModulusNumber result = Program.F(4, 2); Assert.AreEqual <ulong>(10, result.Value); }