Re: int2interval, frac2interval, rat2interval - signed integer zeros
On 2012-04-20 16:11:45 -0400, Ian McIntosh wrote:
> Vincent Lefevre <vincent@xxxxxxxxxx> wrote on 04/20/2012 11:55:39 AM:
> > On 2012-04-20 16:15:20 +0100, N.M. Maclaren wrote:
> . . .
> > > As far as computational integers and floating-point goes, either or
> > > both can have signed zeroes, and the problems are almost identical.
> >
> > Signed zeroes are a bad idea for integers (even for floating-point,
> > it wasn't a very good idea). And almost all implementations do not
> > support signed zeroes for integers (actually I don't know any
> > integer implementation with signed zeroes, and really seen as
> > signed at Level 2). P1788 must ignore them.
> . . .
>
> In the 1970s and 80s I used Control Data computers including the 3500, and
> the 6600 and its 6x00, 7600 and CYBER 7x/17x/7x0 successors. CDC's
> machines from that era used ones-complement integers. That had two
> implications:
> - The negative and positive ranges were symmetrical, unlike
> twos-complement which has an extra negative value.
> - There were two representations of zero, one with all zero bits and one
> with all on bits.
> The two zeros of course compared equal to each other.
However in a math expression, it is not possible to differentiate
these two zero representations, and for P1788 they would be regarded
as a single zero.
And it didn't have signed infinities in the integer types (let's
recall that Nick suggested signed zeros for signed infinities).
--
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 / AriC project (LIP, ENS-Lyon)
- References:
- Re: int2interval, frac2interval, rat2interval
- Re: int2interval, frac2interval, rat2interval
- Re: int2interval, frac2interval, rat2interval
- Re: int2interval, frac2interval, rat2interval
- Re: int2interval, frac2interval, rat2interval
- Re: int2interval, frac2interval, rat2interval
- Re: int2interval, frac2interval, rat2interval
- Re: int2interval, frac2interval, rat2interval - signed integer zeros