Bignums in Haskell
simonmar at microsoft.com
Tue Jun 21 08:12:22 EDT 2005
On 21 June 2005 12:47, Ketil Malde wrote:
> Marco Morazan <morazanm at gmail.com> writes:
>> Do any of you have insight into why GHC uses GMP as opposed to
>> another library for arbitrary precision numbers?
> Did you have any particular other library in mind? I'm not too
> well-versed in this, but I think GMP is fairly efficient, well tested
> and portable. So why not?
Right - that's three reasons to use it. Some reasons *not* to use it
are: it has an awkward license, it's big, it needs updating, and we run
into problems when the Haskell program wants to use GMP itself via the
FFI (it's possible by essentially renaming everything in our local copy
of GMP so it doesn't conflict, but we haven't done that).
There are other good bignum libraries out there: the one that comes with
OpenSSL springs to mind.
More information about the Glasgow-haskell-users