x86 unsupported formats
Stuart McDonald
uunet!guest.apple.com!mcdonald
Fri May 13 09:21:13 PDT 1994
> The extended format on x86 permits bit patterns that do not fall in
> the "standard" categories (normal, denormal, pseudodenormal, infinity,
> NaN). These are patterns with non-zero biased exponent and zero
> leading bit of the significand. According to the Intel486 Programmers
> Reference Manual they are not supported. The Intel486 processor raises
> the invalid-operation exception when they are encountered as operands.
> I am seeking opinions on the following statement: in the spirit of
> IEEE 754, software should treat these bit patterns as if they were
> NaN.
> Specifically, 1) math functions (e.g. expl(x), long double
> exponential of long double x) should return NaN when x is represented
> by such a bit pattern 2) isnanl(x) (which is meant to return 1 if x is
> NaN and zero otherwise) should return 1 when x is represented by such a
> bit pattern.
> Peter Farkas
> SunPro
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.
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.
More information about the Numeric-interest
mailing list