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 HAA15098; Fri, 14 Nov 2003 07:04:05 +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 HAA15963 for ; Fri, 14 Nov 2003 07:04:04 +0100 (MET) Received: from post.bourget.univ-savoie.fr (post.bourget.univ-savoie.fr [193.48.120.73]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAE643107637 for ; Fri, 14 Nov 2003 07:04:03 +0100 (MET) Received: from univ-savoie.fr (d85.lama.univ-savoie.fr [193.48.123.85]) by post.bourget.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id hAE64VYJ026515 for ; Fri, 14 Nov 2003 07:04:31 +0100 Message-ID: <3FB47075.5010505@univ-savoie.fr> Date: Fri, 14 Nov 2003 07:04:37 +0100 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030428 X-Accept-Language: en-us, en MIME-Version: 1.0 CC: caml-list@inria.fr Subject: [Caml-list] float_of_num References: <3FB2CFAF.2020803@1969.ws> <200311122029.02172.oleg_trott@columbia.edu> In-Reply-To: <200311122029.02172.oleg_trott@columbia.edu> X-Enigmail-Version: 0.73.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; raffalli:01 raffalli:01 univ-savoie:01 floats:01 rounding:01 mli:01 savoie:01 chablais:01 73376:01 univ-savoie:01 lama:01 enigmail:01 mutt:01 christophe:01 christophe:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk What is the property of float_of_num ? How is it computed ? Given x : num, I need to find two floats a,b such that a <= x <= b. Changing the rounding mode and calling float_of_num twice doesnot work (this was likely, because I do not know the operation done inside float_of_num) If I know that c = float_of_num is the nearest float, then I can go for a = x-e and b = x+e with e = x*1e-n with n well chosen. I think there should be three float_of_num in num.mli: float_of_num (nearest) float_of_num_above(nearest above) float_of_num_bellow (nearest bellow) -- Christophe Raffalli Universite' de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex te'l: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature --------------------------------------------- ------------------- 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