From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 68BE0BC68 for ; Sat, 30 Sep 2006 20:26:03 +0200 (CEST) Received: from smtp.andrew.cmu.edu (smtp.andrew.cmu.edu [128.2.10.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k8UIQ1pt010520 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 30 Sep 2006 20:26:03 +0200 Received: from [192.168.1.43] (pool-72-77-98-109.pitbpa.east.verizon.net [72.77.98.109]) (user=seanmcl mech=PLAIN (0 bits)) by smtp.andrew.cmu.edu (8.13.6/8.13.6) with ESMTP id k8UIPwtS014668 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sat, 30 Sep 2006 14:25:58 -0400 Mime-Version: 1.0 (Apple Message framework v752.2) Content-Transfer-Encoding: 7bit Message-Id: <89957A27-4B6A-4FCF-A425-1468ECFA8B62@cmu.edu> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: caml-list@inria.fr From: Sean McLaughlin Subject: float rounding Date: Sat, 30 Sep 2006 14:25:56 -0400 X-Mailer: Apple Mail (2.752.2) X-Scanned-By: MIMEDefang 2.57 on 128.2.10.82 X-Miltered: at concorde with ID 451EB6B9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; rounding:01 ocaml:01 ocaml:01 parser:01 compiler:01 compiler:01 constants:01 arithmetic:01 float:03 float:03 mathematical:07 constant:08 constant:08 i'm:08 curious:09 Hello, I'm using Ocaml for an interval arithmetic application. I"m curious about what the Ocaml parser/compiler does to float constants. May I assume that for any constant I enter, eg. 3.1415... (for N digits of pi), that the compiler will give me a closest machine representable number? i.e., if I bound a constant by the previous and next floating point value to that given me by the compiler, will it always be the case that my original (mathematical) constant lies in that interval? Thanks, Sean