[J3] C TS 18661

Van Snyder van.snyder at jpl.nasa.gov
Wed Jan 30 13:12:26 EST 2019


On Wed, 2019-01-30 at 12:55 -0500, Steve Lionel via J3 wrote:
> This also makes me wonder if compilers couldn't also optimize rsqrt on 
> their own, the way they do for other idioms such as real to an integer 
> power, etc. And, indeed, a quick test using ifort show that at least one 
> does so, utilizing the SSE rsqrt instructions plus additional N-R 
> iterations.

This was the question of my original post on this topic.

Do other processors optimize the appearance of sqrt(x) as a factor in
the denominator, replacing it by rsqrt(x) in the numerator?  If it's
common practice, a new intrinsic isn't necessary.

sqrt(x) appears frequently in the denominator, in e.g., celestial
mechanics, molecular dynamics, electrodynamics, graphics, ... anywhere a
distance is involved.




More information about the J3 mailing list