Newton’s Method for Polynomial Powers is an algorithm that computes for a formal power series such that in time and space.
Algorithm
Lemma
Proof
- Apply Newton’s Method for Polynomial Logarithms to find .
- Apply Newton’s Method for Polynomial Exponentiation to find .
- Apply the lemma to find .
This algorithm solves the problem in time and space.
std::vector<std::complex<double>> newton_pow(const std::vector<std::complex<double>> &a, std::complex<double> z, int n) {
auto c = a[0];
std::vector x(n, std::complex(0.));
for (int i = 0; i < std::min(n, int(a.size())); i++) {
x[i] = a[i] / c;
}
x = newton_log(x, n);
for (int i = 0; i < n; i++) {
x[i] *= z;
}
x = newton_exp(x, n);
for (int i = 0; i < n; i++) {
x[i] *= std::pow(c, z);
}
return x;
}