Proposed appoach for PR32611 output negative signs for zero

Jerry DeLisle jvdelisle@verizon.net
Sun Jul 8 17:37:00 GMT 2007


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



More information about the Fortran mailing list