This program finds roots of a polynomial by searching an interval, that you provide, for a sign change. Once a sign change is detected, the interval is successively halved until a zero is located.
Downloads:
Basic program - halfint.bas
Test case using f=4*x^4-2.5*x^2-x+.5
roots of polynomials - half interval searchplease enter the equation in 'function f(x)'to end search enter 'q' for either intervalenter lower interval (q to quit): -1enter upper interval (q to quit): 0no roots found in interval...enter lower interval (q to quit): 0enter upper interval (q to quit): 1root= 0.30357717enter lower interval (q to quit): q