Back to functions

sign


sign function

Returns the sign of the number.

Usage: nerdamer("sign(x)")


Parameters

expression x Returns the appropriate value if possible otherwise it returns the function with the simplified expression

Returns

Expression

EXAMPLES:
var x = nerdamer('sign(x)');
console.log(x.toString());
var y = nerdamer('sign(-1)').evaluate();
console.log(y.toString());
OUTPUT:
Back to functions