Bisection method Algorithm

In mathematics, the bisection method is a root-finding method that apply to any continuous functions for which one knows two values with opposite signs. They let extending bisection method into efficient algorithms for finding all real beginnings of a polynomial; see Real-root isolation.

Bisection method source code, pseudocode and analysis

N ← 1 while N ≤ NMAX do // restrict iterations to prevent infinite loop if N ← N + 1 // increment step counter