Re: On writing negative zero - with or without sign
- From: "James Giles" <jamesgiles@xxxxxxxxxxxxxxxx>
- Date: Fri, 20 Jul 2007 23:22:38 GMT
To summarize:
Point one: when used to simulate the continuous real numbers,
floating point is *always* inexact. There is no "exact zero",
or any other real number. There are only approximations.
There is no such thing as an "exact zero" (or any other "exact"
number) when using float for simulating continuous reals
because that's an inherent property of the use of *any* discrete
representation to simulate continuous values. Nor is there any
reason zeros can't have signs. Numbers were invented by people.
People have in fact invented several thousand different kinds
of mathematics (my introductory abstract algebra course covered
nearly a hundred). To invent a number system with signed
zeros is neither shocking nor illicit. It's damned useful. Claiming
that zeros *can't* have signs under any circumstances because
of some inherent characteristics they have is correctly identified
as numerological mysticism. In a given invented number system,
signs can adorn anything the inventors want them to.
Point two: on output the I/O implementation should always
correctly display a minus sign if the number's internal sign
bit was set. This is true for all magnitudes of values being
output. Not to do so is irresponsible.
Now, another contributor to this thread consistently confuses
these separate points. They have nothing to do with one another.
A clear demonstration of the fact that differences of identically
represented numbers are *not* exact zeros verifies the first
point. Nothing about that example is relevant to the second
point in any way at all. Similarly,since the I/O library has
no idea about the origin or meaning of
--
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare
.
- Follow-Ups:
- Re: On writing negative zero - with or without sign
- From: tholen
- Re: On writing negative zero - with or without sign
- References:
- On writing negative zero - with or without sign
- From: Jerry DeLisle
- Re: On writing negative zero - with or without sign
- From: robert . corbett
- Re: On writing negative zero - with or without sign
- From: Richard Maine
- Re: On writing negative zero - with or without sign
- From: robert . corbett
- Re: On writing negative zero - with or without sign
- From: Richard Maine
- Re: On writing negative zero - with or without sign
- From: Terence
- Re: On writing negative zero - with or without sign
- From: Ron Shepard
- Re: On writing negative zero - with or without sign
- From: James Giles
- Re: On writing negative zero - with or without sign
- From: tholen
- Re: On writing negative zero - with or without sign
- From: James Giles
- Re: On writing negative zero - with or without sign
- From: tholen
- Re: On writing negative zero - with or without sign
- From: James Giles
- Re: On writing negative zero - with or without sign
- From: tholen
- Re: On writing negative zero - with or without sign
- From: James Giles
- Re: On writing negative zero - with or without sign
- From: tholen
- Re: On writing negative zero - with or without sign
- From: James Giles
- Re: On writing negative zero - with or without sign
- From: tholen
- Re: On writing negative zero - with or without sign
- From: James Giles
- Re: On writing negative zero - with or without sign
- From: tholen
- On writing negative zero - with or without sign
- Prev by Date: Re: On writing negative zero - with or without sign
- Next by Date: Re: On writing negative zero - with or without sign
- Previous by thread: Re: On writing negative zero - with or without sign
- Next by thread: Re: On writing negative zero - with or without sign
- Index(es):
Relevant Pages
|