Newton’s Method for Polynomial Powers is an algorithm that computes for a formal power series such that in time and space.

Algorithm

Lemma

  1. Apply Newton’s Method for Polynomial Logarithms to find .
  2. Apply Newton’s Method for Polynomial Exponentiation to find .
  3. 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];
 
	auto x = newton_log(std::ranges::to<std::vector>(std::views::iota(0, n) | std::views::transform([&](int i) -> std::complex<double> {
		return (i < int(a.size()) ? a[i] : 0) / c;
	})), 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;
}