Why 1/0 is complex infinity and log(0) is complex infinity?
In [1]: z = Symbol('z', imaginary=True)
In [2]: z.is_imaginary
Out[2]: True
In [3]: z.is_real
Out[3]: False
In [4]: limit(1/z, z, 0)
Out[4]: ∞
In [5]: type(_)
Out[5]: sympy.core.numbers.Infinity
My guess is that limit() doesn't look at assumptions. Also, limit
uses real limits, not complex limits (which are much harder to work
with algorithmically).
In[1]:= Limit[1/x, x->0]
Out[1]= Infinity
In[2]:= Limit[1/x, x->0, Assumptions -> NotElement[x, Reals]]
1
Limit::cas: Warning: contradictory assumption(s) x \[NotElement] Reals && 0 < x < ---- encountered.
4096
1
Out[2]= Limit[-, x -> 0, Assumptions -> x \[NotElement] Reals]
x