Matt Turner <matts...@gmail.com> writes: > I feel confident the compiler is already doing that transformation.
I just tried and couldn't get the compiler to do it as the 'pow' function isn't declared with the 'const' attribute. That appears to be a bug in glibc. This code does what you'd expect: #include <math.h> extern double mypow(double a, double b) __attribute__ ((const)); double foo (double a, double b, double c, int x[], int q) { int i; for (i = 0; i < q; i++) x[i] = (int) (mypow(a, c)*b); } -- -keith
signature.asc
Description: PGP signature
_______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel