xhorizon.tortoise.math_util module

xhorizon.tortoise.math_util.pos_real_roots(p, imtol=1e-06)

Return the sorted positive real roots of a polynomial. p is an array of coefficients of the polynomial

p[n] * x^0 + p[n-1] * x^1 + … + p[0] * x^n

(aka highest order first).