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: Bruno Haible
Subject: Re: Easy Accurate Reading and Writing of Floating-Point Numbers
Date: Sat, 23 May 2020 16:52:28 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-177-generic; KDE/5.18.0; x86_64; ; )

Hello Marc,

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

Bruno




reply via email to

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