[gfortran] Exponentiation by integral exponents
Paul Brook
paul@codesourcery.com
Wed Apr 28 03:05:00 GMT 2004
On Tuesday 27 April 2004 23:07, Tobias Schlüter wrote:
> Andrew Pinski wrote:
> > On Apr 27, 2004, at 17:14, Tobias Schlüter wrote:
> >> FYI I have ported Andy's code for exponentiation by an integral
> >> exponent to our tree. This is an implementation of Knuth's algorithm
>
> ...
>
> > You should not need it if you use __builtin_pow and you turn on
> > flag_unsafe_math_optimizations on. Maybe the best way is to have
> > another flag
> > to say expand __builtin_pow always.
>
> Does the builtin recognize the case pow(x,(float)i), where i is an
> integer? Then this sounds like a very good idea.
Maybe the way to indicate we always want to expand __builtin_pow would be to
pass the second parameter with an integer type. It may be easier to add
__builtin_powi to avoid needing polymorphic builtins.
Paul
More information about the Gcc
mailing list