home *** CD-ROM | disk | FTP | other *** search
- * sign internal
- sign(x) is the sign function of x. Its value is 1, 0 or -1.
-
- / 1 if re(x) > 0; or both re(x) = 0 and im(x) > 0.
- sign(x) = 0 if x=0.
- \ -1 otherwise.
-
- the same as the definition by arg(x):
-
- / 1 if -pi/2 < arg(x) <= pi/2.
- sign(x) = 0 if x=0.
- \ -1 otherwise.
-
- You can assume x is positive or negative by sign(x) := 1 or sign(x) := -1.
- e.g. sign(2) gives 1, sign(1+i) gives 1.
- See also: abs, arg, re, im, >, <.
-