Why floating point relative accuracy is needed?

280 Views Asked by At

In checking convergence of an iterative method, I have found that MATLAB uses the following code:dw = max(max(abs(W-Wnew) / (sqrt(eps)+max(max(abs(Wnew))))));

Here, W is old parameter, Wnew is updated parameter. While I understand the above code is trying to find relative change, I fail to find the reason why sqrt(eps) (eps is called Floating Point Relative Accuracy, eps=2^-52) is being added. So, if anyone can shed some light on this, I will be very grateful. Thanks in advance.