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 LAA09383; Fri, 22 Oct 2004 11:26:14 +0200 (MET DST) 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 LAA10029 for ; Fri, 22 Oct 2004 11:26:13 +0200 (MET DST) Received: from interferon.mpi-sb.mpg.de (tmk-site.org [139.19.1.1]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9M9QCa9016889 for ; Fri, 22 Oct 2004 11:26:13 +0200 Received: from amavis by interferon.mpi-sb.mpg.de with scanned-ok (Exim 3.36 #1 (Debian)) id 1CKvga-0002S8-00 for ; Fri, 22 Oct 2004 11:26:12 +0200 Received: from mpino2303.ag2.mpi-sb.mpg.de ([139.19.24.75]) by interferon.mpi-sb.mpg.de with esmtp (Exim 3.36 #1 (Debian)) id 1CKvgY-0002RP-00; Fri, 22 Oct 2004 11:26:10 +0200 Subject: [Caml-list] floating point input/conversion From: Stefan Ratschan To: caml-list@inria.fr Content-Type: text/plain Message-Id: <1098437140.3079.21.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 22 Oct 2004 11:25:40 +0200 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS perl-11 X-Miltered: at concorde with ID 4178D235.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; rounding:01 ocaml:01 vague:02 float:02 float:02 string:03 string:03 account:96 functions:05 functions:05 mode:07 manual:07 stefan:10 stefan:10 wrong:12 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk For the functions float_of_string and read_float the OCaml manual is very vague: "Convert the given string to a float". In fact, this sentence is wrong. For example, the number 0.1 does not have a floating point representation, only approximations to it. So what is the exact specification of these functions? Which number is taken if the given string does not have a floating point representation? The nearest one? The nearest one up to 2ulps? Is the current rounding mode taken into account? Stefan Ratschan ------------------- 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