Sign in to follow this  
corrington_j

different results between debug and result

Recommended Posts

corrington_j    148
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.

Share this post


Link to post
Share on other sites
Anon Mike    1098
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).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this