Sign in to follow this  

different results between debug and result

This topic is 4522 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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

This topic is 4522 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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