Bill Allombert on Sat, 19 Dec 2015 18:25:05 +0100

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

gp2c extension for the FpX API

Dear PARI developers,

I have added a GP2C extension to generate code that use the FpX ABI with

Here an example:

fun(P:FpX,Q:FpX,p:int) = P*Q+Q^2

GP2C will generate

return FpX_add(FpX_mul(P, Q, p), FpX_sqr(Q, p), p);

Note that the prime number will always be named p, and the modulus T.

Types available are Fp, FpX, Fq, FqX but more can be added (Flx, etc.)

This is useful if you have complex formulae that you want to
convert to C.  The function Fq_polmodular_eval was written that way.