Sign

<text size="0.8em">Working with permutations? See sign (permutations) </text>

Returns the sign of a number.

Syntax

sign(Real)
sign(Complex)

Description

Given a real number x, returns its sign: sign(x)={left0, if  x=01, if  x>0-1, if  x<0

arithmetic.sign1.calc.png

Given a complex number z, returns sign(z) = {left0, if  z=0z||||z, if  z0

arithmetic.sign2.calc.png