Multiplying polynomials with rational coefficients efficiently

49 Views Asked by At

Given two degree $n$ polynomial $a, b \in \mathcal{P}_n(\mathbb{R})$, i can compute their product efficiently in $O(n\text{log}n)$ time using Fourier transform.

And in my problem setting, I also know both coefficients of $a, b$ are all in $\mathbb{Q}$. When $n$ gets large, using Fourier transform causes a lot of precision issues for me.

On one hand, I can fall back to long multiplication which has complexity $O(n^2)$ and doesn't have a precision problem.

Wondering if there is any more efficient algorithm that achieves the similar task in the $\mathbb{Q}$ instead of $\mathbb{R}$?