Sign

Sign(x)

The sign of a number.

Returns

• -1 when «x» < 0
• 0 when «x» = 0
• 1 when «x» > 0
• NaN when «x» is NaN (with Warning)

Math

History

Introduced as a built-in function in Analytica 4.2 .

In Analytica 4.1 and earlier, it was common to define Sign as a user-defined function:

Function Sign(x) := if x < 0 then -1 else if x > 0 then 1 else 0