GNU bug report logs - #54785
for floating point, printf should use double like in C instead of long double

Previous Next

Package: coreutils;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Fri, 8 Apr 2022 09:18:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Glenn Golden <gdg <at> zplane.com>, 54785 <at> debbugs.gnu.org
Subject: bug#54785: for floating point, printf should use double like in C instead of long double
Date: Wed, 27 Apr 2022 20:52:26 +0200
On Apr 27 2022, Paul Eggert wrote:

> 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.

The real reason for not using that format is that 64 bits can be
conveniently formatted without having to shift around the mantissa, and
having to handle the shifted out bits specially.  For IEEE quad with its
112 bits of mantissa and the hidden bit, this format is again more
convenient.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




This bug report was last modified 3 years and 46 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.