This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcc/64677] incorrect result with complex division?
- From: "spatel at rotateright dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 20 Jan 2015 19:54:58 +0000
- Subject: [Bug libgcc/64677] incorrect result with complex division?
- Auto-submitted: auto-generated
- References: <bug-64677-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64677
--- Comment #8 from Sanjay Patel <spatel at rotateright dot com> ---
(In reply to Andrew Pinski from comment #7)
> Can you try this under Linux too, just to double check there?
Wow, that other bug shows that there are a lot of variables here.
I don't know what to make of this: First, I'm just trying g++ 4.8.2 on Ubuntu
14.04 because that's what I have available at the moment.
It seems I don't need the -std=c++11 flag as I do on OS X? But using that flag
changes the result at -O1!
$ g++ -O0 complex_div.cpp ; ./a.out
-0.0083223357032193145
(does not match Wolfram)
$ g++ -O1 complex_div.cpp ; ./a.out
-0.0083223357032193145
(does not match Wolfram)
$ g++ -O0 complex_div.cpp -std=c++11 ; ./a.out
-0.0083223357032193145
(does not match Wolfram)
$ g++ -O1 complex_div.cpp -std=c++11 ; ./a.out
-0.0083223357032193128
(matches Wolfram...but why is this different?!)