axiom-developer
[Top][All Lists]

[Axiom-developer] [Axiom-mail] [Axiom-mail] [Axiom-mail] [Axiom-mail] [A

 From: root Subject: [Axiom-developer] [Axiom-mail] [Axiom-mail] [Axiom-mail] [Axiom-mail] [Axiom-mail] [Axiom-mail] A newby question about eval and Expression Date: Sat, 12 Nov 2005 22:39:40 -0600

Changes http://page.axiom-developer.org/zope/mathaction/AxiomMail/diff
--
so if we try:

)clear all
digits 20
-- n:=x^3+a1*x^2+a2*x+a3 ::Polynomial Fraction Integer

Q:=(3*a2-a1^2)/9
R:=(9*a1*a2-27*a3-2*a1^3)/54
S:=(R+(Q^3+R^2)^(1/2))^(1/3)
T:=(R-(Q^3+R^2)^(1/2))^(1/3)
x1:=S+T-a1/3
x2:=-(S+T)/2-a1/3 + %i*sqrt(3)*(S-T)/2
x3:=-(S+T)/2-a1/3 - %i*sqrt(3)*(S-T)/2

a5:=x^3+a1*x^2+a2*x+a3 ::Polynomial Fraction Integer;
a6:=('x-x11)  ::Polynomial Fraction Integer;

a7:=monicDivide(a5,a6,x) ;

a77:=a7.quotient  ::Polynomial Fraction Integer;
a78:=a7.remainder ::Polynomial Fraction Integer;

qu1 :=eval(a77,x11,x1)
m:=eval(a78,x11,x1)

eval(m,[a3=1.0, a2=1.0, a1=1.0])

does that give you what you want?

t

--