On 01/24/2012 05:17 PM, Robert Dodier wrote:
> On 1/24/12, Paul Bowyer<pbowyer at olynet.com> wrote:
>
>> So far my lisp programming is to the point where I can write simple
>> programs around CLX, but I haven't tried anything as advanced as maxima.
>> I think it would be well beyond my abilities.
>>
>> If I discover anything in my stumblings with maxima, I'll post them, but
>> don't hold your breath waiting...
> OK, well, Maxima is a big, messy program but in some ways it is not
> too terribly sophisticated. I think it's likely that you can readily
> learn enough about Lisp& Maxima to make useful contributions.
>
> best,
>
> Robert Dodier
>
Robert:
I tried updating CCL and rebuilding maxima, but it made no difference
with the testsuite errors. The CCL maxima runtime still fails rtest15,
problems 37, 193, and 196.
build_info ();
Maxima version: 5.26.0_26_gc4216e7
Maxima build date: 18:32 1/28/2012
Host type: i686-pc-linux-gnu
Lisp implementation type: Clozure Common Lisp
Lisp implementation version: Version 1.7-r15188M (LinuxX8632)
(%i2) run_testsuite (display_all = true, tests=[rtest15]);
********************** Problem 37 ***************
Input:
2 2 - %pi
sin (3 a) sin (----- + a + b)
3
(-----------------------------
2 %pi
sin (a - ---)
3
- %pi
2 sin(a) sin(3 a) cos(b) sin(----- + a + b) sin(3 a + 3 b)
3
- ----------------------------------------------------------
%pi
sin(a - ---) sin(a + b)
3
2 2
sin (a) sin (3 a + 3 b)
+ -----------------------, result : trigrat(%%),
2
sin (a + b)
expected : (- (- 9 + 10 cos(2 a) - 2 sqrt(3) sin(2 a) - cos(4 a)
+ sqrt(3) sin(4 a) + 10 cos(2 b) - 2 sqrt(3) sin(2 b) - cos(4 b)
+ sqrt(3) sin(4 b) - 4 cos(2 b - 2 a) - 8 cos(2 a + 2 b)
+ 4 sqrt(3) sin(2 a + 2 b) + 2 cos(4 a + 2 b) - 2 sqrt(3) sin(4 a + 2 b)
+ 2 cos(2 a + 4 b) - 2 sqrt(3) sin(2 a + 4 b) - cos(4 a + 4 b)
+ sqrt(3) sin(4 a + 4 b)))/4, ratsimp(result - expected))
Result:
Polynomial quotient is not exact
error-catch
This differed from the expected result:
0
********************** Problem 193 ***************
Input:
2
t log(t)
integrate(-----------------, t, 0, 1)
2 4
(t - 1) (1 + t )
Result:
2
(sqrt(2) - 2) %pi
- ------------------
32
This differed from the expected result:
2
(sqrt(2) - 1) %pi
------------------
9/2
2
********************** Problem 196 ***************
Input:
1
factor(expand(sqrtdenest(integrate(------------, x, 0, 1))))
1 4
- + (x - 3)
2
3/4 9/4
73 + sqrt(2) + 2 - 3 2
- factor((- (- log(----------------------------)
33
3/4 9/4 3/4 5/2 13/4
73 + sqrt(2) - 2 + 3 2 - 2 + 2 - 2
+ log(----------------------------) + 2 atan(---------------------)
33 3/4 13/4
98 + 2 - 2
3/4 5/2 13/4
2 + 2 + 2 7/4
+ 2 atan(-------------------)))/2 )
3/4 13/4
- 98 + 2 - 2
Result:
13/4 5/2 3/4 13/4 5/2 3/4
2 + 2 + 2 - 2 + 2 - 2
(2 atan(-------------------) + 2 atan(---------------------)
13/4 3/4 13/4 3/4
- 2 + 2 - 98 - 2 + 2 + 98
9/4 3/4 9/4 3/4
3 2 - 2 + sqrt(2) + 73 - 3 2 + 2 + sqrt(2) + 73
+ log(----------------------------) - log(------------------------------))
33 33
9/4 3/4
7/4 3 2 - 2 + sqrt(2) + 73
/2 - (log(----------------------------)
33
9/4 3/4
- 3 2 + 2 + sqrt(2) + 73
- log(------------------------------) - 2
33
3/4 1/4
79 2 + 365 sqrt(2) + 877 2 + 5
atan(------------------------------------)
10657
3/4 1/4
- 79 2 + 365 sqrt(2) - 877 2 + 5 7/4
+ 2 atan(--------------------------------------))/2
10657
This differed from the expected result:
0
I manually fed parts of problem 37 into xmaxima to see what happens:
%i1) sin(a)^2*sin(3*b+3*a)^2/sin(b+a)^2
-2*sin(a)*sin(3*a)*cos(b)*sin(b+a-%pi/3)*sin(3*b+3*a)
/(sin(a-%pi/3)*sin(b+a))
+sin(3*a)^2*sin(b+a-%pi/3)^2/sin(a-%pi/3)^2;
and I got the following output:
2 2
sin (a) sin (3 b + 3 a)
(%o1) -----------------------
2
sin (b + a)
%pi
2 sin(a) sin(3 a) cos(b) sin(b + a - ---) sin(3 b + 3 a)
3
- --------------------------------------------------------
%pi
sin(a - ---) sin(b + a)
3
2 2 %pi
sin (3 a) sin (b + a - ---)
3
+ ---------------------------
2 %pi
sin (a - ---)
3
(%i2) trace(ratexpand);
(%o2) [ratexpand]
(%i3) trigrat(%o1);
1 Enter ratexpand [%i b]
1 Exit ratexpand %i b
1
1 Enter ratexpand [-]
2
1
1 Exit ratexpand -
2
1 Enter ratexpand [%i a]
1 Exit ratexpand %i a <-- falls apart here
Polynomial quotient is not exact
I did the same for the cmucl runtime with xmaxima and it completed
successfully:
1 Enter ratexpand [%i b]
1 Exit ratexpand %i b
1
1 Enter ratexpand [-]
2
1
1 Exit ratexpand -
2
1 Enter ratexpand [%i a]
1 Exit ratexpand %i a <-- completes successfully
%i a 8
more output follows...
I didn't go any further because I have difficulty following the lisp
code in maxima. Maybe that will change as I spend more time trying to
understand it.
Paul Bowyer