Re: On writing negative zero - with or without sign
- From: tholen@xxxxxxxxxxxx
- Date: 21 Jul 2007 18:53:31 GMT
James Giles writes:
....
It's the processor's misdirection, if it displays a sign on the
zero, not mine. You repeatedly ignoring the fifty percent
probability of the processor getting it wrong helps your cause
none at all.
Sigh... I've answered this too many times. I ignored nothing.
I disagree.
I was the first that stated the sign on the output of that *particular*
example was irrelevant.
Which is your justification for ignoring it.
But, the sign is present like it or not.
Only because you insist that a sign must be present. As I noted
in another posting, the situation is more complex than that.
No sign means the same as a plus sign.
Doesn't have to be that way. Sure, in a binary representation, if
you allocate only a single bit to the sign, then you can have only
two states. But we're talking about the external representation,
where in theory we can have many different characters, including
minus, plus, blank, greater than, less than, and even plus-minus.
I don't care whether you agree - it's the truth.
Are you talking about the way things were, the way things are,
or the way things ought to be?
There are only two possibilities:
plus zero of minus zero.
A single sign bit can have only two states. But the external
representation utilizes characters, and there are more than two
from which to choose.
There is no third choice. There's
not going to be a third choice. Get used to it. It's a fact of
computing.
I disgaree. We now have double-byte character sets. Why not
double bit signs?
Nor is this example even remotely relevant the the question
of what the I/O library should do with the sign of zero. The I/O
library *must* output all it knows.
Suppose it knows nothing, as in your thermometer example?
That includes a correct
indication of the sign of the value being printed. This is a
very simple concept: the I/O library can't discern the meaning
of the value or whether the sign is meaningful or not.
Precisely. So in your thermometer example, where the sign isn't
meaningful, the processor doesn't know that, thus it has a fifty
percent chance of getting it wrong by being forced to display a
sign.
I don't
see how anyone can fail to grasp such a simple concept.
Who here has failed to grasp that simple concept? Have you
failed to grasp the fifty percent probability of getting the
sign wrong?
What rule for magically discovering whether the sign has
meaning or not do you propose?
You already gave the answer: the precision of the thermometer
was limited to 0.1 deg. Based on the limited amount I've been told
about interval arithmetic in this discussion, an implementation of
that sounds like it could do the job.
Give specifics. Since you
have repeatedly asked "what if the user doesn't know if the
sign is meaningful or not?", your magical decision making
method can't rely on user input.
The user is frequently different from the programmer. It's up
to the programmer to supply sufficient information so that the
user has what he needs.
If the user doesn't know
when reading the output, (s)he can't know at compile time
either.
You're clearly assuming that the user is the same as the
programmer. Hardly the norm.
Unless you're planning to *always* supress the zero?
No.
Ok, but no one will think your method is in the least
useful.
You're proceeding from an erroneous presupposition.
You'll be disregarded entirely (and correctly so).
You're still proceeding from an erroneous presupposition.
.
- Follow-Ups:
- 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: 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: Gordon Sande
- 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: 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
|