* [Caml-list] OCaml and bignums
@ 2004-05-09 21:06 Roberto Bagnara
2004-05-10 4:41 ` Michel Quercia
0 siblings, 1 reply; 10+ messages in thread
From: Roberto Bagnara @ 2004-05-09 21:06 UTC (permalink / raw)
To: caml-list
I have made a web search to understand which kind of
support for bignums is available for OCaml.
I must say that I am rather confused: it is not clear
to me which packages are still maintained and which
are dead, which ones are more widely used, and what
are the relative merits of the various proposals.
I would appreciate it very much if someone could
put me on the right track.
All the best,
Roberto
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] OCaml and bignums
2004-05-09 21:06 [Caml-list] OCaml and bignums Roberto Bagnara
@ 2004-05-10 4:41 ` Michel Quercia
2004-05-10 8:14 ` Roberto Bagnara
0 siblings, 1 reply; 10+ messages in thread
From: Michel Quercia @ 2004-05-10 4:41 UTC (permalink / raw)
To: Roberto Bagnara; +Cc: caml-list
le Sun, 09 May 2004 23:06:52 +0200, Roberto Bagnara <bagnara@cs.unipr.it> écrivit :
>
> I have made a web search to understand which kind of
> support for bignums is available for OCaml.
> I must say that I am rather confused: it is not clear
> to me which packages are still maintained and which
> are dead, which ones are more widely used, and what
> are the relative merits of the various proposals.
> I would appreciate it very much if someone could
> put me on the right track.
> All the best,
To my knowledge, there are 3 bignum packages available for Ocaml :
1. The Bignum library shipped within the standard Ocaml distribution and maintained by the INRIA team. It provides support for big integers and for rationnals.
2. MLGMP : bindings for the GNU Multiprecision library, maintained by David Monniaux (http://www.di.ens.fr/~monniaux/download/mlgmp.tar.gz). It provides support for big integers, for rationnals and for big precision floats.
3. Numerix : another multiprecision library maintained by me (http://pauillac.inria.fr/~quercia/cdrom/bibs/numerix-0.19b.tar.gz). It provides support for big integers only, on x86/Unix platforms.
I have no idea on how widely each package is used.
Relative merits :
-- Bignum is standard and portable. It should be the best choice for "small bigints" (up to a few words long). The algorithms have a quadratic complexity, and are not suitable for hudge bigints.
-- MLGMP has the merits of GMP : portable and very fast (quadratic and subquadratic algorithms depending on the sizes of the inputs). The only drawback is a possibility to exhaust memory in long computations due to the use of two separate GC (the one of Ocaml and the one of GMP).
-- Numerix is my baby, so I'll let other users say if it has merits. Same scheme as GMP (choose a suitable algorithm depending on the sizes of the inputs), without the double-GC problem. The drawback is portability : works on x86/Linux.
--
Michel Quercia
23 rue de Montchapet, 21000 Dijon
http://michel.quercia.free.fr (maths)
http://pauillac.inria.fr/~quercia (informatique)
mailto:michel.quercia@prepas.org
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] OCaml and bignums
2004-05-10 4:41 ` Michel Quercia
@ 2004-05-10 8:14 ` Roberto Bagnara
2004-05-10 8:39 ` Michel Quercia
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Roberto Bagnara @ 2004-05-10 8:14 UTC (permalink / raw)
To: Michel Quercia; +Cc: caml-list
Michel Quercia wrote:
> To my knowledge, there are 3 bignum packages available for Ocaml :
Hi Michel,
thanks for your input.
> 1. The Bignum library shipped within the standard Ocaml distribution and maintained by the INRIA team. It provides support for big integers and for rationnals.
Are there any news concerning the licensing problems?
See http://pauillac.inria.fr/~aschmitt/cwn/2003.10.07.html#12
and http://lists.debian.org/debian-legal/2003/12/msg00240.html
if you don't know what I am talking about.
> 2. MLGMP : bindings for the GNU Multiprecision library, maintained by David Monniaux (http://www.di.ens.fr/~monniaux/download/mlgmp.tar.gz). It provides support for big integers, for rationnals and for big precision floats.
As far as you can tell, is it still maintained? The latest
item in ChangeLog appears to be on November 2002.
> 3. Numerix : another multiprecision library maintained by me (http://pauillac.inria.fr/~quercia/cdrom/bibs/numerix-0.19b.tar.gz). It provides support for big integers only, on x86/Unix platforms.
Do you have any plans to improve portability?
Thanks again,
Roberto
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] OCaml and bignums
2004-05-10 8:14 ` Roberto Bagnara
@ 2004-05-10 8:39 ` Michel Quercia
2004-05-16 20:10 ` David Monniaux
2004-05-10 8:46 ` Jean-Christophe Filliatre
2004-05-10 17:22 ` Remi Vanicat
2 siblings, 1 reply; 10+ messages in thread
From: Michel Quercia @ 2004-05-10 8:39 UTC (permalink / raw)
To: Roberto Bagnara; +Cc: caml-list
le Mon, 10 May 2004 10:14:36 +0200, Roberto Bagnara <bagnara@cs.unipr.it> écrivit :
> [Bignum] Are there any news concerning the licensing problems?
No idea, let's wait for Xavier Leroy's answer.
> [MLGMP] As far as you can tell, is it still maintained? The latest
> item in ChangeLog appears to be on November 2002.
Same, David will surely reply.
> > [Numerix] Do you have any plans to improve portability?
I am presently writing machine code for the Pentium-4 processor with SSE2 instructions. Porting to other processors/architectures is beyond my possibilities (no knowledge, no access to computers, no time).
--
Michel Quercia
23 rue de Montchapet, 21000 Dijon
http://michel.quercia.free.fr (maths)
http://pauillac.inria.fr/~quercia (informatique)
mailto:michel.quercia@prepas.org
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] OCaml and bignums
2004-05-10 8:14 ` Roberto Bagnara
2004-05-10 8:39 ` Michel Quercia
@ 2004-05-10 8:46 ` Jean-Christophe Filliatre
2004-05-10 17:49 ` Roberto Bagnara
2004-05-10 17:22 ` Remi Vanicat
2 siblings, 1 reply; 10+ messages in thread
From: Jean-Christophe Filliatre @ 2004-05-10 8:46 UTC (permalink / raw)
To: Roberto Bagnara; +Cc: Michel Quercia, caml-list
> > 2. MLGMP : bindings for the GNU Multiprecision library, maintained by David Monniaux (http://www.di.ens.fr/~monniaux/download/mlgmp.tar.gz). It provides support for big integers, for rationnals and for big precision floats.
>
> As far as you can tell, is it still maintained? The latest
> item in ChangeLog appears to be on November 2002.
David will probably answer, but you should keep in mind that MLGML is
nothing but a stub code to a C library and thus does not need much
maintenance (the GMP interface is quite stable). I've used MLGMP
several times since Nov 2002 and never had trouble with it.
--
Jean-Christophe
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] OCaml and bignums
2004-05-10 8:14 ` Roberto Bagnara
2004-05-10 8:39 ` Michel Quercia
2004-05-10 8:46 ` Jean-Christophe Filliatre
@ 2004-05-10 17:22 ` Remi Vanicat
2004-05-10 18:29 ` Roberto Bagnara
2 siblings, 1 reply; 10+ messages in thread
From: Remi Vanicat @ 2004-05-10 17:22 UTC (permalink / raw)
To: caml-list
Roberto Bagnara <bagnara@cs.unipr.it> writes:
> Michel Quercia wrote:
>> To my knowledge, there are 3 bignum packages available for Ocaml :
>
> Hi Michel,
>
> thanks for your input.
>
>> 1. The Bignum library shipped within the standard Ocaml
>> distribution and maintained by the INRIA team. It provides support
>> for big integers and for rationnals.
>
> Are there any news concerning the licensing problems?
> See http://pauillac.inria.fr/~aschmitt/cwn/2003.10.07.html#12
> and http://lists.debian.org/debian-legal/2003/12/msg00240.html
> if you don't know what I am talking about.
I believe It have been solved into the cvs version (where a new
implementation of BigNum is made).
[...]
--
Rémi Vanicat
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] OCaml and bignums
2004-05-10 8:46 ` Jean-Christophe Filliatre
@ 2004-05-10 17:49 ` Roberto Bagnara
0 siblings, 0 replies; 10+ messages in thread
From: Roberto Bagnara @ 2004-05-10 17:49 UTC (permalink / raw)
To: Jean-Christophe Filliatre; +Cc: caml-list
Jean-Christophe Filliatre wrote:
> > > 2. MLGMP : bindings for the GNU Multiprecision library, maintained by David Monniaux (http://www.di.ens.fr/~monniaux/download/mlgmp.tar.gz). It provides support for big integers, for rationnals and for big precision floats.
> >
> > As far as you can tell, is it still maintained? The latest
> > item in ChangeLog appears to be on November 2002.
>
> David will probably answer, but you should keep in mind that MLGML is
> nothing but a stub code to a C library and thus does not need much
> maintenance (the GMP interface is quite stable). I've used MLGMP
> several times since Nov 2002 and never had trouble with it.
That is certainly a good point.
Thanks!
Roberto
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] OCaml and bignums
2004-05-10 17:22 ` Remi Vanicat
@ 2004-05-10 18:29 ` Roberto Bagnara
2004-05-11 17:21 ` Christophe TROESTLER
0 siblings, 1 reply; 10+ messages in thread
From: Roberto Bagnara @ 2004-05-10 18:29 UTC (permalink / raw)
To: Remi Vanicat; +Cc: caml-list
Remi Vanicat wrote:
> Roberto Bagnara <bagnara@cs.unipr.it> writes:
>
>>Michel Quercia wrote:
>>>1. The Bignum library shipped within the standard Ocaml
>>>distribution and maintained by the INRIA team. It provides support
>>>for big integers and for rationnals.
>>
>>Are there any news concerning the licensing problems?
>>See http://pauillac.inria.fr/~aschmitt/cwn/2003.10.07.html#12
>>and http://lists.debian.org/debian-legal/2003/12/msg00240.html
>>if you don't know what I am talking about.
>
>
> I believe It have been solved into the cvs version (where a new
> implementation of BigNum is made).
You are right: it is there.
Now the question is when the next release of OCaml will be.
Thanks a lot,
Roberto
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] OCaml and bignums
2004-05-10 18:29 ` Roberto Bagnara
@ 2004-05-11 17:21 ` Christophe TROESTLER
0 siblings, 0 replies; 10+ messages in thread
From: Christophe TROESTLER @ 2004-05-11 17:21 UTC (permalink / raw)
To: bagnara; +Cc: remi.vanicat, caml-list
On Mon, 10 May 2004, Roberto Bagnara <bagnara@cs.unipr.it> wrote:
>
> Remi Vanicat wrote:
> > I believe It have been solved into the cvs version (where a new
> > implementation of BigNum is made).
>
> You are right: it is there.
You do not need to wait for the next release of Ocaml if you use
Debian testing: just 'apt-get install libnums-ocaml'.
ChriS
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] OCaml and bignums
2004-05-10 8:39 ` Michel Quercia
@ 2004-05-16 20:10 ` David Monniaux
0 siblings, 0 replies; 10+ messages in thread
From: David Monniaux @ 2004-05-16 20:10 UTC (permalink / raw)
To: Michel Quercia; +Cc: Roberto Bagnara, caml-list
On Mon, 2004-05-10 at 10:39, Michel Quercia wrote:
> > [MLGMP] As far as you can tell, is it still maintained? The latest
> > item in ChangeLog appears to be on November 2002.
> Same, David will surely reply.
Well, the library *is* maintained. I haven't quite kept up with the
newest stuff in GMP (fancy operations), but I can add it if it's needed.
Sometimes GMP breaks API compatibility, so I adapt to the newest
versions.
Some people have noted poor performance with MLGMP memory-wise. Such
problems are very difficult to fix - they have to do with the GC speed
in OCaml etc... I've not been able to recreate the problems, so I
suspect that I would have to be given some actual source code exhibiting
the problems in question.
I suspect that it has to do with the fact that MLGMP provides a
functional interface to GMP, while GMP was written with in-place
modification in mind. That's why there exist for integer values the Z2
module, which provides for in-place modification. I may extend this to
rational and floats if needed.
The latest version compiles and runs at least on GMP-4.1.2 on x86 and
AMD64.
-- D.M.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-05-16 20:10 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-09 21:06 [Caml-list] OCaml and bignums Roberto Bagnara
2004-05-10 4:41 ` Michel Quercia
2004-05-10 8:14 ` Roberto Bagnara
2004-05-10 8:39 ` Michel Quercia
2004-05-16 20:10 ` David Monniaux
2004-05-10 8:46 ` Jean-Christophe Filliatre
2004-05-10 17:49 ` Roberto Bagnara
2004-05-10 17:22 ` Remi Vanicat
2004-05-10 18:29 ` Roberto Bagnara
2004-05-11 17:21 ` Christophe TROESTLER
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).