Solve the cubic equation `ax ^{3} + bx^{2} + cx + d = 0` using JavaScript.

The intermediate

reducedequation

For a mathematical analysis, see Solving the cubic equation.

Calculation results appear here.

Given three real roots, generate the coefficients. (This also places the coefficients into the equation solving form above.)