Now you are asking that the orderlessp program work on lists, (ok) and
those lists may contains rat() expressions (not ok). If you are really
interested
in these results I suggest you map ratdisrep over the items in the
list.
The commercial macsyma is also unhappy with this input.
The solution would be to make the internal program "GREAT" use
ratdisrep when it is comparing items in the general simplifier. This
would be potentially quite wasteful (if the ratdisrep was done many
times), or give random results (since one rat(a) might be different
from another, depending on the time it was created. rat(a)-rat(a) will
always be zero, but ratvars affects the structure internally)...
An alternative version of the simplifier which uses hashcoding, written
a few years ago and rejected by Symbolics/Macsyma Inc, would solve
this problem faster.
RJF
willisb@unk.edu wrote:
>
> It's not just Maxima 5.9.0 / CMUCL that has a problem with orderlessp:
>
> Maxima 5.5 Tue Dec 5 16:55:33 2000 (with enhancements by W. Schelter).
> Licensed under the GNU Public License (see file COPYING)
> (C1) orderlessp([rat(a)],[rat(a)]);
>
> Error: 1 is not of type LIST.
> Fast links are on: do (si::use-fast-links nil) for debugging
> Error signalled by MACSYMA-TOP-LEVEL.
> Broken at MACSYMA-TOP-LEVEL. Type :H for Help.
> MAXIMA>>
>
> Barton
>
>
>
> Richard Fateman <fateman@cs.berkeley.edu>
>
> 11/22/2002 11:08 AM
>
>
> To: macrakis@alum.mit.edu
> cc: willisb@unk.edu
> Subject: Re: [Maxima] orderless([rat(a)],b) bug
>
>
>
>
> Hm. Since it works in version 5.5, I guess I should
> just keep quiet and let others worry about this one :)
> RJF
>
>
> Stavros Macrakis wrote:
> >>I guess for orderlessp, we could change the program so that
> >>it automatically calls ratdisrep on any of its arguments
> >>in rat form.
> >
> >
> > It already does specrepcheck:
> >
> > (DEFMFUN $ORDERLESSP (A B)
> > (SETQ A (SPECREPCHECK A) B (SPECREPCHECK B))
> > (AND (NOT (ALIKE1 A B)) (GREAT B A) T))
>
>
>
>