IsNonNegative
Tests if a numeric entity is non-negative.
Syntax
-
IsNonNegative(x[, ε])-
xis a number, a vector, or a matrix -
εis a positive number
-
Description
If x is a number, a vector, or a matrix, then IsNonNegative(x, ε) returns true iff x is non-negative, all components of x are non-negative, or all entries of x are non-negative, respectively. Floating-point numbers are compared using epsilon ε. If omitted, a default (non-zero) value will be used for ε.
Examples
IsNonNegative(IdentityMatrix(5))
true