RE: More on trits & tetrits... (long) - compromises
Catching an exception on overflow would let one know when it happened. In that sentence I was referring to earlier discussion about the semantics of operations on Overflow versus Infinity, where Overflow represents a finite value that has overflowed.
The key issue is that 754 defines 0 x Infinity to be NaNQ, while (simplified a bit) 1788 wants [0, 0] x [anything, Infinity) to be [0, 0], which is the right answer for 0 x Overflow (where the value Overflow doesn't exist in 754). The general IA approach is that Infinity can only be approached not reached, so a bound of Infinity really means a finite upper bound. One difficulty is that if you use a 754 multiply you will get the wrong answer, so you must either not use 754, or prevent the error, or detect and fix it.
If 754 had included Overflow and Underflow as special "values" (meaning sets of values), a 1788 implementation based on 754 would be simpler and faster. And if you had special 1788 hardware I think there would still be advantages. The main disadvantage would be incompatibility with 754, but 754 users could benefit from it too so maybe it might become part of a future 754-201x?
Catching exceptions on rare cases like underflow and overflow and replacing the result value with the smallest Subnormal and a special NaN pattern respectively representing Underflow and Overflow would be an efficient way to implement the semantics. Thanks.
- Ian McIntosh IBM Canada Lab Compiler Back End Support and Development
"Ferguson, Warren E" ---04/29/2010 12:35:16 PM---If you want to capture pure Overflow cases, then just unmask Overflow. Doesn't this achieve what you

From: | 
"Ferguson, Warren E" <warren.e.ferguson@xxxxxxxxx> |

To: | 
Ian McIntosh/Toronto/IBM@IBMCA |

Date: | 
04/29/2010 12:35 PM |

Subject: | 
RE: More on trits & tetrits... (long) - compromises |
If you want to capture pure Overflow cases, then just unmask Overflow. Doesn't this achieve what you want? Now it won't be fast because you'll have to write the exception handler ...
Arithmetic on infinities is generally exact and so won't signal any exception.
Warren Ferguson
-----Original Message-----
From: stds-1788@xxxxxxxx [mailto:stds-1788@xxxxxxxx] On Behalf Of Ian McIntosh
Sent: Thursday, April 29, 2010 9:13 AM
To: stds-1788@xxxxxxxxxxxxxxxxx
Subject: Re: More on trits & tetrits... (long) - compromises
IEEE took a few shortcuts to make 754 more implementable. One is that as I've mentioned before the separate concepts of Overflow and Infinity were merged into a single value (for each sign), when it would be more correct to keep them separate. Another that several others have implied is that Underflow and Zero were merged into the single value zero (for each sign), when it would be more correct to keep them separate (eg, make the smallest subnormal mean Underflow). Another mentioned previously is the lack of a signless Infinity. So it was inevitable that zero would be signed and that some operations and functions (IEEE or not) would care about its sign, while others don't. Treating zero as signed also matches keeping negation simple (just flipping the sign bit).
An issue we need to deal with is to what extent 1788 can use 754 semantics. I expect most implementations in the next decade to have to use 754 hardware, and to be vastly slower if any of the fundamental semantics differ. Many users outside this group may be reluctant to adopt it if it differs or is slower. So its success likely depends on compromise. On the other hand, if any of the semantics are incompatible or if it is only feasible with brand new hardware, then a number of 754 compromises and shortcuts could be cleaned up.
- Ian McIntosh IBM Canada Lab Compiler Back End Support and Development
Inactive hide details for Vincent Lefevre ---04/29/2010 03:00:55 AM---On 2010-04-28 12:01:43 -0400, Michel Hack wrote: > That wVincent Lefevre ---04/29/2010 03:00:55 AM---On 2010-04-28 12:01:43 -0400, Michel Hack wrote: > That would be a very different arithmetic. Yes,
From:
Vincent Lefevre <vincent@xxxxxxxxxx>
To:
Ian McIntosh/Toronto/IBM@IBMCA
Date:
04/29/2010 03:00 AM
Subject:
Re: More on trits & tetrits... (long)
________________________________
On 2010-04-28 12:01:43 -0400, Michel Hack wrote:
> That would be a very different arithmetic. Yes, 1788 is defined over
> the Reals, but 754 is defined over the Affine Extended Reals, which is
> also why it has signed zeros as well as signed infinities.
From a rigorous mathematical point of view, it isn't: there are no
signed zeros in the affinely extended reals.
http://mathworld.wolfram.com/AffinelyExtendedRealNumbers.html
If x is zero, one has f(-x) = f(x) in the affinely extended reals, but
in IEEE 754 arithmetic, this is wrong, even if all the operations are
exact.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)