This is the mail archive of the
`gcc-patches@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] |

*From*: Jan Hubicka <jh at suse dot cz>*To*: Gabriel Dos Reis <gdr at integrable-solutions dot net>*Cc*: Jan Hubicka <jh at suse dot cz>, Richard Henderson <rth at redhat dot com>,gcc-patches at gcc dot gnu dot org, aj at suse dot de*Date*: Wed, 6 Nov 2002 23:29:22 +0100*Subject*: Converting floor to rint*References*: <20021105171400.GX14655@kam.mff.cuni.cz> <20021105173800.GD20534@redhat.com> <20021106092310.GE22059@kam.mff.cuni.cz> <20021106175441.GZ22059@kam.mff.cuni.cz> <20021106180930.GA22066@redhat.com> <20021106211059.GB1316@atrey.karlin.mff.cuni.cz> <m365va2xfl.fsf@soliton.integrable-solutions.net>

> Jan Hubicka <jh@suse.cz> writes: > > | > On Wed, Nov 06, 2002 at 06:54:41PM +0100, Jan Hubicka wrote: > | > > + For fast math it would be safe probably to convert (float)sqrt(x) > | > > + into sqrt((float)x), but in strict mode the argument can overflow. */ > | > > | > I don't believe this to be true. > | > | What you don't believe? > > Likew RTH, I, skeptical that your assertion is right. > > | That in ffast-math we can do the transformation? > > Do we really need to do that transformation? That is is there any > real evidence that it brings any real benefit? > I would be reluctant to include it even in -funsafe-math. On the related note. How bad would you consider converting floor(x) into rint(x-0.5) in the fast-math mode? That transformation would do a miracles for i386, where rint is faster than floor by quite a lot and should suffice for 3D application in reliablility. I can imagine it to fail only for very large numbers... Honza > > -- Gaby

**Follow-Ups**:**Re: Converting floor to rint***From:*Richard Henderson

**Re: Converting floor to rint***From:*Gabriel Dos Reis

**References**:**Simplify floating point conversions***From:*Jan Hubicka

**Re: Simplify floating point conversions***From:*Richard Henderson

**Simplify floating point conversions II***From:*Jan Hubicka

**Re: Simplify floating point conversions II***From:*Jan Hubicka

**Re: Simplify floating point conversions II***From:*Richard Henderson

**Re: Simplify floating point conversions II***From:*Jan Hubicka

**Re: Simplify floating point conversions II***From:*Gabriel Dos Reis

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |