This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/35862] [F2003] Implement new rounding modes for run time



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2008-04-15 20:59 -------
(In reply to comment #4)
> Well, I would argue that this digit is the most important for rounding...

Only for list-directed output and if people use really large formats (which is
a lot of cases). Otherwise, not.

> Does this mean we have to roll out our own implementation which replaces
> snprintf?

Might be.

> I probably miss something, but where on input do you need to round?

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.)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35862


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]