Finds a value in a sorted range and returns its index.
a bitwise invert of the first element bigger than value. Use ~ret to turn it back.
See Implementation
Finds a value in a sorted range and returns its index.