Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Fw: Overflow and Inf



Michel is of course right, that the DFP (Decimal Floating Point) representations of Infinity, Quiet NaNs and Signaling NaNs are distinguished by other bits, not by the fraction, so the fraction bits in theory could be overloaded to hold other information, similar to a NaN's payload. That makes things easier.

It solves one problem, not all. When I said "most" (not "all") "of the same issues still apply", "some" might have been a better word.

To implement a Directed Infinity using the DFP Infinity, you would still need either new instructions or a new mode, so that an overflowing operation produced Directed Infinity and so that a multiply of Directed Infinity by zero produced zero. Alternatively, you could use software (and lose performance) to detect the situations. You could still use a signaling NaN with a specific payload to cause a trap to help that, but that only solves one part.

So overall, at least "some" of the same issues apply, but you have the advantage of having a place in Infinity to put some bits. 754 says those bits must be set to zero on output and should be ignored on input, but you could add a non-754 or extended-754 mode where they weren't.

Thank you Michel for the clarification.

- Ian McIntosh IBM Canada Lab Compiler Back End Support and Development


Inactive hide details for Michel Hack ---09/29/2010 03:07:27 PM---Ian McIntosh wrote: > With 754 Decimal Floating Point, the deMichel Hack ---09/29/2010 03:07:27 PM---Ian McIntosh wrote: > With 754 Decimal Floating Point, the details are different


From:

Michel Hack <hack@xxxxxxxxxxxxxx>

To:

Ian McIntosh/Toronto/IBM@IBMCA

Date:

09/29/2010 03:07 PM

Subject:

Fw: Overflow and Inf





Ian McIntosh wrote:
> With 754 Decimal Floating Point, the details are different
> but most of the same issues apply.

Actually, NO!  The representation of Infinity is precisely one area
where DFP has bits to spare.  In principle the format could support
payloads for Inf just as it can for NaN -- because, unlike BFP, the
Inf/Nan distinction is independent of the payload (as is the QNaN
vs SNaN distinction, for that matter).

The current 754-2008 standard assumes a canonical Infinity, with a
payload of zero, and all operations that generate Inf must generate
the canonical one, so the bits cannot be exploited now -- but the
room for functional expansion is there!

Michel.
---Sent: 2010-09-29 19:02:22 UTC