Modify makePower extrapolation to match C++ code
Add a multipoleTransform function to match the C++ implementation