|
Message-ID: <ca099df7-a6a2-4c08-9a80-0502a16d1d25@getmailbird.com>
Date: Wed, 25 Sep 2019 09:32:35 -0500
From: "Anastasios" <antonbachin@...oo.com>
To: "" <musl@...ts.openwall.com>
Subject: Bug report: strtod drops LSB
Hello,
Consider this program, strtod.c:
#include <stdlib.h>
#include <stdio.h>
int main()
{
printf("%lf\n", strtod("283686952306183", NULL));
}
With current musl master from Git:
$ musl-gcc -static strtod.c -o a.musl
$ ./a.musl
283686952306176.000000
By comparison, with glibc:
$ gcc -static strtod.c -o a.glibc
$ ./a.glibc
283686952306183.000000
The correct binary representation of this float is
0x42f0203040506070
but musl strtod produces
0x42f0203040506000
i.e., it fails to set the LSB. I examined this while ruling out printf as the cause.
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.