Date: Thu, 25 Feb 2021 14:18:07 +0000 From: bugzilla-noreply@freebsd.org To: standards@FreeBSD.org Subject: [Bug 253847] Printf does not work correctly for denormal doubles on non-x86 Message-ID: <bug-253847-99@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253847 Bug ID: 253847 Summary: Printf does not work correctly for denormal doubles on non-x86 Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: standards Assignee: standards@FreeBSD.org Reporter: arichardson@FreeBSD.org Test code: ``` cat test2.cpp #include <stdio.h> #include <limits> int main() { // volatile double x =3D 0x1p-1537; volatile double x =3D std::numeric_limits<double>::denorm_min(); printf("x=3D%g/%a, as long double=3D%Lg/%La\n", x, x, (long double)= x, (long double)x); } ``` Output on aarch64 x=3D0/0x1p-1537, as long double=3D4.94066e-324/0x1p-1074 Output on amd64: x=3D4.94066e-324/0x1p-1074, as long double=3D4.94066e-324/0x1p-1074 This causes issues with e.g. the msun ldexp test on AArch64. My guess would be that gdtoa depends on the x86 floating point arithmetic behaviour. I also tried updating gdtoa locally, but other than lots of merge conflicts that did not change anything. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253847-99>