newlib-cygwin/newlib/libc
Corinna Vinschen 97dac2bbcb ldtoa: fix dropping too many digits from output
ldtoa cuts the number of digits it returns based on a computation of
number of supported bits (144) divide by log10(2).  Not only is the
integer approximation of log10(2) ~= 8/27 missing a digit here, it
also fails to take really small double and long double values into
account.

Allow for the full potential precision of long double values.  At the
same time, change the local string array allocation to request only as
much bytes as necessary to support the caller-requested number of
digits, to keep the stack size low on small targets.

In the long run a better fix would be to switch to gdtoa, as the BSD
variants, as well as Mingw64 do.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-11-04 13:15:39 +01:00
..
argz Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
ctype fix and amend scripts and makefile rules to generate Unicode data 2021-07-06 15:35:37 +02:00
errno Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
iconv Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
include Unconditionally declare strsignal 2021-10-27 20:02:06 +02:00
locale Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
machine libgloss/newlib: rename configure.in to configure.ac 2021-09-13 10:14:37 -04:00
misc Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
posix nftw: fix thread cancellation support 2021-09-03 12:26:17 +02:00
reent Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
search Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
signal newlib: sig2str: use __restrict 2021-09-15 10:08:20 -04:00
ssp Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
stdio svfwscanf: Simplify _sungetwc_r to eliminate apparent buffer overflow 2021-08-18 10:37:24 +02:00
stdio64 Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
stdlib ldtoa: fix dropping too many digits from output 2021-11-04 13:15:39 +01:00
string string: Fix buffer overrun in picolibc/newlib/libc/string/strrchr.c (#184) 2021-10-13 16:39:49 -04:00
sys libgloss/newlib: rename configure.in to configure.ac 2021-09-13 10:14:37 -04:00
syscalls Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
time Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
unix Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
xdr Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
Makefile.am ssp: add build infrastructure 2017-11-29 11:25:46 -06:00
Makefile.in Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
Makefile.unidata fix and amend scripts and makefile rules to generate Unicode data 2021-07-06 15:35:37 +02:00
aclocal.m4 Fix up errors in regenerated files for 2.3.0 release. 2016-01-04 12:57:31 -05:00
configure Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
configure.ac libgloss/newlib: rename configure.in to configure.ac 2021-09-13 10:14:37 -04:00
libc.in.xml ssp: add documentation 2017-11-29 11:25:45 -06:00
libc.texinfo ssp: add documentation 2017-11-29 11:25:45 -06:00
saber Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
sys.tex Don't include stdio64 functions in reentrant syscalls menu when not bulding stdio64. 2015-08-03 09:54:33 +01:00