This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/21718] real.c rounding not perfect
- From: "exploringbinary at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Sep 2013 18:00:16 +0000
- Subject: [Bug middle-end/21718] real.c rounding not perfect
- Auto-submitted: auto-generated
- References: <bug-21718-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21718
--- Comment #18 from Rick Regan <exploringbinary at gmail dot com> ---
(In reply to Vincent LefÃvre from comment #17)
> I confirm that it is an architecture-dependent bug. I can't reproduce any
> error with your test program on
> http://www.exploringbinary.com/incorrectly-rounded-conversions-in-gcc-and-
> glibc/ even with old gcc versions, from an x86_64 machine.
Thanks for the quick and thorough response!
Besides those testcases, I wrote an automated testcase to test gcc conversions;
I have not found any incorrect ones. (In a loop, the program generates a random
decimal string and puts it in a small C program that it compiles and executes
on the fly. The generated C program then checks the result against David Gay's
strtod(), the result of which I also coded into the program.)
As an aside, I see that you must have an older version of glibc; I have been
testing strtod() in glibc 2.18 and I no longer get incorrect conversions.
According to this, http://sourceware.org/bugzilla/show_bug.cgi?id=3479, it was
fixed in 2.17.
(I will be writing this up on my blog soon to reflect the new status of these
problems.)