I need to numerically compute polynomial coefficients from its roots. However, this seems to be numerically unstable even for a moderate number of roots. For example, computing the polynomial $z^N - 1$ from the roots of unity $e^{2j\pi k/N}$ fails in Matlab for $N = 100$.
N= 100;
poleAngles = linspace(0,2*pi,N);
poleAngles(end) = [];
poleLocations = exp(1i*poleAngles);
% should be [1 0 0 ... 0 0 -1];
characteristicPolynomial = real(poly(poleLocations));
Please note, that this is just an example. In the original problem I have about 10.000 conjugate roots on the unit circle at random positions.
I would like to learn more about this problem: Is this an inherent problem, or specific to MATLAB? Is there a numerically more stable way to do the computation? Is there a name for this problem in scientific literature?