function roots
import Modelica;
import Modelica.ComplexMath.j;
import Complex;
input Real poly1[:] "[p^0] coefficients of first order polynomials";
input Real poly2[:, 2] "[p, p^0] coefficients of second order polynomials";
input Integer n_real "Number of real zeros computed with Internal.numberOfRealZeros";
output Real realZeros[n_real] "All real zeros of poly1 and poly2";
output Complex complexZeros[:] = fill(Complex(0, 0), integer((size(poly1, 1) + 2*size(poly2, 1) - n_real)/2)) "All complex zeros of poly1 and poly2; for a complex conjugate pair, only one zero is stored";
end roots;