This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] patch for output of real values on windows systems
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Ian Lance Taylor <ian at airs dot com>
- Cc: FX Coudert <fxcoudert at gmail dot com>, gfortran <fortran at gcc dot gnu dot org>, patch <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 5 Aug 2005 22:21:51 -0700
- Subject: Re: [gfortran] patch for output of real values on windows systems
- References: <42F3E148.9090904@gmail.com> <m3u0i3adrt.fsf@gossamer.airs.com>
On Fri, Aug 05, 2005 at 09:29:58PM -0700, Ian Lance Taylor wrote:
> FX Coudert <fxcoudert@gmail.com> writes:
>
> > The provided fallback sprintf is not perfect: it prints incorrect last
> > digits (at least, not similar to those printed by GNU libc) when used
> > to output very large or very small long double values with high
> > precision (more than 15 digits). Any practical suggestion on this is
> > welcome.
>
> newlib (http://sourceware.org/newlib/) includes an implementation of
> dtoa, originally by David Gay, which is said to correctly represent
> floating point values, based on Steele and White's algorithm. It's in
> newlib/libc/stdlib/dtoa.c. The original version is probably available
> from netlib. There is similar code in other free C libraries.
> There's no need to roll your own code to convert floating point values
> to printable form.
Is newlib GPL+exception compatible? Does David Gay
have a copyright assigment on file with FSF?
--
Steve