Bignums in Haskell

Jerzy Karczmarczuk karczma at
Tue Jun 21 08:06:28 EDT 2005

Serge D. Mechveliani wrote:

>Efficient arithmetic algorithms for large numbers is a matter of 
>mathematics. Such algorithms, and libraries, are developed by the 
>best experts in computational mathematics. Maybe, GMP is such.
There isn't too much mathematics in... everything is known
for years, published in books: Knuth, etc.

The question is efficient implementation and interfacing,
and this is not a mathematical issue. Algorithmic, yes.
Karatsuba, etc....

GMP has a venerable history, developed for years, well
debugged etc. Used in other language processors, e.g.
in some implementations of Scheme. The CAS named Pari
apparently has its own bignum library, though.

There are places where libraries are badly implemented
as well. For example the rationals in the standard library
of Haskell (this remark may be obsolete. In fact I HOPE it
is obsolete...)

Jerzy Karczmarczuk

More information about the Glasgow-haskell-users mailing list