Menu

#996 no tag sign-imag-err

None
wont-fix
nobody
Lisp Core (461)
5
2017-06-26
2006-09-29
No

When sign-imag-errp is false, I think $sign shouldn't
signal an error for a nonreal argument. But ...

(defun $gr (a b)
(let ((sign-imag-errp nil))
(eq t (mgrp a b))))

(%i107) gr(5,%i);
Maxima encountered a Lisp error: Error in LET [or
callee]: The tag SIGN-IMAG-ERR is undefined.

Discussion

  • Robert Dodier

    Robert Dodier - 2006-10-21

    Logged In: YES
    user_id=501686

    Without looking at the code, I am inclined to agree that
    SIGN-IMAG-ERRP should quiet SIGN-IMAG-ERR.

     
  • Kris Katterjohn

    Kris Katterjohn - 2017-06-26
    • status: open --> wont-fix
    • Group: --> None
     
  • Kris Katterjohn

    Kris Katterjohn - 2017-06-26

    This doesn't occur anymore since MGRP uses CSIGN now (see commit [d14752]). (And see below for more on CSIGN.)

    But I don't think there was a problem to begin with. This is how binding SIGN-IMAG-ERRP is supposed to work:

    (defmvar sign-imag-errp t
      "If T errors out in case COMPAR meets up with an imaginary quantity.
       If NIL THROWs in that case."
      no-reset)
    

    When SIGN-IMAG-ERRP is T, Maxima raises an error with MERROR. When SIGN-IMAG-ERRP is NIL, it THROWs using the tag SIGN-IMAG-ERR instead. (See IMAG-ERR.)

    When you bind SIGN-IMAG-ERRP to NIL, you're saying "There will be a CATCH set up for this", so if you don't have a CATCH then you get the lisp error (as expected).

    CSIGN binds SIGN-IMAG-ERRP to NIL and uses CATCH.

    I'm closing this as wont-fix.

     

    Related

    Commit: [d14752]


Log in to post a comment.