While looking at the bfloat issue, I noticed the following problem:
(%i2) to_lisp();
Type (to-maxima) to restart, ($quit) to quit Maxima.
MAXIMA> (integer-decode-float pi)
7074237752028440
MAXIMA>
Note that integer-decode-float is supposed to return three values.
Maxima has only printed one. This is quite annoying.
I propose the following change to maxima-read-eval-print-loop in
init-cl.lisp (new part starts with ***):
;; Original version
(defun maxima-read-eval-print-loop ()
(setf *debugger-hook* #'maxima-lisp-debugger-repl)
(loop
(catch 'to-maxima-repl
(format t "~a~%~a> ~a" *prompt-prefix*
(package-name *package*) *prompt-suffix*)
(finish-output)
(let ((form (read)))
(prin1 (eval form))))))
;; New version
(defun maxima-read-eval-print-loop ()
(setf *debugger-hook* #'maxima-lisp-debugger-repl)
(loop
(catch 'to-maxima-repl
(format t "~a~%~a> ~a" *prompt-prefix*
(package-name *package*) *prompt-suffix*)
(finish-output)
(let ((form (read)))
;; *** Get all values from the form and print them one by one.
(let ((results (multiple-value-list (eval form))))
(dolist (r results)
(fresh-line)
(prin1 r)))))))
With this change, maxima now prints:
MAXIMA> (integer-decode-float pi)
7074237752028440
-51
1
MAXIMA>
This makes more sense to me. If there are no objections, I'd like to
make this change.
Ray