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.2 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 A4041BBAF for ; Sun, 22 Jun 2008 22:33:03 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AssAAKxTXkjRVYTxdGdsb2JhbACSKUMBDAMEBgcPBZZ2gzQ X-IronPort-AV: E=Sophos;i="4.27,686,1204498800"; d="scan'208";a="14372879" Received: from an-out-0708.google.com ([209.85.132.241]) by mail3-smtp-sop.national.inria.fr with ESMTP; 22 Jun 2008 22:33:02 +0200 Received: by an-out-0708.google.com with SMTP id b2so443727ana.102 for ; Sun, 22 Jun 2008 13:33:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer:sender; bh=Mx6lgZoHG08z/UM1NHIS+8/zC2Sq+M6CjQjGlfl7T9I=; b=KTXxSHAOkVNoMIWDWzyg3WjPCnX5HbvJ9Jf1LxLz/M3q5Ersz8pHNQAMmfb2UlvFjB rmQY3NAQqa6CFPWW0WGITv/VaUwlDzNvo9vfrYTezPl2QrznxAxxCq3gl4qgqI4OIueN q9ncoQWTjGI1qPEn3aOPCzLClLWeA5cY+QA/8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer:sender; b=ar8PCH9X9VLkMMEDvK5TIQuI9Y2yUi1lyrXYovY8SNjCZopfr+CsD9fxjL3MS0wNnA cVw+R3I/Jr/J1u0WCJ9TKinR69SsQogXt3Ru72qqbYzxxR6XKxa577o7wiIgVeJNuaDy uHrQEz3d1UI5ZDETgfKbhv1Cv4FNFz+T6oqxE= Received: by 10.100.42.4 with SMTP id p4mr11468169anp.76.1214166781556; Sun, 22 Jun 2008 13:33:01 -0700 (PDT) Received: from ?10.0.1.2? ( [85.2.16.229]) by mx.google.com with ESMTPS id d34sm10599318and.3.2008.06.22.13.33.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Jun 2008 13:33:01 -0700 (PDT) Message-Id: From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= To: caml-list caml-list In-Reply-To: <4b5157c30806220956p164d8346i3e832bc8b8666306@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: [Caml-list] Strange behaviour of string_of_float Date: Sun, 22 Jun 2008 22:32:32 +0200 References: <4b5157c30806220956p164d8346i3e832bc8b8666306@mail.gmail.com> X-Mailer: Apple Mail (2.924) Sender: =?UTF-8?B?RGFuaWVsIELDvG56bGk=?= X-Spam: no; 0.00; bunzli:01 buenzli:01 serialize:01 integers:01 integers:01 deserialize:01 caml-list:01 int:01 int:01 behaviour:01 binary:02 string:02 float:03 float:03 daniel:04 Richard gave you the reason. If you can serialize to binary, you can acheive what you want by serializing the 64 bits integers you get with Int64.bits_of_float and applying Int64.float_of_bits to the integers you deserialize. Best, Daniel