http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2011-04-15
19:31:06 UTC ---
I am missing something here:
"print "(RU,G15.2)", .991d0
prints 1.00 but the expected result is 1.0 because 1 - r * 10**-2 < .991 with r
= 1 because of UP rounding mode"
We are asking for two decimal digits in g15.2 above so 1.00 looks right to me.
I do see a problem with this:
print "(RU,G15.1)", .991d0
print "(RU,G15.2)", .991d0
print "(RU,G15.3)", .991d0
print "(RU,G15.4)", .991d0
print "(RU,G15.5)", .991d0
Which gives:
1. <--This should be 1.0 I believe
1.00
0.991
0.9910
0.99100
On the rounding down side we have:
print "(RD,G15.1)", .991d0
print "(RD,G15.2)", .991d0
print "(RD,G15.3)", .991d0
print "(RD,G15.4)", .991d0
print "(RD,G15.5)", .991d0
Gives:
0. <-- This should be 0.9 I believe
0.99
0.990
0.9909
0.99099
What do you think Thomas?