[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [Axiom-mail] [Axiom-mail] [Axiom-mail] A newby questio
From: |
Doug Stewart |
Subject: |
[Axiom-developer] [Axiom-mail] [Axiom-mail] [Axiom-mail] A newby question about eval and Expression |
Date: |
Sat, 12 Nov 2005 21:30:27 -0600 |
Changes http://page.axiom-developer.org/zope/mathaction/AxiomMail/diff
--
root wrote:
>Changes http://page.axiom-developer.org/zope/mathaction/AxiomMail/diff
>--
>given
>
>f:=a1*x^2 +a2*x+a3
>eval(f,[a1=62/100,a2=11,a3=6])
>
>i get:
>
> 16 2
> -- x + 11x + 6
> 25
> Type: Polynomial Fraction Integer
>
>
>perhaps zz1 already has a type? try:
>
>zz1::POLY(FRAC(INT)):=eval(f,[a1=62/100,a2=11,a3=6])
>
>t
>
>
>
Thanks for your help,
I think I have the latest version of Axiom for windows, just got it this
week.
here is the code
)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)
rem1::POLY(FRAC(INT)):=eval(a78,x11,x1)
this gives an error message:
The form on the left hand side of an assignment must be a single
variable ... supporting the setelt operation.
Doug Stewart
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden
- [Axiom-developer] [Axiom-mail] A newby question about eval and Expression, Doug Stewart, 2005/11/12
- [Axiom-developer] [Axiom-mail] [Axiom-mail] A newby question about eval and Expression, root, 2005/11/12
- [Axiom-developer] [Axiom-mail] [Axiom-mail] [Axiom-mail] A newby question about eval and Expression,
Doug Stewart <=
- [Axiom-developer] [Axiom-mail] [Axiom-mail] [Axiom-mail] [Axiom-mail] A newby question about eval and Expression, root, 2005/11/12
- [Axiom-developer] [Axiom-mail] [Axiom-mail] [Axiom-mail] [Axiom-mail] [Axiom-mail] A newby question about eval and Expression, Doug Stewart, 2005/11/12
- [Axiom-developer] [Axiom-mail] [Axiom-mail] [Axiom-mail] [Axiom-mail] [Axiom-mail] [Axiom-mail] A newby question about eval and Expression, root, 2005/11/12
- [Axiom-developer] [Axiom-mail] A newby question about eval and Expression, Martin Rubey, 2005/11/13
- [Axiom-developer] [Axiom-mail] A newby question about eval and Expression, Doug Stewart, 2005/11/13
- [Axiom-developer] [Axiom-mail] A newby question about eval and Expression, Martin Rubey, 2005/11/14
- [Axiom-developer] [Axiom-mail] [Axiom-mail] [Axiom-mail] A newby question about eval and Expression, root, 2005/11/12