------- Comment #9 from jvdelisle at gcc dot gnu dot org 2009-10-01 01:37 ------- Rounding modes are now implemented for formatted WRITE operations. I do not have a clear enough idea of what the rounding modes really mean for READ operations. For example:
>From Comment #4 "Rounding is done for all I/O, including input. For example, if you have: read ("0.1", *, rounding="up") x read ("0.1", *, rounding="down") y then you will have x == nearest(y, -1.)" Is this really what is meant by rounding up or down? The internal representation of .1 may already be rounded up or down from a binary representation that carried more bits in the conversion process. If we do not have access to more bits, how are we to know whether it is not already "half way in between" Similarly with nearest. By definition the result of the intrinsic nearest is already the next bit up or down from the internally stored value. So what does "rounding" ,mean here? Does it mean if the LSB is a 1 turn it into a 0 and if it is a 0, leave it a zero? This all seems absurd to my practical side. The Fortran standard seems very vague to me and yet it does imply rounding on input. Suggestions anyone? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35862