Ilya Zakharevich on Thu, 24 Nov 2005 01:51:24 +0100

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

Re: pari_init and programs using libpari.

On Tue, May 17, 2005 at 02:37:52PM +0200, Bill Allombert wrote:
> Hello pari-dev,
> We are considering adding a new function as an optionnal replacement for
> pari_init. The idea is to add a flag that would let the user some
> behaviour of pari_init tpht might interfer with the program, in
> particular the installation of a signa handler.
> We consider adding a function:
> void pari_init_fancy(size_t parisize, ulong maxprime, long initops)
> If you have ran into trouble with pari_init() and would like
> improvements, now it is time to speak up.

Sorry for entering into discussion late.

This is what Math::Pari is using for many years now:

   /* These guys are new in 2.0. */

   primelimit = SvIV(pri);
   parisize = SvIV(mem);
   init(parisize, primelimit); /* Default: take four million bytes of
			        * memory for the stack,   calculate
				* primes up to 500000. */

[Current version is a little bit different, since it tries to reinit()
PARI on the second call - not very successfully...]

Hope this helps,