Hacker News new | ask | show | jobs
by tremguy 3750 days ago
I think this is a bit of an oversimplification. You must consider compounding when talking about rounding errors. A single matrix operation with hundreds of rows and columns can easily have millions of multiplications. At every multiplication the previous error gets multiplied. That's why I don't feel the answer was exhaustive.
1 comments

> At every multiplication the previous error gets multiplied

This is a bit of an oversimplification as well, it's not like you keep multiplying pi with itself over and over again and it's not like the error you introduce is random, if you've rounded pi once, you're gonna keep make a slight error in the same direction.

If you were right there'd be no hope of ever getting sane results when multiplying largish matrices of doubles regardless of the presence of pi.

I'm not saying that accumulation of error doesn't exist, I'm just saying that it's not to the extremes you're describing.

Pi is kind of a worst case, because you round it only once, every operation will add errors on the same direction. Because of that you either use way to many decimal places, or make sure you don't keep multiplying pi with itself as you said. But both are optional, and must be designed into.

A matrix of measurements, by its turn, normally has unbiased errors, what makes the resulting error grow much slower.