[gambit-list] Computing a billion decimal digits of pi
bakul at bitblocks.com
Thu Jun 13 15:12:07 EDT 2013
On Thu, 13 Jun 2013 10:09:09 +0300 Mikael <mikael.rcv at gmail.com> wrote:
> > gambit
> > uses double the space due to portable C code. Right there you
> > lose a factor of two!
> Wait, double space for what, and by what reason?
You break up a bignum in "digits" & that you store one digit
per word. I was told that in gambit the digit size is 32bits
on a 64bit machine and 16its on a 32bit machine so you are
fetching/storing at least 2N bits for an N bit bignum.
As to why, you have to ask Gambit's bignum implementor. My
guess is it makes certain operations easier in a higher level
language that doesn't have operators for add-with-carry,
returning double width results etc.
More information about the Gambit-list