Convenient and near-optimal binary search on floating point numbers
A near-optimal floating-point binary search template that searches representable values via bit-casts instead of hard-coded iteration counts.
A near-optimal floating-point binary search template that searches representable values via bit-casts instead of hard-coded iteration counts.
A beginner-friendly guide to binary search as partition-point search, including invariants, variants, language APIs, and optimizations.