Re: question on gp2c-run results

Bill Allombert <[email protected]>
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <aGK4adg2YB0mdA9V@seventeen>
On Mon, Jun 30, 2025 at 08:44:27AM -0700, American Citizen wrote:
> Hello:
> 
> I get the following results using the test-polred.gp file (included in this
> post)
> 
> ? \r test-polred.gp
> X = 1.4142135623730950488016887242096980786
> Y = 1.7320508075688772935274463415058723670
> poly_x = x^2 - 2
> poly_y = x^2 - 3
> [[x, x^2 - 2], [x, x^2 - 3]]
> ? \q
> Goodbye!
> 
> but running gp2c-run test-polred.gp has an unusual result for me.
> 
> owner@localhost:~/math/Herons> gp2c-run test-polred.gp
> test-polred.gp.c: In function ‘test’:
> test-polred.gp.c:40:11: error: too many arguments to function ‘polred0’
>    40 |   red_x = polred0(poly_x, 0, NULL);
>       |           ^~~~~~~
> In file included from /usr/local/include/pari/pari.h:47,
>                  from test-polred.gp.c:2:
> /usr/local/include/pari/paridecl.h:2399:9: note: declared here
>  2399 | GEN     polred0(GEN x, long flag);
>       |         ^~~~~~~
> test-polred.gp.c:41:11: error: too many arguments to function ‘polred0’
>    41 |   red_y = polred0(poly_y, 0, NULL);
>       |           ^~~~~~~
> /usr/local/include/pari/paridecl.h:2399:9: note: declared here
>  2399 | GEN     polred0(GEN x, long flag);
>       |         ^~~~~~~

The headers files does not match gp2c.
You probably need to do 'make install' in the PARI directory that was used for GP2c.

Cheers,
Bill
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.