|
|
|
|
|
by zoomablemind
1680 days ago
|
|
On the subject of the floating-point math in general, I wonder what's the practical way to treat the extreme order values (close to zero ~ 1E-200, or infinity ~ 1E200, but not zero or inf)? This can take place in some iterative methods, expansion series, or around some singularities. How reliable is it to keep the exreme orders in expectation that the resp. quatities would cancel the orders properly yielding a meaningful value (rounding wise)? For example, calculating some resulting value function, expressed as v(x)=f(x)/g(x), where both f(x) and g(x) are oscillating with a number of roots in a given interval of x. |
|
However if you do f(x) - g(x), the absolute error is on the order of 2e190: if f(x) - g(x) is small, then now the relative error can be huge (this is known as catastrophic cancellation).