From: Robert D. <rob...@gm...> - 2015-09-09 20:28:16
|
On 2015-09-08, SANGWIN Chris <C.J...@ed...> wrote: > Perhaps a bug has been fixed in powerdisp with simp:false, > which means I now have to set powerdisp:true. Is that possible? No, don't change your code -- there is a bug in the display-formatting sutff. I think I've fixed it and hope to push a commit soon. best Robert Dodier PS. Here's my work in progress. I am assuming that "+" expressions should not be reordered if they are not simplified. This restores the behavior you noted in pre-5.37 versions. $ git diff diff --git a/src/nforma.lisp b/src/nforma.lisp index 7243cb8..034630d 100644 --- a/src/nforma.lisp +++ b/src/nforma.lisp @@ -57,9 +57,10 @@ (t form))) ; if there is no formatter. Just return form unchanged. -(defun form-mplus (form &aux args trunc) +(defun form-mplus (form &aux args trunc simplified) (setq args (mapcar #'nformat (cdr form))) (setq trunc (member 'trunc (cdar form) :test #'eq)) + (setq simplified (member 'simp (cdar form) :test #'eq)) (cons (if trunc '(mplus trunc) '(mplus)) (cond ((and (member 'ratsimp (cdar form) :test #'eq) (not (member 'simp (cdar form) :test #'eq))) @@ -70,8 +71,8 @@ (if (and (not (mmminusp (car args))) (mmminusp (cadr args))) args - (nreverse args))) - (t (nreverse args))))) + (if simplified (nreverse args) args))) + (t (if simplified (nreverse args) args))))) (defun form-mtimes (form) (cond ((null (cdr form)) '((mtimes))) |