Re: gcc 11.1.0: printf("%.43f\n", 0x1.52f8a8e32e982p-140): printed value is incorrectly rounded
Takashi Yano <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 30 Nov 2021 16:09:26 +0100 Corinna Vinschen wrote: > Could some people with other targets than Cygwin give this patch a try? > RTEMS, anybody? I have confirmed new gdtoa code works with a simple printf test for the following two platforms. - aarch64 (128bit long double with little endian) - armv7l (64bit long double with little endian) Actually, LDBL_MANT_DIG == DBL_MANT_DIG in armv7l platform, so gdtoa code would not be used. To make gdtoa code be used forcibly, a simple patch was applied for vfprintf.c and gdtoa-ldtoa.c. Without this patch, _dtoa_r is used even for long double, which also works as expected. -- Takashi Yano <[email protected]>