Instead of expecting exact results from floating point math, handle things based on a range. For example, instead of checking to see if that your computation returned exactly 0, check if it is, say, in the range of [-0.01, 0.01] (or whatever range is appropriate for your work).
Well first off, why are you intermixing doubles and floats? It might not still be exactly zero, but I'm pretty sure it would be at least closer if you did a double minus a double instead of a double minus a float.
Anyway, you'd want to do something like this
1 2 3 4 5
constdouble Threshold = 0.0001;
if ( abs( my_value - what_my_value_should_be ) < Threshold)
{
cout << "It's close enough to zero.\n";
}