Ian McIntosh wrote:
It should be possible to always compute correct results without using
decorations. This situation is the sort of issue that led me to
conclude that 754 should have distinguished, and ideally 1788 should
distinguish, between Infinity versus Overflow.
Would be nice, I agree. But you'd have to give up a bit in the
format to be consistent, because the same problem exists for zero,
which could be exact or due to underflow. What's the inverse of the
two kinds of Inf? One is exact signed zero, the other is underflow to
zero.
Now you get into trouble defining arithmetic with exact and inexact
zeros. For example, the inexact zeros resulting from underflow have a
valid sign, but the sum or difference of two inexact zeros does not.
Should that be a NaN, just like Inf-Inf?
If you don't have inexact zeros, you can't decide whether the inverse
of zero should be Inf-Overflow or Inf-Pole.
So the only way to track this information is in some kind of
decoration, and you need an additional means to annotate an unsigned
inexact zero.
Intervals have the capability of tracking the amount of inexactness,
and with suitable decorations we can keep track of it all. The only
sensible decoration for a float is in fact a decorated interval!
So unfortunately there is little to be gained from exploiting NaNcodes
and Infcodes. The latter are technically possible in DFP, whereas in
BFP one would have to reserve certain NaNcodes to denote flavours of
Inf, after deciding which flavour deserves to be the one with
SNaNcode zero (the current definition of BFP Inf, in the preferred
definition of SNaN).