Logged In: YES
user_id=588346
This fix also corrects the following error:
cf(2*sqrt(2)*sqrt(3)) => Error: 5 is not of type LIST.
(Note though that the answer is still rubbish.)
cf([2]+[5]) gives a fatal error
The fix is to add a first clause to the cond in cfratsimp:
(cond ((atom a) a) ...
While I was looking, I noticed another bug (which only
affects performance) in cfratsimp -- the second clause is
incorrect.
The corrected cfratsimp is:
(defun cfratsimp (a)
(cond ((atom a) a)
((memq 'cf (car a)) a)
(t (cons '(mlist cf simp)
(apply 'find-cf (cf-back-recurrence (cdr a)))))))
Logged In: YES
user_id=588346
This fix also corrects the following error:
cf(2*sqrt(2)*sqrt(3)) => Error: 5 is not of type LIST.
(Note though that the answer is still rubbish.)
Logged In: YES
user_id=501686
The definition given above has been pasted into
src/combin.lisp and committed. Maxima cvs version rebuilt w/
clisp 2.33.2 and gcl 2.6.6, run_testsuite succeeds
(rtest10.mac has some cf tests), and examples shown by
describe(cf) are unchanged as expected.
Now cf ([2]+[5]) yields 7.
cf (2*sqrt(2)*sqrt(3)) yields 5 with cflength:1 (default),
and yields [4 1, 5, 9] with cflength:2, and [4, 1, 9, 1, 2,
3, 2] with cflength:3 . Dunno what output with cflength:1 is
supposed to be; in any event, if it's a bug, it's a
different bug, so I'm closing this one.
Log in to post a comment.