Polynomial root,sqrt

How to find out cubic equation root. Is there any working code for that. Or how to solve cubic equation (code)