Signum function (written as sgn(x) or sign(x) tells you whether a real number is negative, zero, or positive) sgn(x)=⎩⎨⎧−1,0,1,x<0x=0x>0