mailing list of musl libc
 help / color / mirror / code / Atom feed
* printf issues
@ 2014-04-04 13:32 Morten Welinder
  2014-04-04 14:12 ` Rich Felker
  2014-04-04 14:15 ` Szabolcs Nagy
  0 siblings, 2 replies; 27+ messages in thread
From: Morten Welinder @ 2014-04-04 13:32 UTC (permalink / raw)
  To: musl

I am seeing differences in how printf("%.200Lg",val) works between musl code
and glibc.

Here are some samples.  The top line is how musl prints, the bottom is glibc.

-65878995336522048.000000000
-65878995336522048

1954675876964773.500000000
1954675876964773.5

3953605802361882.000000000
3953605802361882


Unrelatedly, from function fmt_fp:

#define CONCAT2(x,y) x ## y
#define CONCAT(x,y) CONCAT2(x,y)
[...]
            long double round = CONCAT(0x1p,LDBL_MANT_DIG);

That code is cute as a Hello Kitty door knocker, but really?  Let's hope nobody
gets the urge to define LDBL_MANT_DIG as 0100 or (80-16) or some such.
The first case will still compile, but get the wrong result.

Morten


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2014-04-07 18:04 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-04 13:32 printf issues Morten Welinder
2014-04-04 14:12 ` Rich Felker
2014-04-04 14:15 ` Szabolcs Nagy
2014-04-04 14:35   ` Morten Welinder
2014-04-04 14:56     ` Szabolcs Nagy
2014-04-04 15:07     ` Rich Felker
2014-04-04 17:42       ` Morten Welinder
2014-04-04 18:54         ` Szabolcs Nagy
2014-04-04 20:01           ` Morten Welinder
2014-04-04 20:22             ` Morten Welinder
2014-04-04 21:08               ` Rich Felker
2014-04-04 22:50                 ` Morten Welinder
2014-04-05  0:01                   ` Morten Welinder
2014-04-05  1:41                     ` Rich Felker
2014-04-07  7:29                     ` Rich Felker
2014-04-07 13:40                       ` Morten Welinder
2014-04-07 14:13                         ` Morten Welinder
2014-04-07 15:36                           ` Szabolcs Nagy
2014-04-07 18:04                             ` Rich Felker
2014-04-04 20:54             ` Szabolcs Nagy
2014-04-04 21:02             ` Rich Felker
2014-04-05  2:08               ` Morten Welinder
2014-04-05  2:50                 ` Rich Felker
2014-04-06 23:07                   ` Szabolcs Nagy
2014-04-04 21:00           ` Rich Felker
2014-04-04 21:10             ` Szabolcs Nagy
2014-04-04 20:58         ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).