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.3 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 49FC2BBAF for ; Mon, 23 Jun 2008 10:55:42 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhABADwCX0jRVYC5c2dsb2JhbACSKEMBDAMEBAkPBZlFg1s X-IronPort-AV: E=Sophos;i="4.27,689,1204498800"; d="scan'208";a="14390072" Received: from fk-out-0910.google.com ([209.85.128.185]) by mail3-smtp-sop.national.inria.fr with ESMTP; 23 Jun 2008 10:55:41 +0200 Received: by fk-out-0910.google.com with SMTP id k31so2278595fkk.11 for ; Mon, 23 Jun 2008 01:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=sHBm2u9klPM3TsLZB/FFxEH/pSO8ChXTQjhHKSIVEPc=; b=S0/8dRtFuCU2yVDYuXe10jrs3UyFUVWhAnbnUw/fJ+hnXvOkqSopyRtEwTEdimc/w2 JPFsODHI3dumjus/rRuptQgfv53y09pARfya8pnec6SgL/svvA0H3tetH4aHlytCZRSV FEl9rnuhBRvMlICToYVc2xEUK/zCRpitb7bVo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=GwkocTptBRLrhDRCAoeOcUeCkBir+aXXuKAZCYufBRk5SS40T8F6DkSIEy9qxYM55Y dHwq64O9h4Ylz2sHaI4x34fja2wrd7A/Tv6wyuriSzoUc5fqa8D2octhz2gdeKqbeR2/ nIkHmPxJav9hARunqveunJG0V34013LdS7Z9c= Received: by 10.78.118.5 with SMTP id q5mr2587269huc.116.1214211340478; Mon, 23 Jun 2008 01:55:40 -0700 (PDT) Received: by 10.78.40.8 with HTTP; Mon, 23 Jun 2008 01:55:40 -0700 (PDT) Message-ID: <95513600806230155r4283b8k84d5b94f0f0dc3c5@mail.gmail.com> Date: Mon, 23 Jun 2008 10:55:40 +0200 From: "Olivier Andrieu" Sender: oandrieu@gmail.com To: "David Allsopp" Subject: Re: [Caml-list] Strange behaviour of string_of_float Cc: "caml-list caml-list" In-Reply-To: <6975022428ED405199F4BC4DE14D970B@countertenor> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4b5157c30806220956p164d8346i3e832bc8b8666306@mail.gmail.com> <4b5157c30806221350xe608e08v1ed2d9a1e6b9d744@mail.gmail.com> <6975022428ED405199F4BC4DE14D970B@countertenor> X-Google-Sender-Auth: 73dec4c2b0b0f2ad X-Spam: no; 0.00; andrieu:01 oandrieu:01 23,:98 wrote:01 caml-list:01 nerim:01 behaviour:01 string:02 string:02 float:03 float:03 correctly:04 anyway:05 nan:06 nan:06 On Mon, Jun 23, 2008 at 10:45, David Allsopp wrote: > All that said, the values given by > string_of_float cannot always be fed back to float_of_string anyway (e.g. > float_of_string (string_of_float nan)) euh, why do you say that ? it does : # float_of_string (string_of_float nan) ;; - : float = nan float_of_string is basically strtod which should correctly handle nan and inf. -- Olivier