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