-
-
Notifications
You must be signed in to change notification settings - Fork 725
Closed
Description
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.
Component: symbolics
Keywords: pynac
Author: Burcin Erocal
Reviewer: Karl-Dieter Crisman
Merged: sage-4.6.alpha3
Issue created by migration from https://trac.sagemath.org/ticket/9881