But these solutions contains "cos". It is possible to rewrite the equations to the formula
and then find solutions without any trigonometrical components.
Would have been a simpler computation for the program to have changed the x into 1/y rather than the other way around, small numbers to deal with overall. Were you expected to solve this cubic analytically and it's roots actually looked like that?