[Maxima-commits] CVS: maxima/src troper.lisp,1.5,1.6



Andreas Eder wrote:
> -	      ;; See bug 771218.  This causes maxima to think that
> -	      ;; (-1)^(0.5) is a float and uses cl:expt.  But the
> -	      ;; result is not a float, and calling cl:expt returns a
> -	      ;; Lisp complex number, which confuses maxima.
> -	      #+nil
> -	      ((and (covers '$number (car bas)) (covers '$number (car exp)))
> -	       `(,(*union-mode (car bas) (car exp)) expt ,(cdr bas) ,(cdr exp)))
>  
This is always tricky.  Even though it's commented out, it contains some
useful information.  Clearly, the comment says this code causes a bug,
but it doesn't explain what this clause was really supposed to do.  
Perhaps it is useful for some other case.

I have replaced existing Maxima code with a different implementation,
but I sometimes also leave the original around so I can look at it some
later time, in case a mistake was made.   Yes, it's in CVS, but I would
never be able to remember what version it last existed in, unless the
checkin comment was clear.

Definitely, a fine line to walk.

Ray