I'm having a weird memory leak problem when I use Compiler, and numerical NAG routines for integration - at least I think it's that combination that's causing it. To see it run this:
First define the functions to use:
if not (k::numeric) then return 'procname'(args) fi;
INT:=proc(X) if not X::numeric then return 'procname'(x) fi; int(F(x),x=0..X,numeric,method=_d01ajc); end proc;
Then evaluate lots of times:
for i to 10^6 do a:=rand()/1e12; INT(a); od:
And watch your computer memory go wild. I'm using Maple 17 on a new mac with 8Gig RAM, using Mavericks. It doesn't take more than a few minutes to grind the system to a halt. A restart command does not release the memory in the mserver process. [I've noticed similar problems in the past, so it's not locallised to this OS I think.]
On a related note, there's a problem with nested NAG integrals - in the do loop try this:
it never gives zero! The problem lies in using the same NAG routine twice [here _d01ajc] for a nested integral. I've never found a way around this bug!
Any help would be much appreciated!