Igor Schein on Thu, 19 May 2005 01:28:44 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: fordiv() memory hungry |
On Thu, May 19, 2005 at 12:44:03AM +0200, Bill Allombert wrote: > On Wed, May 18, 2005 at 06:01:09PM -0400, Igor Schein wrote: > > Hi, > > > > (17:51:45) gp> fordiv(32!,x,0) > > *** fordiv: the PARI stack overflows ! > > current stack size: 256000000 (244.141 Mbytes) > > [hint] you can increase GP stack with allocatemem() > > > > Looks like fordiv() is no improvement over divisors() by virtue of > > having to create the whole static array first. Is it possible to make > > fordiv() more memory-effcient without sacrificing the speed? > > Depends if you insist about having the divisors in increasing order. > If you don't, you can use forvec() instead. I can't figure out how to use forvec() to obtain an unsorted list of divisors. Is it possible? Thanks Igor