|
-
May 11th, 2011, 01:21 PM
#16
Re: Adding doubles together produces different results in Release vs. Debug mode.
 Originally Posted by VladimirF
What was the point of this code? Ans how it differs from:
Code:
_tprintf(_T("%.2f"), fAmt);
The multiply and then divide by 1000 part ensures that he doesn't lose the 3-rd decimal place, i.e. 1237.8599999999999 becomes 1237.86 and 1237.8549999999999 becomes 1237.85.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|