This site is supported by donations to The OEIS Foundation.

Sign function

From OeisWiki
Jump to: navigation, search


This article page is a stub, please help by expanding it.


The sign function
sgn (x)
, also called the signum function, of a real number
x
is defined as
     
sgn (x)  :=
⎰  
⎱  
0 if x = 0,
x
| x |
if x ≠ 0.

This may also be written as, where [·] is the Iverson bracket,

     
sgn (x)  :=  [x ≥ 0] − [x ≤ 0]  = 
⎧  
⎨  
⎩  
−1 if x < 0,
0 if x = 0,
1 if x > 0.

The signum of a nonzero real number
x
gives the real number which is closest to
x
on the unit 0-sphere of the real line, i.e. the real number with absolute value 1 which has the same sign as
x
.

Complex signum

The complex signum of a complex number
z = a + bi = rei  θ =
| z |
ei  arg (z)
, where
| z |
is the complex norm and
arg (z) = θ
is the argument of a nonzero complex number (the argument of 0 being undefined), would generalize to
     
sgn (z)  :=
⎰  
⎱  
0 if z = 0,
z
| z |
= ei  arg (z) = ei  θ
if z ≠ 0.

The complex signum of a nonzero complex number
z
gives the complex number which is closest to
z
on the unit circle (the unit 1-sphere) of the complex plane, i.e. the complex number with complex norm 1 which has the same argument as
z
.

See also