From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 073927F98F for ; Tue, 1 Aug 2017 17:49:26 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=thiemann@informatik.uni-freiburg.de; spf=None smtp.mailfrom=thiemann@informatik.uni-freiburg.de; spf=None smtp.helo=postmaster@mx1.informatik.uni-freiburg.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of thiemann@informatik.uni-freiburg.de) identity=pra; client-ip=132.230.150.4; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="thiemann@informatik.uni-freiburg.de"; x-sender="thiemann@informatik.uni-freiburg.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of thiemann@informatik.uni-freiburg.de) identity=mailfrom; client-ip=132.230.150.4; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="thiemann@informatik.uni-freiburg.de"; x-sender="thiemann@informatik.uni-freiburg.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mx1.informatik.uni-freiburg.de) identity=helo; client-ip=132.230.150.4; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="thiemann@informatik.uni-freiburg.de"; x-sender="postmaster@mx1.informatik.uni-freiburg.de"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AT1kPXBW7ctlbHT7u1Rw5k78e/3TV8LGtZVwlr6E/?= =?us-ascii?q?grcLSJyIuqrYbReDt8tkgFKBZ4jH8fUM07OQ6PGwHzRYqb+681k6OKRWUBEEjc?= =?us-ascii?q?hE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRo?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4AuhmI0KBbHXwmNgBFGMKshM6TOzrk12CTSVeZ22yXq?= =?us-ascii?q?I5/jE0EpiqDYbFRoC3gbyOxj23HpNMZjMONlfZW0zveoqYQfAULGq3I8RhmzEA?= =?us-ascii?q?H/D1To4q1RijsEnhzLdoMvDT4gUZs47u0J5+4OiFxj8o8jkhN8mB3nvFc2F1k2?= =?us-ascii?q?YBQTl+iLx/oEF4w1GF+al+jftCENVP5vAPTwE7cJDGwu1wFsr9HA7MKITaAG26?= =?us-ascii?q?S8mrVGliBuk6xMUDNgMkQ42v?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CVAQC4ooBZfQSW5oRdFgQBAQEBAgEBA?= =?us-ascii?q?QEIAQEBARUBAQEBAgEBAQEIAQEBAYQTbSeeC4FsmB8shRsChCVDFAEBAQEBAQE?= =?us-ascii?q?BAQEBEgEBCxQIV4IzJAGCQAEBAQEBAQEjHQEBNwEECwsYAgImAgJXBhOKJwgQr?= =?us-ascii?q?iJrgiaDCAEBBYhBAQEBAQEBBAEBAQEBAQEZAwWBC4IdggKDLSuCe4RzgxMwgjG?= =?us-ascii?q?ffIEChk6YCocQkSaEUzaBK1MlFEkSAYJxggQPHIFpdAGKLgEBAQ?= X-IPAS-Result: =?us-ascii?q?A0CVAQC4ooBZfQSW5oRdFgQBAQEBAgEBAQEIAQEBARUBAQE?= =?us-ascii?q?BAgEBAQEIAQEBAYQTbSeeC4FsmB8shRsChCVDFAEBAQEBAQEBAQEBEgEBCxQIV?= =?us-ascii?q?4IzJAGCQAEBAQEBAQEjHQEBNwEECwsYAgImAgJXBhOKJwgQriJrgiaDCAEBBYh?= =?us-ascii?q?BAQEBAQEBBAEBAQEBAQEZAwWBC4IdggKDLSuCe4RzgxMwgjGffIEChk6YCocQk?= =?us-ascii?q?SaEUzaBK1MlFEkSAYJxggQPHIFpdAGKLgEBAQ?= X-IronPort-AV: E=Sophos;i="5.41,306,1498514400"; d="scan'208";a="285740821" Received: from mx1.informatik.uni-freiburg.de ([132.230.150.4]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2017 17:49:02 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=informatik.uni-freiburg.de; s=mx1602; h=To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/2pTVs3YEAv+k6Kr5clQGPh+zH0mg83SbWmjqR8omHc=; b=TgeQQmCagYVpR722EdAjcjkMA n9zTclfYfLxCYTKBHfsxRsgwMfZ0olovJUkx7icdR4TOYbe7U5AXBW13oObwumJ8qNjsA0LNH8+Ud aKx6r2HGvzt0PgBv6ls/XlpaebSe6nniQHDL6shxNowSjkxrPFPmug1sThrjB54b42p2o=; Received: from c166198.informatik.uni-freiburg.de ([132.230.166.198]) by smtp1.informatik.uni-freiburg.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1dcZPn-0000TW-Pk; Tue, 01 Aug 2017 17:48:59 +0200 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) From: Peter Thiemann In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A175B282955@IRSMSX102.ger.corp.intel.com> Date: Tue, 1 Aug 2017 17:48:52 +0200 Cc: Peter Thiemann , =?utf-8?Q?Daniel_B=C3=BCnzli?= , Viet Le , "caml-list@inria.fr" Content-Transfer-Encoding: quoted-printable Message-Id: <797F4C7C-A647-424D-8F1B-120B93A723F5@informatik.uni-freiburg.de> References: <0F7D3B1B3C4B894D824F5B822E3E5A175B282955@IRSMSX102.ger.corp.intel.com> To: "Soegtrop, Michael" X-Mailer: Apple Mail (2.3273) Organization: Universitaet Freiburg, Institut f. Informatik Subject: Re: [Caml-list] Float precision in OCaml BTW, there is some literature on this topic, the most recent of which is th= e paper =E2=80=9CPrinting Floating Point Numbers - A faster, always correct method= =E2=80=9D https://cseweb.ucsd.edu/~lerner/papers/fp-printing-popl16.pdf It cites all the previous efforts starting with Knuth=E2=80=99s TACP Vol II= , seminumerical algorithms. -Peter > On 1. Aug 2017, at 15:57, Soegtrop, Michael = wrote: >=20 > Said that, one can define a mapping from floating point numbers to usual = decimal string representations and back such that each floating point numbe= r results in a unique string. It is just quite tricky to get it right witho= ut extended precision arithmetic, though. >=20 > As far as I know the Lisp standard requires that certain floating point f= ormats have this property (I need to check). One might be able to learn fro= m them how to do this properly.