x86 unsupported formats

Peter Farkas uunet!Eng.Sun.COM!Peter.Farkas
Thu May 12 18:40:29 PDT 1994


> From: Stuart McDonald <mcdonaldaguest.apple.com>
> Subject: Re:  x86 unsupported formats
> 
> I don't think that is what 754 intended.  I believe it says if a format
> has redundant representations, they should be treated like their canonical
> representations.  That is, 2^1*1.F0 and 2^2*0.F8 should both be treated
> the same.  If I understand what you are proposing, you'd like the later
> value treated as NaN, which I think is a bad idea.
> 
   Did you take in account that the hardware does the following:

   2^1*1.F0 + 2^1*1.F0 = ... (whatever the correct results is)

but

   2^2*0.F8 + 2^2*0.F8 = NaN

This is why I believe 2^2*0.F8 should be treated as a NaN.

> I think this is a 'should', not a 'shall', however, so efficiency may
> outweigh the care to get it right.  To say this another way, since the
> hardware never creates non-canonical results, it seems a shame to slow
> expl() down by a least the delay of a test to handle inputs that should
> never arise in practice; non-canonical inputs only arise when someone
> maliciously sneaks one in via an equivalence statement, or the like.
> 
   I am thinking not so much of the malicious/experimenting user,
but of bugs and debugging.  If a variable gets the value 2^2*0.F8
because of some bug, the hardware goes on treating it as if it were
NaN, but the software returns some reasonable looking numbers, the
user will have a very hard time figuring out the bug.

                                             Peter Farkas
                                             SunPro



More information about the Numeric-interest mailing list