|
-
July 7th, 2009, 11:49 AM
#14
Re: Debug works, Release doesn't?
Paul,
The log10(yTest) is 8 so that won't work. I tried the following and it too fails for the Release mode which i=30 instead of 10. Debug i=10. I suspect this is the same problem. Exact equality won't work in this case either.
Code:
#include <iostream>
using namespace std;
void main(){
int i;
double yTest;
yTest = 100000000.;
for(i=0;i<30;i++){
if(yTest-.01 == 0.) break;
yTest /= 10.;
}
cout<<i<<endl;
}
Regards,
Lowell
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
|