nerdamer.sign(x: ExpressionInput): Expression
Returns the sign of a number as
`1`
,
`-1`
, or
`0`
.
For constant expressions that are not plain numerics, the expression is
evaluated first to determine its sign.
Returns
Expression — `1`, `-1`, or `0` as an Expression, or a symbolic `sign(x)` node.
Examples
sign(5).text() // "1"
sign(-3).text() // "-1"
sign(0).text() // "0"
sign('x').text() // "sign(x)"