Illinois Algorithm
The Illinois algorithm is a variant of the regula falsi method in which given a new estimate, the estimate which is replaced is the one for which the sign of the function is the same as the sign of the function for the new estimate and the ordinate associated with the other estimate is halved. The Illinois algorithm is guaranteed to converge.As with the regula falsi, it is impossible to use the Illinois algorithm to find the zeros of strictly nonnegative functions or nonpositive functions.
Function List
- double Illinois_Algorithm( double (*f)(double), double a, double b, double tolerance, int max_iterations, int *err )
Find a root of f(x) in the interval ( min(a,b), max(a,b) ) where f(a)·f(b) < 0. The procedure terminates when the absolute difference of the return value and the actual root is less than tolerance, where tolerance is a user specified number specifying the desired accuracy of the result. The input argument max_iteration_count allows the user to control the maximum number of iterations to attempt. The method returns an err of 0 if the iteration was successful, -1 if the initial estimates fail to satify the requirement that the function evaluated at the two values must have opposite signs, and -2 if the number of iterations exceed the maximum allowable number of iterations as specified by the user.
C Source Code
- The file, illinois_algorithm.c, contains the version of Illinois_Algorithm( ) written in C.
