This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/30789] complex folding inexact
- From: "ghazi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Aug 2009 22:28:09 -0000
- Subject: [Bug middle-end/30789] complex folding inexact
- References: <bug-30789-230@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from ghazi at gcc dot gnu dot org 2009-08-12 22:28 -------
(In reply to comment #2)
Joseph - Thanks for your reply and testvalues.
> There are also cases for exact rounding where you'd expect MPC to produce
> the right results but would *not* expect operations executed at runtime to
> produce exactly those results. For example, (1.0 + DBL_EPSILON + 1.0i) *
> (1.0 - DBL_EPSILON + 1.0i), which would only work at runtime if the code
> happens to use exactly the right fused multiply-add operation.
What is the "right result" for this case? GCC with MPC produces:
-4.93038065763132378382330353301741393545754021943139377981e-32 + 2.0i)
Unpatched GCC as well as the runtime on my x86_64 box says:
0.0 + 2.0i
So the runtime here is not using the fused instruction?
Is the MPC value correct?
Thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30789