From: Keith M. <kei...@to...> - 2004-10-06 15:28:25
|
>>> IMO, anyone doing serious math work with x86 should know about the >>> extra precision feature and code with it in mind. ... >> >> And anyone doing serious math work should also have sufficient >> grasp of error theory to realise that, with the limited precision >> math capabilities accorded by digital computers, the subtraction of >> two large but similar numbers is an inherently unsafe operation! >> >> In the OP's examples, the roundoff errors indicated are entirely >> insignificant, at the level of precision available. > >I think the OP is testing the ``stability" of the FP system. I'm not > an expert on this matter, but IIRC some applications needs a well > defined behavior on the edge of precision (``well defined" as in > ``reproducible"). Non-linear dynamics comes to mind. If you are not > aware of the 80 bit / 64 bit duality of the x86 FPU, an apparently > inocuous rearrangement of code on such an application could produce > very different results, due to introduction or suppression of 80 bit > -> 64 bit conversions. That may well be the case. I was merely pointing out, if we test a mathematical premise on the basis of an unsound test case, then we shouldn't be too surprised if the results aren't what we expect. In the OP's test case, the subtraction of one very large number from another of similar magnitude discards all significance in the result. Error analysis tells us we can have no confidence in the accuracy of this result, so why should we care that differing implementations of the math routines give differing erroneous results? Mathematically, what *is* important is that the result is unreliable, regardless of which math routine implementation produced it. In my experience, as an engineer, it is all too common to see calculations based on physical measurements, where the accuracy of the measurements is not considered, and where unwarranted significance is attached to a difference between two experiments, yet error analysis would show that the calculated results do, in fact, agree, within the reproducible accuracy of the original measurements. Best regards, Keith. |