Do C#/.NET floating point operations differ in precision between debug mode and release mode?
Do C#/.NET floating point operations differ in precision between debug mode and release mode?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They can indeed be different. According to the CLR ECMA specification:
What this basically means is that the following comparison may or may not be equal:
Take-home message: never check floating values for equality.