Summary: | Incorrect results from floating point computations on x86 when optimized | ||
---|---|---|---|
Product: | gcc | Reporter: | D. Richard Hipp <drh> |
Component: | target | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | dkm, ebotcazou |
Priority: | P3 | ||
Version: | 9.4.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | ||
Attachments: | bug.c - compile and run to demonstrate the problem |
Description
D. Richard Hipp
2023-07-05 19:17:57 UTC
Either use -fexcess-precision=standard or -std=c99 . Basically this is a dup of bug 323. *** This bug has been marked as a duplicate of bug 323 *** >undefined or unspecified behavior Neither. Basically GCC uses excess-precision for the fpu as supplied by x87 (80bit IEEE FPU). Anyways read bug 323 and all of the specifications around FP math and more. Yes, everybody should use -mfpmath=sse these days on x86. |