public static IPolynomial Modulus(IPolynomial poly, IPolynomial mod) { int sortOrder = mod.CompareTo(poly); if (sortOrder > 0) { return(poly); } else if (sortOrder == 0) { return(Polynomial.Zero); } IPolynomial remainder = Polynomial.Zero; Polynomial.Divide(poly, mod, out remainder); return(remainder); }
public static IPolynomial Divide(IPolynomial left, IPolynomial right) { IPolynomial remainder = Polynomial.Zero; return(Polynomial.Divide(left, right, out remainder)); }