[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Decimal16



I made a mistake in my 3-digit version:  the exponent range is three
times larger than I reported:  emax=12 and emin=-11  (I had forgotten
the two high-order exponent bits from the combination field).

Mike Cowlishaw pointed out a third component that could be mutilated
(the first was w=0, and the second was a 7-bit declet), namely the
combination field.  By using it as a straignt 5-bit biased exponent
(reserving one or two values for NaN and Inf) and using a full declet,
we get p=3 and an exponent range from -14 to +15, larger than what I
had gotten.  The biggest loss however is that special-value tests are
subtly different (though compatible, if payload is restricted to two
digits, as is normal for a three-digit format):  The SNaN-bit would
be the high-order bit of the declet, which would therefore have to be
decoded specially when that bit is set.

If only one exponent is given up, we would have to define a special
encoding of the top three bits of the declet to distinguish QNaN from
SNaN and Inf, and the Quieting rule would be as tricky as it is for
PaRisc, to avoid turning SNaN into Inf.  Seems cleaner to reserve two
biased exponent values (30 and 31).

Michel.
Sent: 2007-12-30 17:45:00 UTC


754 | revision | FAQ | references | list archive