Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
ubuntu2004
Function: _def_primelimit Class: default Section: default C-Name: sd_primelimit Prototype: Help: Doc: \kbd{gp} precomputes a list of all primes less than \kbd{primelimit} at initialization time, and can build fast sieves on demand to quickly iterate over primes up to the \emph{square} of \kbd{primelimit}. These are used by many arithmetic functions, usually for trial division purposes. The maximal value is $2^{32} - 2049$ (resp $2^{64} - 2049$) on a 32-bit (resp.~64-bit) machine, but values beyond $10^8$, allowing to iterate over primes up to $10^{16}$, do not seem useful. Since almost all arithmetic functions eventually require some table of prime numbers, PARI guarantees that the first 6547 primes, up to and including 65557, are precomputed, even if \kbd{primelimit} is $1$. This default is only used on startup: changing it will not recompute a new table. \misctitle{Deprecated feature} \kbd{primelimit} was used in some situations by algebraic number theory functions using the \tet{nf_PARTIALFACT} flag (\tet{nfbasis}, \tet{nfdisc}, \tet{nfinit}, \dots): this assumes that all primes $p > \kbd{primelimit}$ have a certain property (the equation order is $p$-maximal). This is never done by default, and must be explicitly set by the user of such functions. Nevertheless, these functions now provide a more flexible interface, and their use of the global default \kbd{primelimit} is deprecated. \misctitle{Deprecated feature} \kbd{factor(N, 0)} was used to partially factor integers by removing all prime factors $\leq$ \kbd{primelimit}. Don't use this, supply an explicit bound: \kbd{factor(N, bound)}, which avoids relying on an unpredictable global variable. The default value is \kbd{500k}.