rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

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

Open rtoy opened 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-07 14:53:50 Created by willisbl on 2013-06-01 13:12:15 Original: https://sourceforge.net/p/maxima/bugs/2583


(%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(); (%o3) 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)"

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-07 14:53:50 Created by willisbl on 2013-06-02 12:17:28 Original: https://sourceforge.net/p/maxima/bugs/2583/#e8c2


rtoy commented 4 months ago

Imported from SourceForge on 2024-07-07 14:53:54 Created by willisbl on 2013-06-02 12:17:29 Original: https://sourceforge.net/p/maxima/bugs/2583/#77ee


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) (t (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)) '$no) ((member answer '($yes |$y| |$Y|) :test #'eq) (tdzero (sub a b)) '$yes) (t
(mtell (intl:gettext "Acceptable answers are yes, y, Y, no, n, N. ~%")) ($askequal a b)))))))

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-07 14:53:58 Created by robert_dodier on 2013-08-01 05:16:08 Original: https://sourceforge.net/p/maxima/bugs/2583/#bc2c