#
#  sign function
#
#  sign(x) = 0	iff x=0
#	   = 1  iff x>0
#	   = -1 iff x<0
#
#				Gaston H. Gonnet (Mar 1998)
#  Also maps onto lists/arrays
sign := proc( x:{numeric,list} )

if type(x,numeric) then
     if x=0 then 0 elif x>0 then 1 else -1 fi
else zip(sign(x)) fi
end:
