
Hello all, Do any of you have insight into why GHC uses GMP as opposed to another library for arbitrary precision numbers? Also, why would bignums not be directly implemented for the GHC or other implementations of Haskell? Best wishes, Marco

Marco Morazan
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?
Also, why would bignums not be directly implemented for the GHC or other implementations of Haskell?
I guess it shouldn't be too hard, but again, when somebody else already has done the work... -k -- If I haven't seen further, it is by standing in the footprints of giants

On Tue, Jun 21, 2005 at 07:37:08AM -0400, Marco Morazan wrote:
Hello all,
Do any of you have insight into why GHC uses GMP as opposed to another library for arbitrary precision numbers? Also, why would bignums not be directly implemented for the GHC or other implementations of Haskell?
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. Regards, ----------------- Serge Mechveliani mechvel@botik.ru

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
participants (4)
-
Jerzy Karczmarczuk
-
Ketil Malde
-
Marco Morazan
-
Serge D. Mechveliani