public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* gcc 11.1.0: printf("%.43f\n", 0x1.52f8a8e32e982p-140): printed value is incorrectly rounded
@ 2021-06-12 20:45 Pavel M
  2021-06-13  9:42 ` Achim Gratz
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Pavel M @ 2021-06-12 20:45 UTC (permalink / raw)
  To: cygwin

Sample code (t903.c):
#include <stdio.h>
int main(void)
{
    printf("%.43f\n", 0x1.52f8a8e32e982p-140);
    return 0;
}

Invocations:
# gcc on Windows 10 (Cygwin)
$ gcc t903.c -Wall -Wextra -std=c11 -pedantic -Wfatal-errors && ./a.exe
0.0000000000000000000000000000000000000000010

$ gcc --version
gcc (GCC) 11.1.0

# gcc on Linux
$ gcc t903.c -Wall -Wextra -std=c11 -pedantic -Wfatal-errors && ./a.exe
0.0000000000000000000000000000000000000000009

# clang on Windows
$ clang t903.c -Wall -Wextra -std=c11 -ffp-model=strict -pedantic
-Wfatal-errors && ./a.exe
0.0000000000000000000000000000000000000000009

# cl on Windows
$ cl t903.c /std:c11 /Za /fp:strict && ./t903.exe
0.0000000000000000000000000000000000000000009

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

end of thread, other threads:[~2021-11-03 21:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-12 20:45 gcc 11.1.0: printf("%.43f\n", 0x1.52f8a8e32e982p-140): printed value is incorrectly rounded Pavel M
2021-06-13  9:42 ` Achim Gratz
2021-06-13 19:19 ` Brian Inglis
2021-11-03 21:07 ` Pavel M
2021-11-03 21:09   ` Pavel M
     [not found] ` <CAL9Mx1utCxXFPy3vOK0ZOkX2qzt8ntQ0LEyD4WvLpCRRbTLYeQ@mail.gmail.com>
2021-11-03 21:32   ` Pavel M

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 read-only IMAP folder(s) and NNTP newsgroup(s).