MathTop

signum 函数

返回数值或符号表达式的符号。

语法

  • signum(expr)
  • sign(expr)

参数与选项

expr要变换或求值的表达式。

示例

  1. 负数的符号signum(-10)返回 -1。