unsigned long long conversion

Torbjorn Granlund tege at swox.com
Thu Apr 7 17:41:36 CEST 2005


<keith.briggs at bt.com> writes:

  I have solved my own problem with this:
  
  void mpz_set_uj(mpz_t x, unsigned long long y) {
    mpz_import(x,sizeof(unsigned long long),-1,1,0,0,&y);
  }
  
  (but I still need the mpz_add_uj and mpz_mul_uj functions.)
  
We cannot add "long long" accepting functions to the GMP user
interface, since that is not part of the C89 standard, and is
indeed not supported by a lot of compilers.

--
Torbjörn


More information about the gmp-discuss mailing list