sgn (FUN)ΒΆ
FUNCTION sgn : INT
This function will return the result of the signum function applied to input value \(x\):
\[\begin{split}\text{sgn}(x) = \begin{cases} -1 &\mbox{if } x < 0 \\0 &\mbox{if } x = 0 \\1 &\mbox{if } x > 0 \end{cases}\end{split}\]
- InOut:
Scope
Name
Type
Comment
Return
sgn
INT
Input
lr
LREAL
input value \(x\)