From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA22884; Tue, 3 Dec 2002 08:40:23 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA22576 for ; Tue, 3 Dec 2002 08:40:22 +0100 (MET) Received: from riker.skynet.be (riker.skynet.be [195.238.3.89]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gB37eL117054 for ; Tue, 3 Dec 2002 08:40:21 +0100 (MET) Received: from janxp (232.137-136-217.adsl.skynet.be [217.136.137.232]) by riker.skynet.be (8.11.6/8.11.6/Skynet-OUT-2.20) with ESMTP id gB37eKI24435 for ; Tue, 3 Dec 2002 08:40:20 +0100 (MET) (envelope-from ) Message-ID: <005801c29a9f$3f41f540$b48afea9@janxp> From: "Scott J." To: "caml-list" Subject: [Caml-list] arbitrarily large integers Date: Tue, 3 Dec 2002 08:40:26 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0055_01C29AA7.A0D58940" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is a multi-part message in MIME format. ------=_NextPart_000_0055_01C29AA7.A0D58940 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, is it possible to implement in OCamel arbitrary large integers as in = Dolphin smalltalk e.g. where e.g.=20 factorial 10000 is evaluatedvery fast. thanks Scott ------=_NextPart_000_0055_01C29AA7.A0D58940 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi, is it possible to implement in = OCamel arbitrary=20 large integers as in Dolphin smalltalk e.g. where e.g.
factorial 10000 is = evaluatedvery=20 fast.
 
thanks
 
Scott
------=_NextPart_000_0055_01C29AA7.A0D58940-- ------------------- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA31521; Tue, 3 Dec 2002 14:09:00 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA31872 for ; Tue, 3 Dec 2002 14:08:59 +0100 (MET) Received: from lri.lri.fr (lri.lri.fr [129.175.15.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gB3D8xX27306 for ; Tue, 3 Dec 2002 14:08:59 +0100 (MET) Received: from pc8-123 (mail@pc8-123 [129.175.8.123]) by lri.lri.fr (8.11.6/jtpda-5.3.2) with ESMTP id gB3D0GR21933 ; Tue, 3 Dec 2002 14:00:17 +0100 (MET) Received: from filliatr by pc8-123 with local (Exim 3.35 #1 (Debian)) id 18JCeu-0006KV-00; Tue, 03 Dec 2002 14:00:16 +0100 From: Jean-Christophe Filliatre MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15852.43744.262829.342309@lri.lri.fr> Date: Tue, 3 Dec 2002 14:00:16 +0100 To: "Scott J." Cc: "caml-list" Subject: Re: [Caml-list] arbitrarily large integers In-Reply-To: <005801c29a9f$3f41f540$b48afea9@janxp> References: <005801c29a9f$3f41f540$b48afea9@janxp> X-Mailer: VM 6.93 under Emacs 20.7.2 Reply-To: Jean-Christophe.Filliatre@lri.fr (Jean-Christophe Filliatre) X-MailScanner: Found to be clean Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Scott J. writes: > Hi, is it possible to implement in OCamel arbitrary large integers as in Dolphin smalltalk e.g. where e.g. > factorial 10000 is evaluatedvery fast. The Num library delivered with ocaml implements arbitrary large naturals, integers and rationals. See http://caml.inria.fr/ocaml/htmlman/manual036.html There are also - an interface of the GNU MP library, by David Monniaux, at http://www.di.ens.fr/~monniaux/download/mlgmp-20021123.tar.gz - The Numerix library by Michel Quercia, at http://pauillac.inria.fr/~quercia/ Hope this helps, -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA10846; Tue, 3 Dec 2002 20:16:12 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA10835 for caml-list@pauillac.inria.fr; Tue, 3 Dec 2002 20:16:11 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA26199 for ; Tue, 3 Dec 2002 10:47:23 +0100 (MET) Received: from epita.fr (hermes.epita.fr [163.5.255.10]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gB39lMX17021 for ; Tue, 3 Dec 2002 10:47:23 +0100 (MET) Received: from goa.lrde.epita.fr (mail@goa.lrde.epita.fr [10.223.13.2]) by epita.fr id gB39lIe18844 for EPITA Paris France Tue, 3 Dec 2002 10:47:18 +0100 (MET) Received: from sandrock.lrde.epita.fr ([10.223.13.45] helo=sandrock) by goa.lrde.epita.fr with esmtp (Exim 3.35 #1 (Debian)) id 18J9eM-0005Ox-00 for ; Tue, 03 Dec 2002 10:47:30 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Yann =?iso-8859-1?q?R=E9gis-Gianas?= (by way of Yann =?iso-8859-1?q?R=E9gis-Gianas?= ) Organization: LRDE Subject: Re: [Caml-list] arbitrarily large integers Date: Tue, 3 Dec 2002 10:47:09 +0100 User-Agent: KMail/1.4.3 To: caml-list@inria.fr MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200212031047.09974.yann@lrde.epita.fr> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Le Mardi 3 D=E9cembre 2002 08:40, Scott J. a =E9crit : > Hi, =09Hello, > is it possible to implement in OCamel arbitrary large integers as > in Dolphin smalltalk e.g. where e.g. factorial 10000 is evaluated > very fast =09Yes, it's possible : just use the nums library (documented in the documentation at http://caml.inria.fr/ocaml/htmlman/manual036.html). =09An example : #load "nums.cma";; (* directly with Big_int ... *) open Big_int let fact n =3D let rec fact_ acu p =3D if p =3D zero_big_int then acu else fact_ (mult_big_int acu p) (sub_big_int p unit_big_int) in fact_ unit_big_int n;; string_of_big_int (fact (big_int_of_int 10000));; (* more convenient with Num. *) open Num let n_ =3D num_of_int let big_fact n =3D let rec fact_ acu p =3D if p =3D n_ 0 then acu else fact_ (acu */ p) (p -/ (n_ 1)) in fact_ (n_ 1) n;; string_of_num (big_fact (n_ 10000)) -- Yann Regis-Gianas ------------------- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA10886; Tue, 3 Dec 2002 20:20:14 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA10974 for caml-list@pauillac.inria.fr; Tue, 3 Dec 2002 20:20:14 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA09243 for ; Tue, 3 Dec 2002 19:23:48 +0100 (MET) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gB3INlX16384 for ; Tue, 3 Dec 2002 19:23:47 +0100 (MET) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id gB3INkB09103 ; Tue, 3 Dec 2002 19:23:46 +0100 (CET) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.12.3/jb-1.1) id gB3INjSC006816 ; Tue, 3 Dec 2002 19:23:45 +0100 (MET) X-Authentication-Warning: clipper.ens.fr: frisch owned process doing -bs Date: Tue, 3 Dec 2002 19:23:45 +0100 (MET) From: Alain.Frisch@ens.fr X-X-Sender: frisch@clipper.ens.fr Reply-To: Alain.Frisch@ens.fr To: "Scott J." cc: caml-list Subject: Re: [Caml-list] arbitrarily large integers In-Reply-To: <005801c29a9f$3f41f540$b48afea9@janxp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-milter (http://amavis.org/) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 3 Dec 2002, Scott J. wrote: > Hi, is it possible to implement in OCamel arbitrary large integers as in Dolphin smalltalk e.g. where e.g. > factorial 10000 is evaluatedvery fast. Funny that you mention it, my CDuce prototype use OCaml Nums library to implement integers, and fact 10000 is one of the examples: http://www.cduce.org/cgi-bin/cduce?example=integers I have no experience with other large integers libraries for OCaml... -- Alain ------------------- 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