Subject: bug#54785: for floating point, printf should use double like in C instead of long double

From: Paul Eggert <[email-masked]>
Date: Wed, 27 Apr 2022 10:25:23 -0700

On 4/27/22 05:10, Glenn Golden wrote:
> Ok, I see what you mean, thanks for the explanation. I'll pose the question (or maybe file a bug report) on the glibc list.

By the way I now think I see a reason for why glibc does things the way 
it does: it minimizes output size.

'double' has 53 bits counting the hidden bit, and with 53/4 you have 13 
hex digits plus one leading digit that is either 0 (unnormalized) or 1 
(normalized).

'long double' has 64 bits and with 64/4 you have 16 hex digits, where 
the leading digit is 0-7 (unnormalized), 8-f (normalized).

Any proposal to change 'long double' to always output leading 0 or 1 
needs to deal with the fact that this'd lengthen the output string.