public void PhiMaxSet() { var expected = 3852; var totient = new Totient(4800); var actual = totient.Phi(4501); Assert.Equal(expected, actual); }
public void PhiPhi2() { var totient = new Totient(100); var expected = totient.Phi(20); var actual = Totient.Phi2(20); Assert.Equal(expected, actual); }
public void PhiOne() { var expected = 1; var totient = new Totient(1); var actual = totient.Phi(1); Assert.Equal(expected, actual); }
public void PhiGreaterThanN() { var totient = new Totient(10); Assert.Throws <ArgumentOutOfRangeException>(() => totient.Phi(20)); }