home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / sm30a.zip / SIGN.KEY < prev    next >
Text File  |  1993-11-07  |  517b  |  17 lines

  1. * sign                                                 internal
  2. sign(x) is the sign function of x. Its value is 1, 0 or -1.
  3.  
  4.     /  1     if re(x) > 0; or both re(x) = 0 and im(x) > 0.
  5. sign(x) =  0     if x=0.
  6.     \ -1    otherwise. 
  7.  
  8. the same as the definition by arg(x):
  9.  
  10.     / 1     if -pi/2 < arg(x) <= pi/2.
  11. sign(x) =  0     if x=0.
  12.     \ -1    otherwise. 
  13.  
  14. You can assume x is positive or negative by sign(x) := 1 or sign(x) := -1.
  15. e.g. sign(2) gives 1, sign(1+i) gives 1.
  16. See also: abs, arg, re, im, >, <.
  17.