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]

Re: [PATCH, i386]: Committed: Prevent NaNs for sqrt(0.0) with -mrecip


On 6/19/07, Uros Bizjak <ubizjak@gmail.com> wrote:
Sigh...
Sorry :)

Attached is a cmp+andn by-the-book implementation of the NR fix. It
works exactly as your sqrt_intrin. I'll commit this patch in a couple of
minutes, after the regression testing finish.
I'm going to thank you on behalf of all the ex virtually molested +/-0.

> . results, and i'm not just talking about precision, depend on whether
> inlining happens or not
No, gcc calculated the result of sqrt with constant without ever calling
sqrt().
As the end user it's better when i don't risk into using jargon or
describing mechanisms i have little grasp on.
I've just noted the inconsistency.

> That said i don't know what -ffast-math has to say about +/-0 :)

Look at the value of val (the input!) in the second row in the forced
inline testcase.
Ok then i'll add that to the list of things that are sometimes denied
existence. Thanks for clarification.

I guess i'll have to come back to it (and other reciprocals) when the
dust has settled.

Btw is the jury still out on non-optional inclusion in -ffast-math?


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