We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should the following function exist globally?
def sign(x): if x > 0: return 1 if x < 0: return -1 return 0
I'm not sure if this is identical to
def sign(x): return x.__cmp__(0)
I'm also ambivalent as to whether this function is called "sign", "signum", or "sgn".
CC: @mwhansen
Component: basic arithmetic
Keywords: sign
Issue created by migration from https://trac.sagemath.org/ticket/777
The text was updated successfully, but these errors were encountered:
To release manager: note that this should be closed - see comment in #6803.
Sorry, something went wrong.
To clarify: we already have:
sage: sgn(1) 1 sage: sgn(-4) -1
so this ticket should be closed, presumably as a duplicate.
No branches or pull requests
Should the following function exist globally?
I'm not sure if this is identical to
I'm also ambivalent as to whether this function is called "sign", "signum", or "sgn".
CC: @mwhansen
Component: basic arithmetic
Keywords: sign
Issue created by migration from https://trac.sagemath.org/ticket/777
The text was updated successfully, but these errors were encountered: