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

New issue 2860 by [email protected]: IMHO limit's dir should not default to "+"
http://code.google.com/p/sympy/issues/detail?id=2860

In [25]: limit( (x**2-2*x-3) / (x**2-6*x+9), x, 3)
Out[25]: ∞
is wrong, becaus:
In [26]: limit( (x**2-2*x-3) / (x**2-6*x+9), x, 3, dir="-")
Out[26]: -∞
so that limit doesn't exist.
I'm experimenting with:

def lim(e, z, z0, dir="*"):
    if z0 == S.Infinity or z0 == S.NegativeInfinity:
        return limit(e, z, z0)
    elif dir == '+' or dir == '-':
        return limit(e, z, z0, dir)
    else:
        leftlimit = limit(e, z, z0, dir="-")
        rightlimit = limit(e, z, z0, dir="+")
        if leftlimit == rightlimit:
            return rightlimit
        else:
            rllimits = []
            rllimits.append(leftlimit)
            rllimits.append(rightlimit)
            return rllimits



--
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