public void IntIsDivisibleByLimb() { using (var a = new HugeInt("234052834524092854092874502983745029345723098457209305983434345")) { var b = Platform.Ui(5931690917503076532, 3593169091); a.Value = (a * b); Assert.IsTrue(a.IsDivisibleBy(b)); a.Value = a + 1; Assert.IsFalse(a.IsDivisibleBy(b)); } }
public void IntIsDivisibleByHugeInt() { using (var a = new HugeInt("234052834524092854092874502983745029345723098457209305983434345")) using (var b = new HugeInt("394580293847502987609283945873594873409587")) { a.Value = (a * b); Assert.IsTrue(a.IsDivisibleBy(b)); a.Value = a + 1; Assert.IsFalse(a.IsDivisibleBy(b)); } }