public void FastUintTowardZero() { string AsString; using mpz_t a = new mpz_t("234052834524092854092874502983745029345723098457209305983434345"); AsString = a.ToString(); Assert.AreEqual("234052834524092854092874502983745029345723098457209305983434345", AsString); ulong b = 17835; ulong c = a.AbsRemainder(b); Assert.AreEqual(16785U, c); ulong d = a.AbsRemainder(b, Rounding.TowardZero); Assert.AreEqual(16785U, d); }
public void FastUintTowardNegativeInfinity() { string AsString; using mpz_t a = new mpz_t("-234052834524092854092874502983745029345723098457209305983434345"); AsString = a.ToString(); Assert.AreEqual("-234052834524092854092874502983745029345723098457209305983434345", AsString); ulong b = 17835; ulong c = a.AbsRemainder(b, Rounding.TowardNegativeInfinity); AsString = c.ToString(); Assert.AreEqual(1050U, c); }