On Mon, Jun 02, 2014 at 10:33:37AM -0400, Geert Bosch wrote: > > First, it is said that x / C is replaced by x * (1.0 / C) when C is > > a power of two. But this condition is not sufficient: if 1.0 / C > > overflows, the transformation is incorrect. From some testing, > > it seems that GCC detects the overflow case, so that it behaves > > correctly. In this case I think that the wiki should say: > > "When C is a power of two and 1.0 / C doesn't overflow.” > Yes, that was implied, but should indeed be made explicit.
If C is a power of two, then 1.0 / C should IMHO never overflow, do you mean underflow to zero? Jakub