I'm taking a numerical analysis class (using c++) and one of the assignments I have is to implement the secant method for a simple polynomial (x-x^(1/3) -2).
Using this recursive method xk+1 = [f(xk)*(xk-xk-1)]/[f(xk)-f(xk-1)]
Simple enough, but part b of this question requires that a number Em (being defined as the smallest machine number available) be added to the recursive function s.t.:
xk+1 = [f(xk)*(xk-xk-1)]/[f(xk)-f(xk-1) +Em]
Predictably this has no effect on the reported results (I'm using the smallest double available in this case) -- but the question insinuates that there is some purpose to doing this, and I really don't know what it is.
The only thing I could think of is the possibility of some function provoking an oscilation near the root value because of acumulated FP error. I thought maybe adding this Em to the denominator might alleviate this problem.
What do you guys think?