fricas
(1) -> digits 20
fricas
-- n:=x^3+a1*x^2+a2*x+a3 ::Polynomial Fraction Integer
Q:=(3*a2-a1^2)/9
Type: Polynomial(Fraction(Integer))
fricas
R:=(9*a1*a2-27*a3-2*a1^3)/54
Type: Polynomial(Fraction(Integer))
fricas
S:=(R+(Q^3+R^2)^(1/2))^(1/3)
Type: Expression(Integer)
fricas
T:=(R-(Q^3+R^2)^(1/2))^(1/3)
Type: Expression(Integer)
fricas
x1:=S+T-a1/3
Type: Expression(Integer)
fricas
x2:=-(S+T)/2-a1/3 + %i*sqrt(3)*(S-T)/2
Type: Expression(Complex(Integer))
fricas
x3:=-(S+T)/2-a1/3 - %i*sqrt(3)*(S-T)/2
Type: Expression(Complex(Integer))
fricas
a5:=x^3+a1*x^2+a2*x+a3 ::Polynomial AlgebraicNumber
Type: Polynomial(AlgebraicNumber
?)
fricas
a6:=(x-x11) ::Polynomial AlgebraicNumber;
Type: Polynomial(AlgebraicNumber
?)
fricas
a7:=monicDivide(a5,a6,x) ;
Type: Record(quotient: Polynomial(AlgebraicNumber
?),
remainder: Polynomial(AlgebraicNumber
?))
fricas
a77:=a7.quotient;
Type: Polynomial(AlgebraicNumber
?)
fricas
a78:=a7.remainder;
Type: Polynomial(AlgebraicNumber
?)
fricas
qu1 :=eval(a77,x11,x1)
Type: Expression(Integer)
fricas
rem1:=eval(a78,x11,x1)
Type: Expression(Integer)
fricas
eval(rem1,[a3=1.0, a2=1.0, a1=1.0])
Type: Expression(Float)
How about this:
fricas
pkg:= SOLVEFOR(UP('x,Complex Float), Complex Float)
The constructor SOLVEFOR takes 3 arguments and you have given 2 .