/// <summary> /// True arbitrary-precision mod operation /// </summary> /// <param name="n1"></param> /// <param name="n2"></param> /// <returns></returns> public static BigInt Mod(BigInt n1, BigInt n2) { if (n1.digitArray.Length != n2.digitArray.Length) MakeSafe(ref n1, ref n2); BigInt res = new BigInt(n1); res.Mod(n2); return res; }