Phobos unit testing uncovers a CPU bug

Walter Bright newshound2 at digitalmars.com
Mon Nov 29 14:58:30 PST 2010


Kagamin wrote:
> Walter Bright Wrote:
> 
>>> Really? I think, the answer is neither correct nor wrong. It's
>>> approximate.
>> The rules for rounding the mathematical value to the representation are
>> precise, and so there is such a thing as the correctly rounded result and
>> the wrong result.
> 
> Well, maybe, but the result fits well in machine precision (which is equal to
> the last bit). And if this precision is not enough for the algorithm, then
> the algorithm is incorrect on any x87 FPU, and its output is garbage.

How do you decide how many bits should be enough for any algorithm?

The thing is, the FPU has 53 bits of precision and so ought to be correct to the 
last bit.


More information about the Digitalmars-d-announce mailing list