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

Re: a question about formatOf operations



 binary64 = binary32 + binary80

I don't see any language issue here, in a language that provides
type declarations.  Basically, in the absence of widenTo (perhaps
better named minWidth) specifications, the statement above denotes
a single operation.  A language that wants to avoid the difficulty
of supporting the single rounding should define a widenTo rule and
make it the default, so only those who do care about the single
rounding would use the appropriate declarations to turn off widenTo
(which capability must be provided -- or was that only a "should"?
I don't have the reference at hand right now.)

Implementation-wise, it is sufficient to OR the Inexact flag of the
wide arithmetic with the low-order bit (in binary), or to use the
equivalent of IBM's round-to-prepare-for-shorter-precision method
(in decimal), before performing the narrowing assignment with the
intended rounding mode.  Btw, that funny rounding mode for BFP was
described in early-2005 versions of 754R, if I recall.  Note that
it is only needed for round-to-nearest; the directed rounding modes
cannot lead to double rounding in this context.

Michel.
Sent: 2008-03-05 04:35:57 UTC


754 | revision | FAQ | references | list archive