Opened 11 years ago

Last modified 11 years ago

#10910 closed enhancement

Avoid nfinit while factoring polynomials — at Version 3

Reported by: lftabera Owned by: tbd
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: number fields Keywords: factorization, pari, nfinit, number field, sd32
Cc: Merged in:
Authors: Luis Felipe Tabera Alonso Reviewers:
Report Upstream: Fixed upstream, in a later stable release. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by mariah)

In previous versions of pari the options to factor a univariate polynomial over a number field were Trager's or Van Hoeij modular algorithm. The second method is the preferred one, but it used to need a nf structure.

Hence Sage computed nfinit on the number field before factoring the polynomial via Pari.

With current pari version the whole nf structure is not needed. So, the factor routines should not call nfinit that can be a very expensive operation for large fields.

The patch modifies the factor method. If the nf structure is already computed we use it, as it will be faster. If the nf structure is not already computed then do not compute it to factor the polynomial.

Change History (3)

comment:1 Changed 11 years ago by lftabera

  • Authors set to Luis Felipe Tabera Alonso
  • Status changed from new to needs_review

comment:2 Changed 11 years ago by lftabera

The doctest failure is known bug that is corrected in #2329.

Depends: #2329

comment:3 Changed 11 years ago by mariah

  • Description modified (diff)

Minor edit of grammer.

Note: See TracTickets for help on using tickets.