Gistlib Logo

gistlib

other matlab categories

numerical-cancellation code snippets in matlab

the quantity y=1-\sqrt{1+x^2} for x=10^{-6} is not so accurate due to numerical cancellation. indeed, the relative error associated to it is, approximately: in matlab

gistlibby LogSnag