gives -1, 0, or 1 depending on whether x is negative, zero, or positive.
- 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 can be used with CenteredInterval objects. »
- Sign automatically threads over lists.
Examplesopen allclose all
Basic Examples (4)
Numerical Evaluation (7)
Sign threads elementwise over lists and matrices:
Sign can deal with real‐valued intervals:
Specific Values (5)
Values of Sign at fixed points:
Visualize Sign in three dimensions:
Function Properties (12)
Sign is defined for all real and complex inputs:
Function range of Sign for real inputs:
Sign is an odd function:
Sign has mirror symmetry :
Sign is not a differentiable function:
Use RealSign to obtain this real-differentiable result:
Sign is not an analytic function:
Sign is nonincreasing:
Sign is not injective:
Sign is not surjective:
Sign is neither non-negative nor non-positive:
Sign is neither convex nor concave:
Plot the real and imaginary parts of Sign over the complex plane:
Define Rademacher functions:
Plot (vertically shifted) Rademacher functions:
Check orthogonality over the unit interval:
Properties & Relations (10)
Sign with simple arguments automatically evaluates to simpler form:
Sign is idempotent:
Simplify under additional assumptions:
Assume real‐valued variables:
Use Sign in definite integration:
Integrate along a line in the complex plane, symbolically and numerically:
For complex values, the indefinite integral is path dependent:
The indefinite integral for real values:
Use in integral transforms:
Obtain Sign from integrals and limits:
Convert to Piecewise:
Possible Issues (5)
Sign is a function of a complex variable and is therefore not differentiable:
For purely real or imaginary approximate arguments, Sign returns exact answers:
For general complex arguments, Sign tracks the precision of the input:
Sign can stay unevaluated for numeric arguments:
Machine‐precision numerical evaluation of Sign can give wrong results:
Arbitrary‐precision evaluation gives the correct result:
A larger setting for $MaxExtraPrecision can be needed:
Sign applied to a matrix does not give the matrix sign function:
Wolfram Research (1988), Sign, Wolfram Language function, https://reference.wolfram.com/language/ref/Sign.html (updated 13).
Wolfram Language. 1988. "Sign." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 13. https://reference.wolfram.com/language/ref/Sign.html.
Wolfram Language. (1988). Sign. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Sign.html