Equality and Relational Operators
Do not use == to compare equality of real numbers.
Real values may not be stored accurately.
To test equality of 2 real numbers, test their difference instead (use fabs()), and take them as equal if the difference is small enough.