Search code examples
c++ntl

NTL convert ZZX to ZZ_pEX


In NTL, I've the following variables:

ZZ p;
ZZX FX;
ZZX GX;

and I want to calculate

GCD(GX, FX) over F_p(x)

How can I convert FX and GX into a F_p(x) polynomial?


Solution

  • You can use conv(T out, S in).

    conv is defined for many pairs of type.
    You can find a list of all combinations here.

    I assume by F_p(x) you mean ZZ_pX or ZZ_pEX.