Understanding what to do for relative error when p = 0 (bisection method)

I noticed this was mentioned in class, but the detail wasn't really given as to how to deal with it (outside of using another error method such as absolute error). Given the relative error of the bisection method:

$$\frac{|P_n - P_{n-1}|}{|P_n|}$$

Where $P_n$ is the current root approximation and $P_{n-1}$ is the previous root approximation.

But what happens when $P_n$ is 0? That is, the current root approximation is exactly the origin? For example, some function could have $P_n = 0$ and $f(0) = -2$, so the normal "stop if $f(P_n) = 0$" criteria would not work. Obviously, this would cause a division by zero error.

The problem is the book suggests relative error is the best way to calculate error when we dont know anything about the polynomial. I tend to agree, but this special case has me worried. Even more worrisome is the book doesn't even recognize it.

Is there some fail-safe in the bisection method that prevents this case from happening that I'm not aware of? Or do I have to actively check for this, and adjust error to absolute error when it happens? Unfortunately I can't seem to brute force a polynomial that would behave in a way that would break this. Otherwise, I'd have my answer.

Thanks!

• @Amzoti, thank you but that much is obvious. These slides do not seem to point out the next-best criteria if $P_n$ = 0. Obviously my program will have to change error calculations if the interval provided contains 0. Do you have an opinion on this? – user3389436 Sep 12 '14 at 3:52