Handle arbitrary base number systems

Flavio Andreazzi flavio3 at email.it
Sun May 22 20:19:57 CEST 2011

Dear GMP community,
I would like to know whether it is possible to handle number systems for
(natural) bases grater than 62 through GMP.

For instance is it possible to represent a bit-string of arbitraty length as
a string of digits in base 103, work with this and finally convert the
string back to binary?

I have read the manual and some old threads, but the only function available
seems to be

char * mpz_get_str (char *str, int base, mpz_t op)
[at http://gmplib.org/manual/Converting-Integers.html]

with base either in the range [2,..,62] or [-2,..,-36]

It would be nice to have a function which allows "conversion" from an
arbitrary base b0 to another b1. Can this be achieved using GMP?

Thanks a lot, Flavio 
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP
autenticato? GRATIS solo con Email.it: http://www.email.it/f
 Per la Notte Rosa prenota online i pacchetti speciali di Riccione Family
Hotels! Sconti bimbi, spiaggia, mini club, animazione, baby menu, parchi
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11445&d=20110522

More information about the gmp-discuss mailing list