Richard Guenther wrote:
It's a matter of making the cbrt builtin available - I have a patch for
this, but wondered if the fortran frontend can rely on the cbrt library call
being available? Or available in a fast variant, not a fallback
implementation in libgfortran which does pow (x, 1./3.) which will then of course pessimize
pow (x, 2./3.) -> tmp = cbrt(x); tmp * tmp expansion.
Couldn't libgfortran just simply borrow, errr, include the glibc version
? That one seems simple and fast enough.
OTOH, I somehow assumed this expansion was protected by
-funsafe-math-optimizations, but further testing showed me that it is not.
This wouldn't scare me one bit (I'm used to the phrase "a processor
dependent approximation to the value of", which is used *a lot* in the
Fortran Standard), but some people might think this to be too valiant.
--
Toon Moene - e-mail: [EMAIL PROTECTED] - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
A maintainer of GNU Fortran: http://gcc.gnu.org/fortran/
Who's working on GNU Fortran:
http://gcc.gnu.org/ml/gcc/2006-01/msg00000.html