#190 orderlessp([rat(x)], [rat(x)]) (duplicate of # 643254)

closed
nobody
Lisp Core (471)
5
2014-08-17
2002-11-24
No

The orderlessp function often halts with a
(non-descriptive) error message if one or more of its
arguments are lists or matrices containing CRE
expressions. The Maxima documentation for orderlessp
doesn't mention this limitation.

If you need to order expressions that might involve
lists or matrices containing CRE expressions, apply
totaldisrep
to each argument of the ordering predicate. Here's an
example

Maxima 5.5 Tue Dec 5 16:55:33 2000 (with enhancements
by W. Schelter).
Licensed under the GNU Public License (see file COPYING)

(C4) xorderlessp(x,y) := orderlessp(totaldisrep(x),
totaldisrep(y));
(D4) xorderlessp(x, y) := ORDERLESSP(TOTALDISREP(x),
TOTALDISREP(y))

/* xorderlessp works okay on lists with CRE elements */

(C5) xorderlessp([rat(x)],[rat(x)]);
(D5) FALSE
(C6) orderlessp([rat(x)], [rat(x)]);

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>>

Either the documentation should warn the user
not to use orderlessp or ordergreatp on
lists or matrices that contain CRE elements,
or these functions should apply totaldisrep
to each argument.

Barton

Discussion

  • Robert Dodier

    Robert Dodier - 2006-07-01

    Logged In: YES
    user_id=501686

    Duplicate of # 643254.

     
  • Robert Dodier

    Robert Dodier - 2006-07-01
    • status: open --> closed
    • labels: --> Lisp Core
    • summary: orderlessp([rat(x)], [rat(x)]) --> orderlessp([rat(x)], [rat(x)]) (duplicate of # 643254)
     

Log in to post a comment.