15% is a bit higher than I benchmark, but here is a version that is guaranteed to do the correct number of iterations, increments in floating point instead of performing the slow cast, and is <i>faster</i> than performing the comparison in floating point math (because it occupies a different execution unit).  Note that it is also less accurate than the cast for most definitions of what this function might be attempting to measure.<p><a href="http://gist.github.com/288980" rel="nofollow">http://gist.github.com/288980</a>