Bill Allombert on Wed, 28 Nov 2012 15:04:51 +0100


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

Re: when pari_init() fail


On Wed, Nov 28, 2012 at 10:34:52PM +0900, Iwao Kimura wrote:
> Hi,
> 
> Thank you for your prompt response/fix. The explanation in the
> last paragraph is very clear.
> 
> The short code is written by some newbie of pari library programming.
> It is not obvious for such people that what size of stack is enough for
> their daily use.

The documentation says:

\fun{void}{pari_init}{size_t size, ulong maxprime}

\noindent The first argument is the number of bytes given to PARI to work
with, and the second is the upper limit on a precomputed prime number table;
\kbd{size} should not reasonably be taken below $500000$

All the example files use at least 1000000.
It is documented that GP use 4000000/8000000.

> The next point is what size of DEFAULTSTACK is enough for most users :)

This is difficult to answer. It depends what you want to do and how much
memory you have available.

Cheers,
Bill.