Simple multiply example for a low level (mpn_) function

Niels Möller nisse at
Mon Jan 12 08:30:04 CET 2004

"Peter Hicks" <trick at> writes:

>     mpn functions are notoriously hard to use. Can I have a simple multiply example for 16*16.

  mp_limb_t a[16];
  mp_limb_t b[16];
  mp_limb_t c[32];
  ... store some values in a and b...
  /* Compute c = a * b */
  mpn_mul_n(c, a, b, 16);


More information about the gmp-discuss mailing list