Test regression in rtest_trig with cmucl



This was my commit--I purloined the catch stuff from csign (defined in compar.lisp).  I believe  I tested the patch with CCL & SBCL. 
As I recall after I committed this patch, Robert made a related change. True? What was it?

(defmfun csign (x)
  (or (not (free x '$%i))
      (let (sign-imag-errp limitp) (catch 'sign-imag-err ($sign x)))))

--Barton

________________________________________

I just noticed that cmucl now started failing test 70 in rtest_trig.
Using git bisect, the cause of the regression is commit 5ea6ff3 whose
log says

    o fix for polarform error on simple case - ID: 3517034
    o append regression tests to rtest16

The change is the addition of 3 lines near line 672 in rpart.lisp:

diff --git a/src/rpart.lisp b/src/rpart.lisp
index 6e089f8..b8ef87f 100644
--- a/src/rpart.lisp
+++ b/src/rpart.lisp
@@ -672,6 +672,9 @@
                        ((eq gs '$neg)
                         (cons (neg l) (simplify '$%pi)))
                        (t (cons (take '(mabs) l) (genatan 0 l))))))))
+       ((eq '$zero (let ((sign-imag-errp nil)) (catch 'sign-imag-err
($sign l))))
+        (setq l ($expand l))
+        (cons l l))
        ((member (caar l) '(rat bigfloat) :test #'eq)
         (cons (list (car l) (abs (cadr l)) (caddr l))
               (argnum (cadr l))))


Does anyone else see this regression?  I can confirm that if those three
lines are removed, then cmucl passes all of tests in the testsuite
(except, of course, the test for the fix).

This could be a bug in cmucl, of course.

Ray

_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima