sgn (x)

Sign of x : 1 for x > 0
 0 for x = 0
-1 for x < 0

 

 

 

x  :  to     
y  :  to