Re: More on trits & tetrits... (long)
Although I need to study more on the details, I have to say that I very much like Nate's idea. The main reasons are: the idea applies existing 754 and it simplifies things discussed lately.
Chenyi
>>> "Nate Hayes" <nh@xxxxxxxxxxxxxxxxx> 4/22/2010 4:52 PM >>>
Michel Hack wrote:
> 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).
Or maybe we just we dump Level 1 Infinity altogether and use the existing
IEEE 754 bit-encoding for Infinity as Overflow in Level 2. Intervals can
track the uncertainties of inexact zeros, and decorations can track
operations involving things like Overflow-Overflow in the interval
endpoints.
Then we no longer have to deal with invalid constructions such as
[-Infinity,-Infinity] or [+Infinity,+Infinity], either, which is kind of a
nice side benefit.
Nate