matchdeclare and defrule not working as in documentation.
Subject: matchdeclare and defrule not working as in documentation.
From: Dieter Kaiser
Date: Mon, 11 Jul 2011 22:52:40 +0200
Am Montag, den 11.07.2011, 14:06 -0600 schrieb Robert Dodier:
> Well, I see that 8*2^n simplifies to 2^(n + 3) (dunno when that
> was implemented). That changes the expression so 8*%pi doesn't
> appear. Try changing 8 to 7 --
> I think you'll get the
> expected result.
For the record: This type of simplification is present since Maxima 5.10
(September 2006).
Maxima version: 5.10.0
Maxima build date: 21:56 3/14/2011
host type: i686-pc-linux-gnu
lisp-implementation-type: SBCL
lisp-implementation-version: 1.0.45
(%i2) 8*2^n;
(%o2) 2^(n+3)
In the next release we will get more simplifications of expressions like
2^(n+3)+2*2^(n+3), which do not fully simplify in Maxima 5.24:
Maxima version: 5.24.0
Maxima build date: 22:5 4/26/2011
Host type: i686-pc-linux-gnu
Lisp implementation type: SBCL
Lisp implementation version: 1.0.45
(%i2) 2^(n+3)+2*2^(n+3);
(%o2) 2^(n+4)+2^(n+3)
But in Maxima 5.24post we will have
Maxima version: 5.24post
Maxima build date: 21:18 7/11/2011
Host type: i686-pc-linux-gnu
Lisp implementation type: SBCL
Lisp implementation version: 1.0.45
(%i2) 2^(n+3)+2*2^(n+3);
(%o2) 3*2^(n+3)
Dieter Kaiser