Equality test (source code)

= Equality test
{title2=$a=x$}

A terminating check returning whether two values match under a specified relation. Mathematical equality is one such relation; a chosen <equivalence relation> can instead express matching keys. <Linear search> only needs this check, whereas <binary search> also uses relative order. The cost of an <equality test> depends on the representation and implementation of its operands.