Function that can resolve the cubic equation numerical stable and any lower dimensional case except unsolvable cases.
Useful links