Maybe that will work as a work-around. But it is nothing but a
work-around. The previous poster was right - the code is broken.
The "==" operator usually doesn't have any reasonable use on floating
point values (yes there are cases where it makes sense, but this is not
one of them).
A result from any computation on double values cannot be assumed to
"equal" anything in particular. Zero included.
The correct way to terminate that loop is, like was already suggested,
doing a comparison to see if the residual is "numerically zero" or
"sufficiently zero-ish for the given purpose". Eg. "delta < 1E-12" or
eventually "fabs(delta) < 1E-12".
Comparing to zero makes *no* sense. It's written by someone who has no
understanding of numerics (or perhaps just didn't think clearly at that
moment - /me trying not to insult more people than strictly necessary ;)
-- ................................................................ : jakob@unthought.net : And I see the elder races, : :.........................: putrid forms of man : : Jakob Østergaard : See him rise and claim the earth, : : OZ9ABN : his downfall is at hand. : :.........................:............{Konkhra}...............: - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/