isZERO function

Test for constants

Test for constants

Test for the values 0, 1 or -1.

Used in newSimplification definitions.

isZERO(x) isONE(x) isMINUSONE(x)

Arguments

  • x: object to be tested

Returns

Returns TRUE if the argument is the appropriate scalar value.

Examples

isZERO(0) x <- quote(0*1) isZERO(x) # This is `*`(0, 1), not a value isZERO(eval(x)) x <- quote(-1) isMINUSONE(x) # This is `-`(1), not a value isMINUSONE(eval(x))
  • Maintainer: John C Nash
  • License: GPL-2
  • Last published: 2023-09-05

Useful links