RosettaCodeData/Task/Binary-search/Axe/binary-search.axe
2016-12-05 23:44:36 +01:00

16 lines
146 B
Text

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
End
-1
Return