[Bug 159] New: Correctly handle excess FPU precision

via D.gnu d.gnu at puremagic.com
Thu Sep 18 01:29:20 PDT 2014


http://bugzilla.gdcproject.org/show_bug.cgi?id=159

            Bug ID: 159
           Summary: Correctly handle excess FPU precision
           Product: GDC
           Version: development
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gdc
          Assignee: ibuclaw at gdcproject.org
          Reporter: ibuclaw at gdcproject.org

Taken from:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323

---
import std.stdio;

void test(double x, double y)
{
  double y2 = x + 1.0;
  if (y != y2)
    writeln("error");
}

void main()
{
  immutable double x = .012;  // Remove 'immutable', and 'error' is not
printed.
  double y = x + 1.0;

  test(x, y);
}
---


This is a GCC bug with a front-end fix.  It may be a good idea to conform to
this behaviour in D (GDC) too.  If not at least because the reference compiler
doesn't appear to optimise aggressively enough to get this problem.

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20140918/e2f79fbd/attachment.html>


More information about the D.gnu mailing list