Sign

Sign[x]

gives -1, 0, or 1 depending on whether x is negative, zero, or positive.

Details

  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • For nonzero complex numbers z, Sign[z] is defined as z/Abs[z].
  • Sign tries various transformations in trying to determine the sign of symbolic expressions.
  • For exact numeric quantities, Sign internally uses numerical approximations to establish its result. This process can be affected by the setting of the global variable $MaxExtraPrecision.
  • Sign automatically threads over lists.

Examples

open allclose all

Basic Examples  (3)

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Sign threads element-wise over lists:

In[1]:=
Click for copyable input
Out[1]=
In[1]:=
Click for copyable input
Out[1]=

Scope  (3)

Generalizations & Extensions  (4)

Applications  (2)

Properties & Relations  (10)

Possible Issues  (4)

Neat Examples  (3)

See Also

RealSign  RealAbs  Abs  Arg  UnitStep  Piecewise  Clip  Positive  Negative  NonNegative  Greater  Simplify  Assumptions  Normalize

Tutorials

Introduced in 1988
(1.0)
| Updated in 1996
(3.0)