unequal

x != y

unequal(x, y)

Try it yourself:


unequal: test whether values differ

unequal(a, b) returns true when two values are not equal. It is the logical complement of equality and keeps conditions readable.

Examples

unequal(2, 3) is true, while unequal(2, 2) is false. For structured values, understand whether equality is deep or reference-based.

Related comparisons

Use equal for equality, compare() for ordering, equalText for text, and isZero() for a zero-specific test. abs() helps construct tolerance comparisons.

Caveat

Exact inequality is often unsuitable for measured floating-point values. Compare the magnitude of a difference to a tolerance instead.

All functions