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 QAA28266; Sat, 27 Mar 2004 16:35:52 +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 QAA27531 for ; Sat, 27 Mar 2004 16:35:52 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from localhost (rennes-1-62-147-97-49.dial.proxad.net [62.147.97.49]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i2RFaTKW003914 for ; Sat, 27 Mar 2004 16:36:30 +0100 Received: from baruchel by localhost with local (Exim 2.05 #1 (Debian)) id 1B7FeO-0005Gf-00; Sat, 27 Mar 2004 16:23:08 +0100 Date: Sat, 27 Mar 2004 16:23:08 +0100 From: Thomas Baruchel To: caml-list@pauillac.inria.fr Subject: [Caml-list] My module Contfrac Message-ID: <20040327162308.B20238@localhost> Reply-To: Thomas Baruchel Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; sourceforge:01 creal:01 surreal:01 atan:01 empirical:01 creal:01 undocumented:01 mli:01 cordially:99 caml:01 arithmetic:01 conversions:02 droit:97 arbitrary:02 objects:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Keywords: X-UID: 389 Brest, le samedi 27 mars Hi, see at http://contfrac.sourceforge.net (unfortunately, I don't know how to use CVS, so you will have to download the 9ko compressed file as a whole). It performs exact arithmetic on real numbers by using continued fraction. The purpose is similar to creal and surreal, but algorithms are deeply different. I implement Gosper's algorithm for computing operations between continued fractions. Many functions are provided, including support for algebraic numbers of arbitrary degree (of course, exp, log, tan, sin, cos, atan, sqrt, etc. are included). Though my initial purpose was not to implement an efficient and quick module (I was rather interested by the theoretical aspects of the thing), some very quick and empirical comparisons with CREAL make me think that my module is quicker for the superficial tests I tried. This is an alpha release; it is undocumented, except that the .mli file is understandable and commented. Some little changes since the announce on fr.comp.lang.caml: - licence now is MIT (rather than GNU) - a few functions added (mainly conversion functions: conversions from/to continued fractions can be done with many types (including now streams, objects having a "next" method, lists, etc.) - a support for converting continued fractions to convergents has been added (a ratio_from_cf function, and a class for building successive convergents). Cordially, -- « nous devons agir comme si la chose qui peut-être ne sera pas devait être » (Kant, Métaphysique des moeurs, doctrine du droit, II conclusion) Thomas Baruchel ------------------- 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