#2583 sign error for integrate(x^(8*%i-1),x);


(%i2) integrate(x^(8*%i-1),x);
8 %i - 1
1 Enter integrate [x , x]
sign: argument cannot be imaginary; found %i
-- an error. To debug this try: debugmode(true);
(%i3) build_info();
Maxima version: "branch_5_30_base_98_g29f9239_dirty"
Maxima build date: "2013-06-01 06:10:00"
Host type: "i686-pc-cygwin"
Lisp implementation type: "Clozure Common Lisp"
Lisp implementation version: "Version 1.9-r15764 (WindowsX8632)"


  • Barton Willis

    Barton Willis - 2013-06-02
    • assigned_to: Barton Willis
  • Barton Willis

    Barton Willis - 2013-06-02

    The new askequal function is the cause of this bug. When meqp is
    able to determine equality or inequality, the functions tdpn and
    tdzero shouldn't be called. Putative fix:

    (defun $askequal (a b)
    (let ((answer (meqp (sratsimp a) (sratsimp b)))) ; presumably handles mbags and extended reals.
    (cond ((eq answer t) '$yes)
    ((eq answer nil) '$no)
    (setq answer (retrieve `((mtext) ,(intl:gettext "Is ") ,a ,(intl:gettext " equal to ") ,b ,(intl:gettext "?")) nil))
    (cond ((member answer '($no |$n| |$N|) :test #'eq)
    (tdpn (sub b a))
    ((member answer '($yes |$y| |$Y|) :test #'eq)
    (tdzero (sub a b))
    (mtell (intl:gettext "Acceptable answers are yes, y, Y, no, n, N. ~%"))
    ($askequal a b)))))))

  • Robert Dodier

    Robert Dodier - 2013-08-01
    • labels: --> Lisp Core - Integration, Lisp Core - sign

Log in to post a comment.