[Numpy-discussion] optimizing power() for complex and real cases
tim.hochberg at cox.net
Thu Feb 23 08:29:06 EST 2006
I had some free time some morning, so I merged the nc_pow optimizations
for integral powers in and committed them to the power_optimization
branch. They could probably use more testing, but I thought someone
might like to take a look while I'm out of town.
Also, if your looking for a way to do powers as succusive multiplies for
fast_power or scalar_power or whatnot, starting with the algorithm for
nc_pow would probably be a good place to start.
Hmm. Looking at this now, I realize I'm shadowing the input complex
number 'a', with a local 'a'. Too much mindless copying from
complexobject. That should be fixed, but I can't do it right now.
More information about the NumPy-Discussion