This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Proposed appoach for PR32611 output negative signs for zero
- From: Tim Prince <tprince at myrealbox dot com>
- To: Jerry DeLisle <jvdelisle at verizon dot net>
- Cc: Fortran List <fortran at gcc dot gnu dot org>
- Date: Sun, 08 Jul 2007 11:40:04 -0700
- Subject: Re: Proposed appoach for PR32611 output negative signs for zero
- References: <46912024.6000005@verizon.net>
- Reply-to: tprince at computer dot org
Jerry DeLisle wrote:
Hi All,
I am proposing the following approach to this issue of printing a
negative sign for zero.
The Fortran 77 standard explicitly prohibits printing the negative
sign. The F95 and F2003 standards only say that if the internal value
is negative a negative sign is output.
I personally struggle with interpreting a zero as having a negative
value and so I could interpret this to mean I don't have to print a
negative value if I don't feel like it (liberal thinking) because zero
is zero.
However, Metcalf, Reid, and Cohen state that the IEEE -0 is
"respected" for output. So out of respect, I think I should print it.
Therefore, I propose that with -std=legacy we do not print the sign,
otherwise we do. This means that -std=legacy will be required to pass
NIST. It also means that in this case we will not match up with g77
behavior without -std=legacy.
Opinions please.
Jerry
Makes sense to me.