|
Discriminant(Δ) = q3 + r2
q = (3c- b2)/9
r = -27d + b(9c-2b2)
s = r + math.sqrt(Discriminant)
t = r - math.sqrt(Discriminant)
term1 = math.sqrt(3.0)*((-t + s)/2)
r13= 2 * math.sqrt(q)
x1=(- term1 + r13*math.cos(q3/3) )
x2=(- term1 + r13*math.cos(q3+(2*math.PI)/3) )
x3=(- term1 + r13*math.cos(q3+(4*math.PI)/3) )