On 6/6/2010 11:17 AM, Raymond Toy wrote:
> On 6/5/10 1:32 PM, Robert Dodier wrote:
>
>> On 6/4/10, Barton Willis<willisb at unk.edu> wrote:
>>
>>
>>
>>> This is a bug; here is a related example:
>>>
>>> (%i1) dpart(sin(a+b),1);
>>> Maxima encountered a Lisp error:
....
tracing great in
(%i5) build_info()$
Maxima version: 5.17.1
Maxima build date: 19:10 12/18/2008
host type: i686-pc-mingw32
lisp-implementation-type: GNU Common Lisp (GCL)
lisp-implementation-version: GCL 2.6.8
(%i2) dpart(%o1,1);
1> (GREAT $A $B)
<1 (GREAT NIL)
1> (GREAT $A $B)
<1 (GREAT NIL)
1> (GREAT ((MTIMES SIMP) -1 ((MBOX SIMP) ((MPLUS SIMP) $A $B)))
((MBOX SIMP) ((MPLUS SIMP) $A $B)))
2> (GREAT ((MBOX SIMP) ((MPLUS SIMP) $A $B)) $B)
<2 (GREAT T)
<1 (GREAT T)
1> (GREAT ((MBOX SIMP) ((MPLUS SIMP) $A $B))
((MTIMES SIMP) -1 ((MBOX SIMP) ((MPLUS SIMP) $A $B))))
2> (GREAT $B ((MBOX SIMP) ((MPLUS SIMP) $A $B)))
<2 (GREAT NIL)
<1 (GREAT NIL)
(%o2) -sin(-b+a)
;; note, the -b+a is displayed in red in wxmaxima.
............
in a more recent Maxima, great, when traced, goes off for a while. in
wxmaxima you have to stop it and then the front
end spews out stuff.
(by the way, to trace great, do :lisp (trace great)
)
now consider (setf n '((mbox simp)((mplus simp) $a $b)))
(setf m (cadr n))
...
(great n m) is T
(great m n) is also T
this is apparently not an error, or at least it works the same in 5.17
maxima and 5.21 maxima.
the ordering of some expression E and box(E) should be the same...
It seems to me that if the expression (neg x) ever occurs as input to
great, that there is an error
right at that point, since (neg x) is not simplified. It should be
((mtimes simp) -1 x) or some such
thing. Depending on the value of x.