fact: Definition Cardan_Tartaglia_formula:=fun (a1:C) (a2:C) (a3:C) (n:nat) => let s:=-a1/3 in let p:=a2+2*s*a1+3*Cpow s 2 in let q:=a3+a2*s+a1*Cpow s 2+Cpow s 3 in let Delta:=(Cpow (q/2) 2)+(Cpow (p/3) 3) in let alpha : C :=if(Ceq_dec p 0) then (RtoC 0) else (cubicroot (-(q/2)+Csqrt Delta)) in let beta:=if(Ceq_dec p 0) then -cubicroot q else -(p/3)/alpha in s+(alpha*Cpow CJ n+beta*Cpow CJ (n+n)).
imports: Reals Coq.Reals.Rtrigo_def Coquelicot.Coquelicot Coquelicot.ElemFct Lra