Search code examples
cpari

Implementing bitwise operations using pari c library


I am new to using the PARI C library.

How can I perform bitwise ('and' or 'or') operations on the GEN type variables?


Solution

  • using gbitand and gbitor ?

    Declared in arith2.c see this link (sorry for the not so direct link):

    GEN     gbitand(GEN x, GEN y)
    GEN     gbitor(GEN x, GEN y)