This is an extremely simple and efficient solver of algebraic equation of 4th order. I have read so many relating articles, I have tested other solutions... However, this solution contains the algebraic improvement which simplifies things, significantly. Consequently, the numerical computations are reduced and as far as I can see, it performs extraordinarily! The theory and mathematical background are explained in the file - theorymath_eng.docx.
The solution of a given quartic equation - x^4 + a·x^3 + b·x^2 + c·x + d = 0 - can be found by the function:
solve_quartic(double a, double b, double c, double d)
The quartic equations may have different types of roots. a) 4 real roots b) 2 real and 2 complex-conjugate roots c) 4 complex roots (two pairs of complex-conjugates). Our solve_quartic() returns the array of four complex numbers. If there are real roots, the immaginary parts of corresponding solutions will be simply equal to 0.
(main.cpp file is given here just for testing and experimenting)