Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/gr/fmpz.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,15 @@ _gr_fmpz_poly_mullow(fmpz * res,
return GR_SUCCESS;
}

int
_gr_fmpz_poly_divexact2(fmpz * res,
const fmpz * poly1, slong len1,
const fmpz * poly2, slong len2, gr_ctx_t ctx)
{
_fmpz_poly_divexact(res, poly1, len1, poly2, len2);
return GR_SUCCESS;
}

/* defined in gr/fmpz_poly.c */
int _gr_fmpz_poly_factor(fmpz_poly_t c, gr_vec_t factors, gr_vec_t exponents, gr_srcptr x, int flags, gr_ctx_t ctx);

Expand Down Expand Up @@ -1194,6 +1203,7 @@ gr_method_tab_input _fmpz_methods_input[] =
{GR_METHOD_VEC_DOT, (gr_funcptr) _gr_fmpz_vec_dot},
{GR_METHOD_VEC_DOT_REV, (gr_funcptr) _gr_fmpz_vec_dot_rev},
{GR_METHOD_POLY_MULLOW, (gr_funcptr) _gr_fmpz_poly_mullow},
{GR_METHOD_POLY_DIVEXACT, (gr_funcptr) _gr_fmpz_poly_divexact2},
{GR_METHOD_POLY_FACTOR, (gr_funcptr) _gr_fmpz_poly_factor},
{GR_METHOD_POLY_ROOTS, (gr_funcptr) _gr_fmpz_roots_gr_poly},
{GR_METHOD_POLY_ROOTS_OTHER,(gr_funcptr) _gr_fmpz_roots_gr_poly_other},
Expand Down
7 changes: 7 additions & 0 deletions src/gr/polynomial.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,12 @@ polynomial_div(gr_poly_t res, const gr_poly_t x, const gr_poly_t y, const gr_ctx
}
}

int
polynomial_divexact(gr_poly_t res, const gr_poly_t x, const gr_poly_t y, const gr_ctx_t ctx)
{
return gr_poly_divexact(res, x, y, POLYNOMIAL_ELEM_CTX(ctx));
}

int
polynomial_euclidean_div(gr_poly_t res, const gr_poly_t x, const gr_poly_t y, const gr_ctx_t ctx)
{
Expand Down Expand Up @@ -707,6 +713,7 @@ gr_method_tab_input _gr_poly_methods_input[] =
{GR_METHOD_POW_SI, (gr_funcptr) polynomial_pow_si},
{GR_METHOD_POW_FMPZ, (gr_funcptr) polynomial_pow_fmpz},
{GR_METHOD_DIV, (gr_funcptr) polynomial_div},
{GR_METHOD_DIVEXACT, (gr_funcptr) polynomial_divexact},
{GR_METHOD_INV, (gr_funcptr) polynomial_inv},

{GR_METHOD_EUCLIDEAN_DIV, (gr_funcptr) polynomial_euclidean_div},
Expand Down