direct conversion from int64_t
Atze Dijkstra
atze at xs4all.nl
Tue Mar 10 21:12:52 CET 2009
Hi,
I'd like to convert a int64_t directly to an mpz. As far as I can tell
function 'mpz_set_si' is the most direct way to do this, but the
'signed long int' parameter turns out to be 32 bits only (MacOSX
10.5.6). Is there any way to directly convert a 64 bits value without
splitting a 64 bits value into a most + least significant part,
building separates mpz for these parts and shifting + multiplying
these (or do 2 to+from string conversions...)? Am I overlooking
alternatives to mpz_set_si, or is conversion from/to 64 bits values
not supported on 32 bit platforms?.
thanks in advance,
- Atze -
Atze Dijkstra, Department of Information and Computing Sciences. /|\
Utrecht University, PO Box 80089, 3508 TB Utrecht, Netherlands. / | \
Tel.: +31-30-2534118/1454 | WWW : http://www.cs.uu.nl/~atze . /--| \
Fax : +31-30-2513971 .... | Email: atze at cs.uu.nl ............ / |___\
More information about the gmp-discuss
mailing list