possible snprintf() regression in 3.3.2
Lemke, Michael SF/HZA-ZI2E
lemkemch@schaeffler.com
Wed Nov 24 12:29:02 GMT 2021
On Wednesday, November 24, 2021 10:28 AM Corinna Vinschen wrote:
> On Nov 24 18:14, Takashi Yano via Cygwin wrote:
> > On Wed, 24 Nov 2021 17:52:04 +0900
> > Takashi Yano wrote:
> > > The printed value is still something wrong...
> > > sqrt(2)*1e70 should be an integer value.
> >
> > I mean...
> >
> > sqrt(2)*1e70 is actually not an integer, however, double has mantissa
> > of only 52 bit. So, (double value)*(5^70*2^70) should be an integer.
>
> The conversion is a bit inexact, I guess, but that's another problem
> of this old ldto, right?
Just in case you didn't notice: Only the first 16 digits of both of
Takashi's long numbers are correct. Floating point accuracy?
Michael
More information about the Cygwin
mailing list