Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22145

C++ Floating point difference

$
0
0

I am trying to get exact same results on 2 different platform i.e. Solaris and Linux(sun-studio vs GCC). The entire code uses double datatype. But when i print the output i see differences in the floating point(like in the 20th decimal place).

What i need to know is whether i can set some compiler flag to make both GCC and sun-studio compiler behave equally. Attached Image shows difference in Double datatype. Left side is the Output from GCC and other one is from sun-studio.

enter image description here


Viewing all articles
Browse latest Browse all 22145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>