#12589: series yields wrong result
--------------------------------------------+------------------------
       Reporter:  dkrenn                    |        Owner:  burcin
           Type:  defect                    |       Status:  new
       Priority:  major                     |    Milestone:  sage-6.4
      Component:  symbolics                 |   Resolution:
       Keywords:  series, order, symbolics  |    Merged in:
        Authors:                            |    Reviewers:
Report Upstream:  N/A                       |  Work issues:
         Branch:                            |       Commit:
   Dependencies:                            |     Stopgaps:  todo
--------------------------------------------+------------------------

Comment (by rws):

 Replying to [comment:11 dkrenn]:
 > Being stucked with this bug is not an option either... What else can we
 do?
 Mathematically you are dealing with so-called "lacunar" or "super-sparse"
 series. Changing  from 32bit to 64bit does not resolve it in principle if
 it were possible with existing Sage functionality, try this:
 {{{
 sage: R.<a>=QQ[[]]
 sage: 2^33
 8589934592
 sage: a^8589934592-1

 versus

 sage: R.<x>=PolynomialRing(QQ,sparse=True)
 sage: 2^65
 36893488147419103232
 sage: x^36893488147419103232-1
 x^36893488147419103232 - 1

 versus

 sage: R.<x>=PowerSeriesRing(QQ,sparse=True)
 sage: x^36893488147419103232-1
 -1 + x^36893488147419103232
 sage: x^36893488147419103232-1+O(x^5555555555555555555555)
 OverflowError: Python int too large to convert to C long

 sage: R.<q>=PowerSeriesRing(QQ,sparse=True)
 sage: f=(q^13362120470/((q - 1)) +1)/(q^7635497409/((q - 1)) + 1)
 MemoryError
 }}}
 so apparently Sage's sparse power series ring can represent monomials with
 bigint degree but not a bigint series order term. Representing or
 computing a full series lastly can involve memory problems for whatever
 reason.

 However, if you request `f.series(q,2)` you do not want a full series so
 maybe lazy series could be your solution.

--
Ticket URL: <http://trac.sagemath.org/ticket/12589#comment:12>
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