Bit interleaving

Kevin Ryde user42 at
Fri Apr 2 23:28:51 CEST 2004

Joachim Durchholz <jo at> writes:
> A typical example would be four integers aaa, bbb, ccc, and ddd, with
> an interleaved result of abcdabcdabcdabcd (each letter stands for a
> single bit).

There's nothing like that at present, it sounds rather application

> Typical integer size would be about 80 bits.

That's not very big of course :-)

> Downside: constant maintenance overhead for
> keeping in sync with GMP updates. Advantage: seems to be fastest.

You can always mpz_import after your own manipulations instead.

More information about the gmp-discuss mailing list