Skip to contents

Bisection search for x in [lo, hi] such that condition e holds, p determines when to go left.

Usage

binary_search(lo, hi, p, e)

Arguments

lo

Lower end of the search interval.

hi

Higher end of the search interval.

p

A function (named, anonymous or formula).

e

A function (named, anonymous or formula).

Value

A value inside the [lo, hi] interval.