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, 09 Oct 2013 18:58:42 +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 #19 from Rick Regan <exploringbinary at gmail dot com> ---
I've looked into this and found that real.c/real.h use a precision of
SIGNIFICAND_BITS, which is dependent on an architecture-dependent value called
HOST_BITS_PER_LONG. In addition, SIGNIFICAND_BITS limits the precision to 192
bits on a 64-bit system, and I was able to find an example of an incorrect
conversion there:
5.0216813883093451685872615018317116712748411717802652598273e58.
(Please see my article
http://www.exploringbinary.com/gcc-conversions-are-incorrect-architecture-or-otherwise/
for details.)