Ticket #20003: nmod_poly_linkage.pxi.patch

File nmod_poly_linkage.pxi.patch, 679 bytes (added by Lennart Ackermans, 7 years ago)
  • src/sage/libs/flint/nmod_poly_linkage.pxi

    diff --git a/src/sage/libs/flint/nmod_poly_linkage.pxi b/src/sage/libs/flint/nmod_poly_linkage.pxi
    index 99d766d..cd1e918 100644
    a b cdef factor_helper(Polynomial_zmod_flint poly, bint squarefree=False): 
    629629
    630630    nmod_poly_factor_clear(factors_c)
    631631
     632    if factor_list:
     633        if factor_list[0][0].leading_coefficient() != 1:
     634            factor_list[0] = (factor_list[0][0] / \
     635                factor_list[0][0].leading_coefficient(), factor_list[0][1])
     636
    632637    return Factorization(factor_list, unit=poly.leading_coefficient(),
    633638            sort=(not squarefree))