Nice, wll documented code. Just to be sure you are on safe ground, you took the *algorithms* but no *code* from Numerical Recipes, right? They are pretty clear about their licensing, see http://www.nr.com/licenses/redistribute.html This bit from the site might be relevant: "We never give permission for Numerical Recipes source code to be posted on any public server, or distributed with any freeware or shareware package." MattiThe algorithms for cubics and quadratics come from Numerical Recipes (3rd ed.), and the quartic problem is internally reduced to a cubic and two quadratics, using well-known standard tricks.