This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FloatingPointMath and transformations


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]