Ticket #9881 (closed defect: fixed)
fix the symbolic csgn function on complex input
|Reported by:||burcin||Owned by:||burcin|
|Report Upstream:||N/A||Reviewers:||Karl-Dieter Crisman|
|Authors:||Burcin Erocal||Merged in:||sage-4.6.alpha3|
Our wrapper of the csgn function from GiNaC (in sage/symbolic/expression.pyx) doesn't reflect it's real definition:
/** Return the complex half-plane (left or right) in which the number lies. * csgn(x)==0 for x==0, csgn(x)==1 for Re(x)>0 or Re(x)=0 and Im(x)>0, * csgn(x)==-1 for Re(x)<0 or Re(x)=0 and Im(x)<0. * */
Fix this and add doctests.
We should also consider using GiNaC's csgn() function for the top level sgn() and sign() functions. This should be on a different ticket though.
- Status changed from new to needs_review
- Authors set to Burcin Erocal