#20588: Add a method divides for MPolynomial_libsingular
-------------------------------------+-------------------------------------
       Reporter:  bruno              |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.3
      Component:  commutative        |   Resolution:
  algebra                            |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:  Bruno Grenet       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  6043c551125ae2ce180dd01cf30e34d55e6a8c5e
  u/bruno/faster_divisibility_test   |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Description changed by bruno:

Old description:

> Currently, the divisibility test for multivariate polynomials (using
> libSingular) is the generic one implemented in
> `src/sage/structure/element.pyx` and uses a test of the form `other%self
> == 0`. This can be fasten a lot using libSingular's `kNF` function, with
> the "laziness" attribute. Below is an example of timings, with the new
> code:
>
> {{{#!python
> sage: R.<x,y,z> = ZZ[]
> sage: p = R.random_element(20, terms=30)
> sage: q = prod(R.random_element(20, terms=30) for _ in range(5))
> sage: r = p*q
> sage: %time p.divides(r)
> CPU times: user 1.26 s, sys: 23.7 ms, total: 1.29 s
> Wall time: 1.29 s
> True
> sage: %time r%p == 0
> CPU times: user 8min 41s, sys: 68 ms, total: 8min 41s
> Wall time: 8min 41s
> True
> }}}

New description:

 Currently, the divisibility test for multivariate polynomials (using
 libSingular) is the generic one implemented in
 `src/sage/structure/element.pyx` and uses a test of the form `other%self
 == 0`. This can be fastened a lot using libSingular's `kNF` function, with
 the "laziness" attribute. Below is an example of timings, with the new
 code:

 {{{#!python
 sage: R.<x,y,z> = ZZ[]
 sage: p = R.random_element(20, terms=30)
 sage: q = prod(R.random_element(20, terms=30) for _ in range(5))
 sage: r = p*q
 sage: %time p.divides(r)
 CPU times: user 1.26 s, sys: 23.7 ms, total: 1.29 s
 Wall time: 1.29 s
 True
 sage: %time r%p == 0
 CPU times: user 8min 41s, sys: 68 ms, total: 8min 41s
 Wall time: 8min 41s
 True
 }}}

--

--
Ticket URL: <http://trac.sagemath.org/ticket/20588#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to