# isZero() Function & Examples

Use the isZero() utils function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## isZero

#### isZero(x)

Try it yourself:

```calculio
isZero(2)
isZero(0)
isZero(-4)
isZero([3, 0, -2, 0])
```

---

## isZero(): test for zero

**isZero(x)** returns whether x is zero. It is particularly useful before division, normalization, matrix inversion, and logic that treats the origin as a special case.

## Prevent invalid operations

Test a denominator before [division](https://calcul.io/function/divide/index.md), and test a determinant before [inv()](https://calcul.io/function/inv/index.md). For sign classification, combine it with [isPositive()](https://calcul.io/function/isPositive/index.md) and [isNegative()](https://calcul.io/function/isNegative/index.md). [abs()](https://calcul.io/function/abs/index.md) helps formulate tolerance checks.

## Exact versus approximate zero

Computed decimal values can be close to zero without equaling it exactly. In measurement and floating-point models, compare the magnitude to a chosen tolerance instead of relying only on exact equality.

[All functions](https://calcul.io/functions/index.md)
