[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-mail] newbie
From: |
root |
Subject: |
Re: [Axiom-mail] newbie |
Date: |
Sun, 26 Oct 2008 12:13:32 -0500 |
I believe there is some sort of translation problem in the page that
contains the original source code. The wiki is no longer available
as part of the Axiom project. The problem is that the line which
defines the D operator has the html string * in it. Here is a
corrected version:
C:=Complex Expression Integer
Q:=Quaternion C
q:Q:=quatern(q0,q1,q2,q3)
qlist(l:List C):Q==quatern(l.1,l.2,l.3,l.4)
listq(x:Q):List C == [real x, imagI x, imagJ x, imagK x]
matrixq(x:Q):Matrix C == matrix _
[[real x + %i*imagI(x), imagJ x + %i*imagK(x)], _
[-imagJ(x) + %i*imagK(x), real x - %i*imagI(x)]]
sig0:=quatern(1,0,0,0)::Q
sig1:=%i*quatern(0,0,0,1)::Q
sig2:=%i*quatern(0,0,1,0)::Q
sig3:=-%i*quatern(0,1,0,0)::Q
siglist(x:Q):List C == [real x, -imagK(x)*%i,-imagJ(x)*%i,%i*imagI(x)]
D(q:Q,x:Symbol,y:Symbol,z:Symbol):Q==sig1*D(q,x)+sig2*D(q,y)+sig3*D(q,z)
Ft:=operator 'Ft; Fx:=operator 'Fx; Fy:=operator 'Fy; Fz:=operator 'Fz;
F:Q:=Ft(x,y,z)*sig0+Fx(x,y,z)*sig1+Fy(x,y,z)*sig2+Fz(x,y,z)*sig3
siglist(D(F,x,y,z))
To use this put it into an input file such as "quatin.input" and then
type:
)read quatin.input
at the axiom command prompt.
Tim