This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/35862] [F2003] Implement new rounding modes for run time
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Apr 2008 20:59:26 -0000
- Subject: [Bug libfortran/35862] [F2003] Implement new rounding modes for run time
- References: <bug-35862-10743@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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