As NF points out 
Therefore .9 recurring is 3 thirds. Which IS exactly equal to 1.

Therefore .9 recurring is 3 thirds. Which IS exactly equal to 1.

double d = 0.99999999999999999;
if( d == 1.0 )
{
std::cout << "Yes";
}
else
{
std::cout << "No";
}

Comment