Computing the inertia of Bezout and Hankel matrices