Example

bool doublesEqual( double d1, double d2)
{
return (d1 == d2);
}

Solution
Use the >= or <= operators instead to avoid rounding errors.

bool double1Greater( double d1, double d2)
{
return (d1 >= d2);
}