I think this should be `if (Float.compare(denominator, 0.0f) == 0)`