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: [gfortran] Compute x**(-n) as (1/x)**n


Tobias Schlüter wrote:

Toon Moene wrote:

The following change, which I bootstrapped on powerpc-unknown-linux-gnu (C and f95) without regressions, leads the Fortran front-end to generate expressions x**(-n) with n constant as if they were written (1/x)**n.

Does this deal correctly with integer x? I remember there were some special cases somewhere.

It doesn't have to :-) By the time control reaches the point where I made my change, INTEGER x has already been dealt with.


Hope this helps,

--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc.gnu.org/fortran/ (under construction)


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