Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 4117 by [email protected]: Branch cuts of elementary functions
not handled
http://code.google.com/p/sympy/issues/detail?id=4117
Branch cuts of sqrt() and log() are not handled properly.
If that implies that sqrt() and log() have more than this issue in the
complex plane I don't know.
Moreover, if that implies that other elementary functions are having
similar problems with branch cuts I have not tested.
In [1]: from sympy import *
Exmpl. 1-------------------sqrt()---------------------------
1st, numerically
In [2]: N(sqrt(-1.+I*1e-10))
Out[2]: 5.0e-11 + 1.0*I
In [3]: N(sqrt(-1.-I*1e-10))
Out[3]: 5.0e-11 - 1.0*I
Ok. sqrt-branch seems to lie on neg. Re-axis and is selected properly
2nd, same thing symbolically
In [5]: eps=symbols('eps')
In [6]: limit(sqrt(-1+I*eps),eps,0,'+')
Out[6]: I
In [7]: limit(sqrt(-1+I*eps),eps,0,'-')
Out[7]: I
In [8]: limit(sqrt(-1-I*eps),eps,0,'+')
Out[8]: I
In [9]: limit(sqrt(-1-I*eps),eps,0,'-')
Out[9]: I
Symbolic sqrt() returns 'I' irrespective of approach to branch cut. Wrong.
Exmpl. 2-------------log()--------------
1st, numerically
In [10]: log(-1I*1e-10)
Out[10]: 5.0e-21 - 3.14159265348979*I
In [11]: log(-1+I*1e-10)
Out[11]: 5.0e-21 + 3.14159265348979*I
Ok. log-branch seems to lie on neg. Re-axis and is selected properly
2nd, same thing symbolically
In [12]: limit(log(-1+I*eps),eps,0,'+')
Out[12]: I*pi
In [13]: limit(log(-1+I*eps),eps,0,'-')
Out[13]: I*pi
In [14]: limit(log(-1-I*eps),eps,0,'+')
Out[14]: I*pi
In [15]: limit(log(-1-I*eps),eps,0,'-')
Out[15]: I*pi
Symbolic log() returns 'I*pi' irrespective of approach to branch cut. Wrong.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.