Igor Schein on Thu, 19 May 2005 00:16:46 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

fordiv() memory hungry


(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?