Stack overflow on silly arithmetic



OK, on looking at this again, I think it's a simplifier bug.
The display code does have trouble w/ Lisp complex numbers,
but I think that's a distraction. (I fixed the display problem, but
the bug still occurs.)

The code in the original report

>   http://stackoverflow.com/questions/6808077/

is this:

log10(x):=log(x)/log(10);
char(x):=floor(log10(x))+1;
mantissa(x):=x/10**char(x);
chop(x,d):=(10**char(x))*(floor(mantissa(x)*(10**d))/(10**d));
rnd(x,d):=chop(x+5*10**(char(x)-d-1),d);
d:5;
a:10;
Ibwd:[[30,rnd(integrate((x**60)/(1+10*x^2),x,0,1),d)]];
for n from 30 thru 1 step -1 do
Ibwd:append([[n-1,rnd(1/(2*n-1)-a*last(first(Ibwd)),d)]],Ibwd);

Try tracing SPLITPROD and COMPSPLT1 -- I find that the loop gets through
several iterations (calling SPLITPROD and COMPSPLT1 along the way),
then it gets into an endless recursion in which SPLITPROD and COMPSPLT1
are called over and over, until it gets a stack overflow.

best

Robert Dodier

PS. I am working with nearly-current source from Git.