unsigned long long conversion

Francois G. Dorais dorais at gauss.dartmouth.edu
Fri Apr 8 09:04:49 CEST 2005

On Thu, 7 Apr 2005, Torbjorn Granlund wrote:

> <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.

Hi Torbjörn

Though I read this list a lot, I usually keep quiet (mostly because you
do a fine job at expressing my opinion, but this is an exception.) However, I
think this is wrong: good features of C99 ought to be suported by GMP. I
used "ought" instead of "should" because the latter is a strong verb. GMP
should not support long long on platforms that make it difficult to work with
them, but it definitely should on platforms which do have good long long

I might be wrong, but I think GMP should sometimes make a statement and
support "good stuff". I put "good stuff" in quotes because I think this is
what we should be discussing here (or where appropriate) instead of

I understand that this is not easy, and GMP's policies have been far from
disappointing in any respect --- nobody is perfect, but that's exactly as
far down the list GMP is, i.e. GMP is great!!!

More information about the gmp-discuss mailing list