different results between debug and result

Started by
0 comments, last by Anon Mike 18 years, 8 months ago
I am worknig on a project that is doing some serious number crunching, and i am getting different results between debug and release versions. At first i assumed that there were varibles, not set to 0 in the code, and debug was doing it for me, but that doesn't seem to be the problem. What else could cause this issue. I also thought maybe it had to do with rounding from double to float or something, could that be the issue. I am using visual c++ .NET 2003.
Advertisement
Optimizing floating-point code can lead to minor differences for some operations that then get magnified as those partial results get used in other calculations. This is particularly true on x86 machines because the cpu does internal calculations at a higher level of precesion than can actually be stored in memory.

For VC you can try the /Op option (improve floating-point consistency).
-Mike

This topic is closed to new replies.

Advertisement