[ maxima-Bugs-609464 ] 1+%e,numer and %e^%e,numer



Am Sonntag, den 17.05.2009, 22:35 +0200 schrieb Dieter Kaiser:

These are the changes to get the numerical results shown in the last
posting:


(defmfun simplifya (x y)
  (cond ((and $nummer 
              $%enumer
              (symbolp x) 
              (eq x '$%e))
         ;; Simplify %e to numerical value 
         %e-val)
        ((or (atom x) (not $simp)) x) 
        ...

(defun plusin (x fm)
  (prog (x1 flag check w xnew)
     (setq w 1)
     (when (and $numer (eq x '$%e))
       ;; Replace %e with numerical value 
       (setq x %e-val))
     (cond ((mtimesp x)
     ...

(defmfun simpexpt (x y z)
  (prog (gr pot check res rulesw w mlpgr mlppot)
     (setq check x)
     (cond (z (setq gr (cadr x) pot (caddr x)) (go cont)))
     (twoargcheck x)
     (setq gr (simplifya (cadr x) nil))
     (setq pot 
           (let (($%enumer $numer)) ; Allow simplification of %e
             (simplifya (if $ratsimpexpons 
                            ($ratsimp (caddr x)) 
                            (caddr x)) 
                        nil)))
     cont	(cond (($ratp pot) (setq pot (ratdisrep pot)) (go cont))
     ...

Dieter Kaiser