Re: On writing negative zero - with or without sign
- From: tholen@xxxxxxxxxxxx
- Date: 21 Jul 2007 18:35:24 GMT
James Giles writes:
To summarize:
Point one: when used to simulate the continuous real numbers,
floating point is *always* inexact.
I disagree. There is a subset of the continuous real numbers that
can be exactly represented with a finite number of bits. Alternatively,
if one had an infinite number of bits to represent that subset, the
extra bits would all have the same status (on or off, depending on how
you chose to implement the representation).
For example, I cannot exactly represent the value for pi using a
finite number of decimal digits. However, I can exactly represent
the value "one tenth" using a finite number of decimal digits.
There is no "exact zero", or any other real number.
That is a semantic argument. I provided one concept of an exact
zero. I argue that it's a reasonable concept. I've not seen anyone
offer a counter argument for it not being a reasonable concept.
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.
Our decimal system is one of the "any" discrete reprsentations of
the continuous real values, and as I noted above, there is a
subset of the continuous real values that can be exactly represented.
Nor is there any reason zeros can't have signs.
Agreed. But that doesn't mean that zeros must always 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.
Irrelevant to the current discussion, because I'm not aware of
anyone who has claimed that zeros can't have signs.
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.
That avoids the more fundamental question of how to decide when
to set that internal sign bit. I once again refer you to your
thermometer example. There is no way for the processor to know
whether to set it or not.
Now, another contributor to this thread consistently confuses
these separate points.
I'm not aware of any such contributor.
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.
On what basis do you claim that differences of identically
represented numbers are not exact zeros?
Nothing about that example is relevant to the second
point in any way at all.
But your thermometer example is relevant to the second point.
Similarly,since the I/O library has
no idea about the origin or meaning of
Of what?
.
- Follow-Ups:
- Re: On writing negative zero - with or without sign
- From: glen herrmannsfeldt
- Re: On writing negative zero - with or without sign
- From: James Giles
- 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
- Re: On writing negative zero - with or without sign
- From: James Giles
- On writing negative zero - with or without sign
- Prev by Date: Re: Flavors of zero, flavors of infinity Re: On writing negative zero -
- 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):