bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Easy Accurate Reading and Writing of Floating-Point Numbers


From: Marc Nieper-Wißkirchen
Subject: Re: Easy Accurate Reading and Writing of Floating-Point Numbers
Date: Sat, 23 May 2020 17:50:33 +0200

Am Sa., 23. Mai 2020 um 16:52 Uhr schrieb Bruno Haible <address@hidden>:

> > In a future version, I may add a flag to select between %e, %f, and %g.
>
> Hmm, that route is likely going the path to sprintf: First a flag to
> select among %e, %f, %g. Then an optional width. Then a flag to select
> whether to fill with spaces or with zeroes.
> If you go that route, it's better to start with full sprintf and define
> a particular "precision" that would mean "as many digits as needed to
> guarantee that the result can be unambiguously read back in".

So you mean that we should hack it into
http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/vasnprintf.c?

How can we ensure that this module is (at least) in one-way sync with
glibc's (va)s(n)printf?

But it is an intriguing idea!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]