3 ms·
It wouldn’t and cannot, because there’s only one operation in that calculation, so there’s nothing to rearrange. That example only shows that relative errors c
by Someone 6y ago
It wouldn’t and cannot, because there’s only one operation in that calculation, so there’s nothing to rearrange.
That example only shows that relative errors can explode even when doing simple calculations.
Another thing is that, in computers, calculations often are imprecise.
Because of catastrophic cancellation and similar issues, that means that the computer result of a calculation can be quite different from the mathematical result.
To make matters worse, in real life, we often don’t know the exact values of things we measure, so even if our calculations are mathematically perfect, the outcome of a calculation by computer can be quite different from the real result.
So, if you do a computer calculation, say to compute how strong a bridge has to be, you really, really need to know now close the computed value, at worst, is to the mathematically exact result.
That’s what numerical analysis is about. For a given calculation, it might say such things as
“if the input is between 100 and 200, to get a result with n decimal digits of precision, you’ll have to compute all intermediate results with 4 × n digits.”
or
”but if you rearrange the computation like this, you only need to use 2 × n digits for n digits of precision in your result”