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 WAA18675; Fri, 2 Apr 2004 22:03:40 +0200 (MET DST) 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 WAA20364 for ; Fri, 2 Apr 2004 22:03:39 +0200 (MET DST) Received: from mail.hiwaay.net (bee.hiwaay.net [216.180.54.11]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i32K4Ojq029436 for ; Fri, 2 Apr 2004 22:04:25 +0200 Received: from bee.hiwaay.net (bee.hiwaay.net [216.180.54.11]) by mail.hiwaay.net (8.12.11/8.12.11) with ESMTP id i32K3Yad1105644; Fri, 2 Apr 2004 14:03:35 -0600 (CST) Received: from bee.hiwaay.net (gbacon@localhost) by bee.hiwaay.net (8.12.11/8.12.11/DefSubmit) with ESMTP id i32K3YZu1106590; Fri, 2 Apr 2004 14:03:34 -0600 (CST) Message-Id: <200404022003.i32K3YZu1106590@bee.hiwaay.net> To: "Zeno Lee" cc: caml-list@inria.fr Reply-To: gbacon@hiwaay.net Organization: Eric Conspiracy Secret Labs X-Eric-Conspiracy: There is no conspiracy. X-Face: "7sfK9d*!trQg^>swxP}M|R|<7$tFtlm|Z(4M$i`?}l87xigz \37|mQUBi/ct#>=H,&(V!A6=jnjOfA#.0Q@jF1t~Eue)5=zFI Subject: Re: [Caml-list] weird floating poing behavior on windows In-Reply-To: Message from "Zeno Lee" of "Fri, 02 Apr 2004 14:39:43 EST." <008101c418ea$3ff43780$6401a8c0@xp> Date: Fri, 02 Apr 2004 14:03:33 -0600 From: Greg Bacon 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; caml-list:01 gbacon:01 hiwaay:01 zeno:01 3.07:01 0.26:99 ocaml:01 caml:01 arithmetic:01 arithmetic:01 writes:01 float:02 float:02 behavior:03 lee:94 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 33 In message <008101c418ea$3ff43780$6401a8c0@xp>, "Zeno Lee" writes: : Can anyone tell me what's going on here? Is this a known issue on : windows? : : C:\>ocaml : Objective Caml version 3.07+2 : # 0.2 *. 0.26;; : - : float = 0.052000000000000005 : # 0.8 *. 0.7 *. 0.8;; : - : float = 0.44799999999999995 It's a known issue on digital computers, i.e., with finite-precision arithmetic. See "What Every Computer Scientist Should Know About Floating-Point Arithmetic": http://www.validlab.com/goldberg/paper.pdf Greg ------------------- 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