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 4BAB9BBAF for ; Sun, 22 Jun 2008 22:45:58 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgABACNXXkjRVYC5c2dsb2JhbACSKUMBDAMEBAkPBZZ3gzM X-IronPort-AV: E=Sophos;i="4.27,686,1204498800"; d="scan'208";a="14373170" Received: from fk-out-0910.google.com ([209.85.128.185]) by mail3-smtp-sop.national.inria.fr with ESMTP; 22 Jun 2008 22:45:57 +0200 Received: by fk-out-0910.google.com with SMTP id k31so2082536fkk.11 for ; Sun, 22 Jun 2008 13:45:57 -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:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ibH5C+wdfrlb3kQIyYn5aOqs0gdQ7neB6Bd/O0ngzrQ=; b=aBvwE50x5HfTflzEyUJLzHsJ8gxRKQaXt8nRVY3XG9xINQnywS+PCLbnGwavwvmOAt psf7pAeP6xjC2fxeidOMdgqQ1R0Zre0GMx6BI77Xae5r+e/42jIDz2ftd78KJBFJANHe +WWA79uW+oIoLyg/AGI3djsMIVLGjc2QLkY6E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=VamdJ1Hc6WtcM8VNYLKdPEyFITCZuxk/J1YJMFSUKM8sKo5nbbDMShBeeF1sT7x73I nMa6EBqopBlz8jXcW045xxw2bw2syzMQxn7NJWzu+8CN2XTWnJn/OgK24N6/CYFsjFXo 13KmGv/K1PL3HlMKP1nGCUwSnm7qmhPsfg3es= Received: by 10.78.167.12 with SMTP id p12mr2404705hue.89.1214167556922; Sun, 22 Jun 2008 13:45:56 -0700 (PDT) Received: by 10.78.47.4 with HTTP; Sun, 22 Jun 2008 13:45:56 -0700 (PDT) Message-ID: <4b5157c30806221345p9be5daeqc65b3f6cfb3219b3@mail.gmail.com> Date: Sun, 22 Jun 2008 22:45:56 +0200 From: "Paolo Donadeo" To: "caml-list caml-list" Subject: Re: [Caml-list] Strange behaviour of string_of_float In-Reply-To: <20080622195831.GA22384@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4b5157c30806220956p164d8346i3e832bc8b8666306@mail.gmail.com> <20080622195831.GA22384@annexia.org> X-Spam: no; 0.00; serialize:01 deserialize:01 ocaml:01 ocaml:01 caml-list:01 behaviour:01 string:02 string:02 numerical:03 float:03 float:03 problem:05 ascii:06 suggested:07 function:08 I know what a float number is from my numerical analysis course :-). In any case, what is the suggested way to serialize/deserialize a float number in OCaml? The Sexplib, for example, suffers the same problem of the string_of_float function:. My intent is to extract an ASCII representation of an OCaml float value so that it can be used to recreate *exactly* the same value, at least on the same architecture. -- Paolo ~ ~ :wq