NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/56148: lib/libc/stdio/t_printf:snprintf_float test randomly fails



On Sun, May 09, 2021 at 01:27:39PM -0400, Christos Zoulas wrote:
> I am not aware of any libc implementations that don't allocate memory to do double-to-ascii conversions.
> From what I've seen Solaris does the best here calling malloc only in __big_float_times_power().
> I don't see us replacing gdtoa anytime soon, so we should probably document this in the snprintf() man pages.
> We could also file a bug report with opengroup/posix to make ENOMEM legal for floating point conversions.

It isn't even a question of replacing gdtoa, the alternatives will very,
very likely run into the same problem that the power-of-five tables are
huge if pre-computed or require large stack space or allocations if
computed dynamically. That's the nature of the problem.

Joerg


Home | Main Index | Thread Index | Old Index