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?!)

Reply via email to