(Digging this up to add some useful information -- I saw the thread under "who's online")
Doug is right. Floating point numbers are mostly never equal a specific value except you set them onto it. Better use a function, that calculates the difference and proves it against a threshold value.
Algorithm:
bool fEqual (double f1, double f2) {
static const double EPSILON = 0.001;
return((bool)(fabs(f1-f2) <= EPSILON));
}