Reported on mailing list
(%i1) sign(rat([2,3])); Maxima encountered a Lisp error: The value 1 is not of type LIST. Automatically continuing. To enable the Lisp debugger set *debugger-hook* to nil. This patches freel (defmfun freel (l var) (cond ((and (listp l) (listp (cdr l))) (do ((l l (cdr l))) ((null l) t) (cond ((not (free (car l) var)) (return nil))))) (t t))) Which gives (%i2) sign(rat([2,3])); (%o2) pnz
Patch applied in commit 22f4fd0.
This commit causes two failures in the test suite:
Fixed by [691cbc]
Related
Commit: [691cbc]
Last edit: Dan Gildea 2016-04-03
Reopening this report -- commit [22f4fd0] appears to break tests 23 and 129 in rtest_taylor by changing the return value of RATDISREP in some cases. RATDISREP is supposed to return a simple MPLUS expression but with commit 22f4, it returns an MRAT expression.
For the record the tests are:
Commit 691cbc resolved those testsuite errors.
FWIW, I believe that the exit condition in that commit when l is an atom should punt to free, rather than equal. E.g.
~~~~
defmfun freel (l var)
(do ((l l (cdr l))) ((atom l) (or (null l) (free l var)))
(unless (free (car l) var) (return nil))))
~~~~
You are right, it should call free. Fixed in [09d160].
I have applied the fix to the 5.38 branch.
Related
Commit: [09d160]