Re: On writing negative zero - with or without sign
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Sun, 15 Jul 2007 20:15:21 -0700
<robert.corbett@xxxxxxx> wrote:
Because the members of the committee
do not want to rewrite the standard to say what they think it
should mean, they choose to apply a remarkably contorted
interpretations to the standard as written.
I disagree with the characterization of both the motives and the alleged
contortion.
In any case, Section 4.4.2 of the Fortran 2003 states....
That statement establishes that there is a zero value and that
processors may distinguish between positive and negative zeros.
Yes.
Section 10.6.1 states
(3) On output with I, F, E, EN, ES, D, and G editing,
the representation of a positive or zero internal
value in the field may be prefixed with a plus sign,
as controlled by the S, SP, and SS edit descriptors
or the processor. The representation of a negative
internal value in the field shall be prefixed with
a minus sign.
That statement establishes that zero and positive values are
treated the same for formatted output.
I see no wording that says "the same" or anything like that.
How do members of J3 justify treating zero values as negative
values, given the statements quoted above? One member of the
committee has claimed that positive and negative zeros are not
zero values, that they are positive values or negative values.
That interpretation makes the statement cited from Section 4.4.2
irrelevant.
Well. We are clearly getting off into individual opinions here. I do
note that Bob was careful to say "one member". Don't overlook that when
reading. One member is not particularly close to a majority. In fact,
that would be insufficient for a second. I'm not quite sure what member
he is talking about. But it doesn't really matter. Remember that
committee membership is not particularly difficult to get. The statement
that "one member" claims something is a lot like saying that "one
person" claims something. You can find one person who will claim almost
anything; I'm not sure that the "almost" qualifier is even needed. I've
bitched here before about people trying to give increased credence to an
otherwise anonymous citation by saying that "a committee member" said
something.
If we were playing that game, I could raise with a "the editor said",
but I think I'll stick with the technical arguments.
At least two members of the committee have latched on to the
word "may" in the statement cited from Section 10.6.1. They
take the use of that word as meaning that positive and zero
values "may be prefixed with a plus sign, as controlled by the
S, SP, and SS edit descriptors or the processor," but, then again,
they may not.
I'm one of the members who indeed think that the word "may" means "may",
but the above is an inaccurate representation of the position. The "but
then again they may not" doesn't make sense to me as particularly
related. As one of the people who I presume Bob is citing, I think I get
some say in what I said. It wasn't that. Of course it might not (I'd say
"might" instead of "may" for this usage, but that's a quibble). There
never has been the least bit of question about the fact that there might
be no prefix at all. In fact, with SS, there is required to be no prefix
for positive values.
The point was that the above says that "a zero internal may be prefixed
by a plus sign, as controlled". However, that statement is not
exclusionary. It doesn't say that a zero may not ever be preceeded by a
minus sign.
In fact, since the above quote explicitly says that a negative value is
prefixed with a minus sign, I find it difficult to interpret it any
other way. A negative zero is negative. If you want to claim otherwise,
then I'm going to say you have pot/kettle/black problems in talking
about contorted interpretations.
The line about how a zero may be prefixed with a plus is perhaps not
perfectly clearly written, in that it doesn't make the parallel
statement that a zero may be prefixed by a negative sign in some cases,
but it at least does not contradict that possibility.
They too have to interpret negative zeros as
negative values...
Um, yes. I interpret the modifier "negative" to mean "negative". There
are systems that don't have a negative zero, but for ones that have one,
it is negative. That's why it is called, coincidentally, a negative
zero.
Of course, this line of
interpretation opens the possibility of prefixing the external
representation of a zero value with both a plus sign and a minus
sign.
Only if you go out of your way to read perversely. I think that is a lot
more convoluted reading than the argument that the "negative" in
"negative zero" doesn't mean that it is negative.
I believe the standard should allow an implementation to prefix
the external representation of a zero value that the processor
recognizes as a negative zero with a minus sign.
Me too.
I differ with
at least some members of the committee in that I do not believe
the standard as it is currently written allows that for the
reasons given above.
That's where I disagree with you. I think the standard already says
that. I think its wording is less than ideal, but I think that's what it
says. No, I did not say or think that I "do not want to rewrite the
standard to say what they think it should mean". I'll speak for myself,
thank you. I have never said or thought that, and I find that a
prejudicial misstatement of my position.
What I do think is that the standard already says that, but it is poorly
worded and should be clarified in future versions. I note that in
general, the interpretation process is not supposed to rewrite prior
standards for clarity. It is supposed to rewrite only to correct errors.
Clarifications are issued as interpretations and become candidates for
improved wording in subsequent versions.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- Follow-Ups:
- Re: On writing negative zero - with or without sign
- From: tholen
- Re: On writing negative zero - with or without sign
- From: robert . corbett
- 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
- On writing negative zero - with or without sign
- Prev by Date: Re: Fortran 90 modules suck for portability- why use them?
- 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
|