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 discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 1998DBC69 for ; Tue, 26 Jun 2007 22:38:32 +0200 (CEST) Received: from smtp.syd.people.net.au (smtp.syd.people.net.au [218.214.225.98]) by discorde.inria.fr (8.13.6/8.13.6) with SMTP id l5QKcSiT003274 for ; Tue, 26 Jun 2007 22:38:30 +0200 Received: (qmail 4541 invoked from network); 26 Jun 2007 20:38:27 -0000 Received: from unknown (HELO hendrix.mega-nerd.net) (218.214.64.136) by smtp.syd.people.net.au with SMTP; 26 Jun 2007 20:38:27 -0000 Received: from hendrix (hendrix [192.168.200.99]) by hendrix.mega-nerd.net (Postfix) with SMTP id 7B2A82FED4 for ; Wed, 27 Jun 2007 06:38:26 +1000 (EST) Date: Wed, 27 Jun 2007 06:38:26 +1000 From: Erik de Castro Lopo To: caml-list@inria.fr Subject: Re: [Caml-list] Float literals Message-Id: <20070627063826.e6b3ddbd.mle+ocaml@mega-nerd.com> In-Reply-To: <46817245.4020305@gmail.com> References: <46817245.4020305@gmail.com> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.11; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 46817944.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 literals:01 literals:01 predictable:01 edgar:98 wrote:01 integer:01 caml-list:01 match:02 blank:97 float:03 float:03 languages:03 erik:04 erik:04 Edgar Friendly wrote: > But it doesn't match some expectations I have about float literals. The > following are all float literals: > > 3.14 (* no problem here *) > 6.022E23 (* no problem here *) > 9.109e-31 (* still no problem *) > 2. (* a float - blank decimal part *) > 1e6 (* an integer? no, a float without a . Problem.*) > 13 (* valid as a float, according to the above definition *) > > Does anyone else find the last two cases kind of odd? I do not find the second last case odd (all languages I have used consider that a float), but I do for the last one. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "Neither noise nor information is predictable." -- Ray Kurzweil