Re: [Json] -0.0

Carsten Bormann <cabo@tzi.org> Sun, 29 September 2013 20:33 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DC60E21F9D96 for <json@ietfa.amsl.com>; Sun, 29 Sep 2013 13:33:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.183
X-Spam-Level:
X-Spam-Status: No, score=-106.183 tagged_above=-999 required=5 tests=[AWL=0.066, BAYES_00=-2.599, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HBuIUatyyVVJ for <json@ietfa.amsl.com>; Sun, 29 Sep 2013 13:33:33 -0700 (PDT)
Received: from informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) by ietfa.amsl.com (Postfix) with ESMTP id 1F57721F9E7E for <json@ietf.org>; Sun, 29 Sep 2013 13:33:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from smtp-fb3.informatik.uni-bremen.de (smtp-fb3.informatik.uni-bremen.de [134.102.224.120]) by informatik.uni-bremen.de (8.14.4/8.14.4) with ESMTP id r8TKXRO7014912; Sun, 29 Sep 2013 22:33:27 +0200 (CEST)
Received: from [192.168.217.105] (p54890A66.dip0.t-ipconnect.de [84.137.10.102]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-fb3.informatik.uni-bremen.de (Postfix) with ESMTPSA id C797F407; Sun, 29 Sep 2013 22:33:26 +0200 (CEST)
Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\))
Content-Type: text/plain; charset="iso-8859-1"
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <CAChr6Sz4Hg--YrWnxXOxJJmbx=AmjDoEZXxs7HeTV58w5VSRDg@mail.gmail.com>
Date: Sun, 29 Sep 2013 22:33:25 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <25C6CA6F-76F0-42DE-8845-850B8B69F1A6@tzi.org>
References: <BF7E36B9C495A6468E8EC573603ED9411EF1BB0B@xmb-aln-x11.cisco.com> <CAChr6SyznBktmOLpT-EiZ5Nm_0jZ16M0tOo4aZ_jhSDb=HHDqg@mail.gmail.com> <6D5CFCAD-5B75-4246-BE42-D42E4D35C344@vpnc.org> <CAChr6SzEBdgF_Cv2ZnC1Oo2CnL06dwZqsOKA=HTVkgArcTyLEw@mail.gmail.com> <CAHBU6iu=LbwcZgEPzKgurR7s+jCUeVMEagq1knzOBWUky9SLoA@mail.gmail.com> <52454988.5030706@it.aoyama.ac.jp> <20130927214137.GC24460@mercury.ccil.org> <BF7E36B9C495A6468E8EC573603ED9411EF1E1E5@xmb-aln-x11.cisco.com> <CAChr6SxfAv+yjEzsn2R=S79MviRN+bYak=8Nnnkw9hfs3p1zxw@mail.gmail.com> <CAChr6SxYSzXGf5hrVNvmdmpHU2R+cKSH+37NhTc--6iDpfXG3g@mail.gmail.com> <9D959999-63A2-46EF-8C14-C48F586D9DA4@tzi.org> <CAChr6Sz4Hg--YrWnxXOxJJmbx=AmjDoEZXxs7HeTV58w5VSRDg@mail.gmail.com>
To: R S <sayrer@gmail.com>
X-Mailer: Apple Mail (2.1510)
Cc: JSON WG <json@ietf.org>
Subject: Re: [Json] -0.0
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Sep 2013 20:33:39 -0000

On Sep 29, 2013, at 22:25, R S <sayrer@gmail.com> wrote:

> I am not sure that file is relevant

It is an example of an implementation that encodes a floating point negative zero as »-0«, which is then decoded as a plain (integer) zero by most implementations.

Summary: If you want wide interoperability, don't rely on negative zero (in any form) staying distinct.  (And if you don't need wide interoperability, the encoded form »-0.0« appears to survive best.)

Grüße, Carsten