$SPAD/src/input bug100.input

Timothy Daly December 3, 2016

Abstract

Contents

2

This code used to cause an infinite loop that eventually killed Axiom. The bug exists in the intef.spad, in ElementaryIntegration (INTEF), in the routines lfextendedint and

lflimitedint.

The input

  integrate((z^a+1)^b,z)

triggers the bug because of line 2 of each function. Line 2 of these functions used to read:

      symbolIfCan(k := kmax(l := union(l, varselect(kernels g, x))))

The loop occurs when the call to union causes

                     a log(z)
                   %e

to get added to the list every time. This gives the argument to kmax

                 a log(z)
      arg1= [z,%e        ]

and the result being

        a log(z)
      %e

We keep coming back to process this term, which ends up putting the same term back on the list and we loop. Waldek’s solution is to remove the union call.

— * —

)set break resume
)spool bug100.output
)set message test on
)set message auto off
)clear all
--S 1 of 1
integrate((z^a+1)^b,z)
--R
--R           z
--R         ++     a     b
--R   (1)   |   (%I  + 1) d%I
--R        ++
--R                                         Type: Union(Expression(Integer),...)
--E 1

———-

If we substitute z for

           z
         ++    a     b
         |   (z  + 1) dz
        ++

which is the original input integral. — * —

)spool
)lisp (bye)

———-

References^{[1] nothing}

5