Neill Clift on Sun, 01 Jan 2017 04:47:21 +0100

 Re: Getting a very large polynomial into pari/gp

• To: "pari-users@pari.math.u-bordeaux.fr" <pari-users@pari.math.u-bordeaux.fr>
• Subject: Re: Getting a very large polynomial into pari/gp
• From: Neill Clift <neillclift@live.com>
• Date: Sun, 1 Jan 2017 03:47:11 +0000
• Accept-language: en-US
• Delivery-date: Sun, 01 Jan 2017 04:47:21 +0100
• References: <CY1PR15MB0217E63319BAEF7C94603D07B56A0@CY1PR15MB0217.namprd15.prod.outlook.com> <20161230103155.GB83685@math.u-bordeaux.fr> <20161230172438.GA14385@yellowpig> <CY1PR15MB02175EB7EE96230E0123AB24B56D0@CY1PR15MB0217.namprd15.prod.outlook.com> <20161231154425.GB14385@yellowpig> <CY1PR15MB021767410D8AE852BCC1A186B56D0@CY1PR15MB0217.namprd15.prod.outlook.com> <20161231170502.GA4270@yellowpig>
• Spamdiagnosticoutput: 1:99
• Thread-topic: Getting a very large polynomial into pari/gp

```On 12/31/2016 9:05 AM, Bill Allombert wrote:
> The libpari library provides a set of functions to deal with polynomials
> over F_p that implement the half-GCD algorithm but they are not directly
> available in GP.
>
> Try:
> install("FpX_gcd","GGG")
> p = 2^64-59;
> FpX_gcd(a,b,p)
>
> and actually since p is less than 2^64 there is another function that
> use a more compact representation of polynomials (Vecsmall), but the
> above function will do the conversions for you.
While the other gcd ran overnight this one failed in an hour.

(18:03) gp > FpX_gcd(a,b,p)
***   at top-level: FpX_gcd(a,b,p)
***                 ^--------------
*** FpX_gcd: not enough memory
(19:08) gp >

This seems to be different from the stack size messages I have got
(stack size set to 64G).
> If you use Windows make sure to use the installer and ot the stand-alone
> binary. Unfortunately install() does not work with the stand-alone
> binary.
I believe I used the installer as I have a desktop icon that's a
shortcut to pari/gp and it shows installed in control panel.
>
> For this kind of computation, you should consider using the PARI library
> directly.
That was my initial thought as well but my first try at getting the code
to compile with just the Pari header included gave me errors:

1>../src/kernel/none/divll_pre.h(37): error C2275: 'pari_ulong': illegal
use of this type as an expression
1>  c:\program files (x86)\pari64-2-9-1\include\pari\parigen.h(17):
note: see declaration of 'pari_ulong'
1>../src/kernel/none/divll_pre.h(37): error C2146: syntax error: missing
')' before identifier '__arg'

Thanks.
Neill.

```