Comment #36 on issue 2084 by nicolas.pourcelot: limit(1+1/x, x, 0, dir='-')
fails
http://code.google.com/p/sympy/issues/detail?id=2084
Chris, I finished reviewing it.
It's almost ok for me.
The most important tests are in, imo.
The only remaining issue is this 1/0 == oo problem I mentioned in previous
comment:
"There is another thing annoying me in your patch.
For dir='+', you use direct evaluation, relying on 1/0 == oo."
Actually, same problem occurs in mine, so, there's no point in adding my
own pull request anymore.
To fix that, I would just modify code as this:
if e.is_Pow:
b, ex = e.args
if b == z and ex.is_number:
if z0 == 0 and ex < 0:
if dir == '-':
# integer
if ex.is_even:
return S.Infinity
elif ex.is_odd:
return S.NegativeInfinity
# rational
elif ex.is_Rational:
return S.ImaginaryUnit*S.Infinity
else:
return S.ComplexInfinity
return S.Infinity
return z0**ex
What do you think about it ?
--
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.