The following code triggers an error message "Too many contexts". The problem is that $INTEGRATE eventually calls MONSTERTRIG which then calls $INTEGRATE with the integrand unchanged, which calls MONSTERTRIG, etc.
DD:3;
f(i,j,x,y):=cos(i*(x+y)/2)*sin(j*(x-y)/4);
pp(x):=cos(x)+cos(2*x);
Dint(f,v,a,b):=block([FF:ratsimp(integrate(f,v))],subst(b,v,FF)-subst(a,v,FF));
fn(i,j,x,y):=ratsimp(f(i,j,x,y)/ev(sqrt(Dint(Dint(f(i,j,x,y)*f(i,j,x,y),x,-4*%pi,4*%pi),y,-4*%pi,4*%pi))));
wf(i,x,y):=fn(floor(i/4),mod(i,4)+1,x,y);
EP1:genmatrix(ev(aa),DD,DD);
g:2;
for i from 0 thru DD do (for j from 0 thru DD do
aa[i,j]:(Dint(Dint(wf(i,x,y)*wf(j,x,y)*(pp(x)+pp(y)),x,-%pi,%pi),y,-%pi,
%pi)));
The bug is not triggered when i=0 and j=0, but it is triggered when i=0 and j=1.
See comments in MONSTERTRIG in src/sin.lisp.
This problem appeared on the mailing list under the subject "Error message: Too many contexts".
Dan Gildea
2008-05-17
Dan Gildea
2008-05-17
Logged In: YES
user_id=1797506
Originator: NO
seems ok in current cvs.