Lbl BSEARCH
0→L
r₃-1→H
While L≤H
(L+H)/2→M
If {L+M}>r₂
M-1→H
ElseIf {L+M}<r₂
M+1→L
Else
M
Return
End
-1