Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <DINYUK3U433P.2FZVQ27RMSTB4@posteo.net>
Date: Thu, 21 May 2026 01:33:13 +0000
From: "Sertonix" <sertonix@...teo.net>
To: <musl@...ts.openwall.com>
Subject: strtod: 

Hi,

I noticed a subtle difference in the result of strtod on alpine linux
between arm/ppc64le and other arches. The following reproducer shows
1.3754889325393114e+24 on x86_64 and 1.3754889325393111e+24 on armv7.
Is this maybe a musl bug or is that level of precision undefined?

#include <stdio.h>
#include <stdlib.h>

int main() {
	char *end;
	double v = strtod("0x0123456789ABCDEFabcdef", &end);
	printf("%.16e\n", v);
}

In the binaryen test suite this difference causes tests like these to fail:
https://github.com/WebAssembly/testsuite/blob/9233a0a8d5920a8d32358ee915a3662ff3385029/simd_f64x2_rounding.wast#L67

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.