#19664: Fix Laurent series comparison and make it more efficient
------------------------------------+-------------------------
       Reporter:  jdemeyer          |        Owner:
           Type:  defect            |       Status:  new
       Priority:  major             |    Milestone:  sage-6.10
      Component:  basic arithmetic  |   Resolution:
       Keywords:                    |    Merged in:
        Authors:  Jeroen Demeyer    |    Reviewers:
Report Upstream:  N/A               |  Work issues:
         Branch:                    |       Commit:
   Dependencies:                    |     Stopgaps:  #19664
------------------------------------+-------------------------
Changes (by jdemeyer):

 * stopgaps:   => #19664


Old description:

> The `_cmp_` function for Laurent series can be improved in efficiency.
>
> In particular, this is bad:
> {{{
> sage: R.<x> = LaurentSeriesRing(ZZ)
> sage: x^(10^10) > 0
> ...
> MemoryError:
> }}}

New description:

 This is very bad:
 {{{
 sage: R.<x> = LaurentSeriesRing(ZZ)
 sage: f = x^-2 + O(x^0); f
 x^-2 + O(1)
 sage: g = x^-1 + O(x^0); g
 x^-1 + O(1)
 sage: f == g
 True
 sage: f-g
 x^-2 - x^-1 + O(1)
 }}}

 Also this is bad:
 {{{
 sage: R.<x> = LaurentSeriesRing(ZZ)
 sage: x^(10^10) > 0
 ...
 MemoryError:
 }}}

--

--
Ticket URL: <http://trac.sagemath.org/ticket/19664#comment:1>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to