View Single Post
Old 2009-10-01, 00:28   #3
grandpascorpion
 
grandpascorpion's Avatar
 
Jan 2005
Transdniestr

50310 Posts
Default Mea culpa

Sorry, I see my error.

I was doing calculations with an "unsigned long int" and wasn't doing an apparently necessary cast to "unsigned long long int". Both using the long long type and explicitly casting the long to it worked.

%I64u is definitely the format to use in this scenario.

And it turns out, the position of "unsigned" doesn't matter.

Thanks for your feedback though.


=====================================

Unfortunately, it looks like there isn't built-in functions to initialize/set an mpz_t to a long long.
mpz_init_set_ui(a,b) just sets a to the lower 32-bits of b.

Last fiddled with by grandpascorpion on 2009-10-01 at 00:41
grandpascorpion is offline   Reply With Quote