Interested in theory and design behind gmp

Torbjorn Granlund tg at
Wed Oct 14 12:36:13 CEST 2009

"Wout de Zeeuw" <wout at> writes:

  I'm a programmer with a physics background and I have developed an
  interest in the field of exact arithmetic. Thus I inevitably ended up
  at the GMP library. But, my primary motive is gaining understanding of
  the theory and design decisions on how to build multi-precision code,
  and not using GMP or another component off the shelf. I want to gain
  lower level knowledge to start building components in C# (or java). I
  explicitly do not want to wrap GMP in some C# layer as hard
  performance is not my motive. As a side product I want to document the
  whole design/implementation process, so people could apply this on any
  random platform (java, ruby, whatever).
  With this in mind, I'm looking for ways to get familiar with the
  subject. This could be books, or following courses at university, or
  perhaps hiring somebody who is well at home at the subject to inject
  know-how into my head. If anybody has advice or can offer me help on
  this, do drop me a note!
There are several texts on this subject.  You might start with the
algorithms chapter in the GMP manual.  Knuth's Seminumerical Algorithms is
the standard text, but it is now a bit outdated.  As a beginner's text
Knuth is still relevant, though.

The design/implementation process of GMP is difficult to describe.  I
suppose it all started when I was a young boy as a
hack-all-night-you-can-sleep-when-you-get-old-project.  It then slowly
was taken up by more and more projects, since it was fast and not as
buggy as much current software.

Careful testing has always been important in the GMP project.  I library
like this that miscomputes this would not be very useful.  Our testsuite
is today mainly used to catch compiler bugs.  I bug in GMP and a bug in
the compiler used for compiling GMP will to the end user look the same.


More information about the gmp-discuss mailing list