/* Computes an approximate root {\tt x} of the function {\tt f} using the bisection method. We assume that f(neg) is negative and that f(pos) is positive. Guarantees that a true root will be somewhere in the interval [x-.5e-5 ... x+.5e-5]. */ float bisection (float neg, float pos) { ... }

Hamlet Project

Department of Computer Science

University of Utah