On Nov 28, 2007 10:43 AM, Jennifer S. Balakrishnan <[EMAIL PROTECTED]> wrote: > I'm trying to integrate a list of Laurent series, and it seems that > once the list has more than 4 elements, Sage gets upset:
The problem is: sage: A.<t> = LaurentSeriesRing(QQ) sage: (-2*t^(-4) + O(t^8)).integral() Traceback (most recent call last): ... IndexError: list index out of range This is because of this code in rings/laurent_series_ring_element.pyx not being coded correctly around line 880: if n < 0: v = [a[i]/(n+i+1) for i in range(-1-n)] + [0] else: v = [] v += [a[i]/(n+i+1) for i in range(max(-n,0), len(a))] try: So you or somebody should fix that and submit a patch :-). It's now: http://trac.sagemath.org/sage_trac/ticket/1302 William > > sage: A.<t> = LaurentSeriesRing(QQ) > sage: B = [-2*t^4 + O(t^16), -2*t^2 + O(t^14), -2 + O(t^12), -2*t^-2 + > O(t^10), -2*t^-4 + O(t^8), -2*t^-6 + O(t^6)] > sage: for i in range(6): > ....: B[i] = integral(B[i]) > ....: > --------------------------------------------------------------------------- > <type 'exceptions.IndexError'> Traceback (most recent call last) > > /home/jen/<ipython console> in <module>() > > /home/jen/sage-2.8.13-use_this_on_sage_dot_math-x86_64-Linux/local/lib/python2.5/site-packages/sage/misc/functional.py > in integral(x, *args, **kwds) > 449 """ > 450 if hasattr(x, 'integral'): > --> 451 return x.integral(*args, **kwds) > 452 else: > 453 from sage.calculus.calculus import SR > > /home/jen/laurent_series_ring_element.pyx in > sage.rings.laurent_series_ring_element.LaurentSeries.integral() > > <type 'exceptions.IndexError'>: list index out of range > sage: B > > [-2/5*t^5 + O(t^17), > -2/3*t^3 + O(t^15), > -2*t + O(t^13), > 2*t^-1 + O(t^11), > -2*t^-4 + O(t^8), <================== stopped integrating here > -2*t^-6 + O(t^6)] > > What's going on? > > Jen > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---