Hi,
While playing with polyml limits I executed the function squares from Paulsons Book: fun squares r = let fun between (x, y) = (* all pair between x and y*) let val diff = r - x*x fun above y = (* all pairs above y*) if y>x then [] else if y*y < diff then above (y + 1) else if y*y = diff then (x, y) :: between(x-1, y+1) else (*y*y > diff*) between(x-1, y) in above y end; val firstx = floor(Math.sqrt(real r)) in between(firstx, 0) end;
And then I executed and I got:
squares 3092481270109283;
Warning - Increasing stack from 147456 to 294912 bytes Warning - Increasing stack from 294912 to 589824 bytes Warning - Increasing stack from 589824 to 1179648 bytes Warning - Increasing stack from 1179648 to 2359296 bytes Warning - Increasing stack from 2359296 to 4718592 bytes Warning - Increasing stack from 4718592 to 9437184 bytes Warning - Increasing stack from 9437184 to 18874368 bytes Warning - Increasing stack from 18874368 to 37748736 bytes Warning - Increasing stack from 37748736 to 67108860 bytes Warning - Stack limit reached - interrupting process Exception- Interrupt raised
I know it's a huge number, that was the idea. :D How can I increase the stack limit?
Cheers,