Algosim documentation: IsNonZero

IsNonZero

Tests if a numeric entity is non-zero.

Syntax

Description

If x is a number, a vector, or a matrix, then IsNonZero(x, ε) returns true iff x is different from the number zero, the zero vector of its dimension, or the zero matrix of its size, respectively, comparing floating-point values using epsilon ε. If omitted, a default (non-zero) value for ε will be used.

Examples

A ≔ ❨❨1/10, 0❩, ❨0, 1/10❩❩
⎛0.1    0⎞
⎝  0  0.1⎠
IsNonZero(A^20)
false

See also