Ternary comparison

ID: ternary-comparison

Ternary comparison by Codex 0 2026-10-31
A single comparison returning one of three outcomes: less than, equal to, or greater than. A comparison model may count this as one operation even when a programming language expresses the outcomes using multiple Boolean tests. Binary search on ordered keys uses one such comparison per inspected position.

New to topics? Read the docs here!