integration error



On 3/23/08, cunzhang <apzc2529 at gmail.com> wrote:

>  (%i1) integrate(cos(a*x)/(1+x^2),x,0,inf);
>  Is  a   positive, negative, or zero? zero;
>  Maxima encountered a Lisp error:
>    Error in PROGN [or a callee]: Caught fatal error [memory may be damaged]

Thanks for this bug report.

It appears that the bug originates from a MRAT expression which
some function isn't prepared to handle ... The following patch fixes
this bug. Not sure yet what other effect it might have.

--- src/defint.lisp     17 Feb 2008 20:54:22 -0000      1.55
+++ src/defint.lisp     23 Mar 2008 15:59:15 -0000
@@ -1015,7 +1015,7 @@
              (eq ($sign (m+ (deg (setq nn* ($imagpart (caddr term))))
                             -2.))
                  '$neg))
-        (cond ((eq ($asksign (ratcoef nn* var)) '$pos)
+        (cond ((eq ($asksign (ratdisrep (ratcoef nn* var))) '$pos)
                (setq *updn t))
               (t (setq *updn nil)))
         term)

FWIW

Robert Dodier