Thread View: net.math.symbolic
1 messages
1 total messages
Started by Jon Goon
Tue, 11 Mar 1986 16:02
macsyma pattern-matcher bug?
Author: Jon Goon
Date: Tue, 11 Mar 1986 16:02
Date: Tue, 11 Mar 1986 16:02
47 lines
2213 bytes
2213 bytes
Howdy. I am having some trouble using the pattern-matching
facility in macsyma. Any hints on what I am doing wrong?
The sequence
matchdeclare(nn,true);
defrule(pat,cos(nn*t),-sin(nn*t)/nn);
applyb1(cos(a*t),pat);
gives the correct answer,
-sin(a*t)/a.
However, if I try
matchdeclare(nn,true);
defrule(pat1,%e^(nn*t),%e^(nn*t)/nn);
then macsyma echoes the correct rule,
nn t
nn t %e
pat1 : %e -> -------
nn
but when I apply it with
applyb1(%e^(t),pat1);
I get garbage:
t t
t %e.
I get the same answer if I express everything in terms of the exp
function. Any reason that this should happen? Incidentally, I am
running macsyma 304 on a dec 2065.
|----------------------------------------------------------------------------|
| J. Goon |
| Center for Applied Math. |
| Cornell U. |
| Ithaca, N.Y. 14853 |
| {decvax,ihnp4,cmcl2,vax135}!cornell!amvax!goon (USENET) |
| goon%amvax@CRNLCS.BITNET (Bitnet) |
| goon@amvax.tn.cornell.edu (ARPANET) |
|----------------------------------------------------------------------------|
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads