The Art of Interface
+49 89 8999640

Article 11 — Appendix A.32

sign — signum function

Category. Mathematics.

Abstract. Signum: definition, graph and properties.

References. This article is a part of scientific calculator Li-L, scientific calculator Li-X, scientific calculator Li-Lc and scientific calculator Li-Xc products.

1. Definition

Signum function is defined as

sign(x) ≡ −1, for x < 0;
sign(0) ≡ 0;
sign(x) ≡ 1, for x > 0.

2. Graph

Signum function is defined everywhere on real axis — so, its domain is (−∞, +∞). Function graph is depicted below — fig. 1.

Fig. 1. Graph of the signum function y = sign x Fig. 1. Graph of the signum function y = signx.

Function codomain is limited to the set of values {−1, 0, 1}.

3. Support

Signum function sign is supported in:

Signum function of the complex argument sign is supported in:

4. How to use

To calculate signum of the number:

sign(-1.7);

To calculate signum of the current result:

sign(Rslt);

To calculate signum of the number x in memory:

sign(Mem[x]);