axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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

Changes http://page.axiom-developer.org/zope/mathaction/AxiomMail/diff
--
hmmm, perhaps eval is broken but
eval(a78,x11,3) works

perhaps variable lookup is broken but
xtpd:=3
eval(x78,x11,xtpd) works

perhaps eval with a third arg of EXPR(INT) is broken but
xtpd2:Expression(Integer):=3
eval(x78,x11,xtpd2) works

perhaps eval fails if the third arg cannot be coerced to POLY(FRAC(INT)) but
xtpd2:Expression(Integer):=3*sqrt(2)
eval(x78,x11,xtpd2) works


next i tried changing the final line:

)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)

and THAT works. at least here.

t

--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]