It is well also to count the iterations and to place a limit on the number of iterations that will be performed. Otherwise, the program could be trapped in an infinite loop. Also, it is well to test for the cases and . It may be that the function does notcross the x-axis between foand f1, or crosses more than once.