May 16, 2010 [Issue 4198] New: [FreeBSD] imprecision in decimal floating-point literals | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=4198 Summary: [FreeBSD] imprecision in decimal floating-point literals Product: D Version: unspecified Platform: x86 OS/Version: FreeBSD Status: NEW Keywords: patch, rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: rsinfu@gmail.com --- Comment #0 from Shin Fujishiro <rsinfu@gmail.com> 2010-05-16 04:42:15 PDT --- Created an attachment (id=632) Patch for DMD (svn r490) This assertion fails with DMD built on FreeBSD 8: -------------------- static assert(1.0L == 0x1.0p+0L); // Error: static assert (0x1.00000000000004p+0L == 1L) is false -------------------- The left decimal floating-point literal is slightly wrong. The compiler uses some tables (negtab and postab) for converting decimal strings to long double values, but GCC on FreeBSD/i386 slightly changes them by rounding everything in the table to double precision. This causes precision loss of decimal floating-point literals. The attached patch fixes the problem, by adding byte sequence version of the numeric tables to backend/strtold.c so that the tables' contents will not be rounded by GCC. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 04, 2010 [Issue 4198] [FreeBSD] imprecision in decimal floating-point literals | ||||
---|---|---|---|---|
| ||||
Posted in reply to Shin Fujishiro | http://d.puremagic.com/issues/show_bug.cgi?id=4198 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |FIXED --- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2010-08-04 13:17:51 PDT --- http://www.dsource.org/projects/dmd/changeset/597 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation