Decimal arithmetic

Décio Luiz Gazzoni Filho decio at decpp.net
Wed Apr 4 18:46:13 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've been asked off-list by a former member about digit extraction  
functions in GMP. I've given the usual lecture about how digit  
extraction is a slow operation if the library does binary arithmetic,  
since it requires a base-2 to base-10 conversion. With that said, a  
base-10 library would provide efficient digit extraction while not  
sacrificing much performance.

So what are the choices of libraries that support base-10 arithmetic?  
Can GMP itself be easily modified to support it? As far as I know, Pi- 
calculating programs such as QuickPi and PiFast do the arithmetic in  
decimal since the result will be eventually printed out (in decimal,  
of course). But these programs are generally closed-source, and even  
if they weren't, I assume they wouldn't provide a proper library  
interface.

Décio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGE9ZY9zcAVrR+ETURAhHxAJ9dPaSIA0MseMvEx1tZ/YqY2mfu+ACfa5/X
I3SI2IBycHQZWc4qKUJP0i0=
=3IgD
-----END PGP SIGNATURE-----


More information about the gmp-discuss mailing list