Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1307 by mattpap: limit((3**(1/x)+5**(1/x))**x, x, 0) does not work
http://code.google.com/p/sympy/issues/detail?id=1307

In [1]: limit((3**(1/x)+5**(1/x))**x, x, 0)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/matt/repo/git/sympy/<ipython console> in <module>()

/home/matt/repo/git/sympy/sympy/series/limits.pyc in limit(e, z, z0, dir)
      75
      76     try:
---> 77         r = gruntz(e, z, z0, dir)
      78     except PoleError:
      79         r = heuristics(e, z, z0, dir)

/home/matt/repo/git/sympy/sympy/series/gruntz.pyc in gruntz(e, z, z0, dir)
     494         elif dir == "+":
     495             e0 = e.subs(z,z0+1/x)
     496         else:
     497             raise NotImplementedError("dir must be '+' or '-'")
--> 498         return limitinf(e0, x)

/home/matt/repo/git/sympy/sympy/series/gruntz.pyc in limitinf(e, x)
     331     if e.has(log):
     332         e = e.normal()
--> 333     c0, e0 = mrv_leadterm(e,x)
     334     sig=sign(e0,x)
     335     if sig==1: return S.Zero # e0>0: lim f = 0

/home/matt/repo/git/sympy/sympy/series/gruntz.pyc in mrv_leadterm(e, x,  
Omega)
     398     wsym = Symbol("w", real=True, positive=True, dummy=True)
     399     f, logw=rewrite(e, set(Omega), x, wsym)
--> 400     series = calculate_series(f, wsym)
     401     series=series.subs(log(wsym), logw)
     402     return series.leadterm(wsym)

/home/matt/repo/git/sympy/sympy/series/gruntz.pyc in calculate_series(e, x)
     364
     365     f = e
--> 366     series=f.nseries(x, 0, 2).removeO()
     367     if series == 0:
     368         #we need to calculate more terms, let's try 4:

/home/matt/repo/git/sympy/sympy/core/basic.pyc in nseries(self, x, x0, n)
    2104         See also lseries().
    2105         """
-> 2106         return self._eval_nseries(x, x0, n)
    2107
    2108     def _eval_nseries(self, x, x0, n):

/home/matt/repo/git/sympy/sympy/core/power.pyc in _eval_nseries(self, x,  
x0, n)
     591                 # bs -> lt + rest -> lt * (1 + (bs/lt - 1))
     592                 return (lt**e * ((bs/lt).expand()**e).nseries(x,
--> 593                         x0, n-e)).expand() + order
     594             return bs**e+order
     595         o2 = order * (b0**-e)

/home/matt/repo/git/sympy/sympy/core/basic.pyc in nseries(self, x, x0, n)
    2104         See also lseries().
    2105         """
-> 2106         return self._eval_nseries(x, x0, n)
    2107
    2108     def _eval_nseries(self, x, x0, n):

/home/matt/repo/git/sympy/sympy/core/power.pyc in _eval_nseries(self, x,  
x0, n)
     617                 except TypeError:
     618                     #well, the n is something more complicated
(like 1+log(2))
--> 619                     n = int(n.evalf()) + 1
     620                 assert n>=0,`n`
     621                 l = []

TypeError: int() argument must be a string or a number, not 'Add'

Example was taken from http://axiom-wiki.newsynthesis.org/SandBoxSymPy


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to