This is the mail archive of the gcc-patches@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]

Re: [Patch, Fortran] Rework of floating point number reading


> 1.) Check other compilers and decide the rounding error is not that much
> of a problem.

The rounding error is always a problem, unfortunately.  Suppose you
write a *printing* function in Fortran, and this function has a constant
in it; my experience is that a 1-ulp rounding error in parsing the
constant will almost invariably cause you to print 10^n as 10^(n+1) or
10^(n-1) for some n, or other embarrassing bugs.

> 2.) Allow the user to choose, maybe something like -ffast-math for IO
> (don't know what to think about this).

A possibility.

> 3.) Keep using strtod; I'm quite sure we can speed up the existing code
> still significantly by optimizing how the string passed to strtod is
> constructed.

Yes, by not using sprintf for example.  It might even be better than
pow, which is all but fast.

Paolo


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