Re: [Json] Minus Zero

John Cowan <cowan@mercury.ccil.org> Wed, 22 June 2016 20:31 UTC

Return-Path: <cowan@ccil.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 78A1412D8EB for <json@ietfa.amsl.com>; Wed, 22 Jun 2016 13:31:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.027
X-Spam-Level:
X-Spam-Status: No, score=-4.027 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-1.426, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wonYTSYa2Qyn for <json@ietfa.amsl.com>; Wed, 22 Jun 2016 13:31:43 -0700 (PDT)
Received: from earth.ccil.org (earth.ccil.org [192.190.237.11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D803912D698 for <json@ietf.org>; Wed, 22 Jun 2016 13:31:43 -0700 (PDT)
Received: from cowan by earth.ccil.org with local (Exim 4.72) (envelope-from <cowan@ccil.org>) id 1bFooG-0000jA-3C; Wed, 22 Jun 2016 16:31:40 -0400
Date: Wed, 22 Jun 2016 16:31:39 -0400
From: John Cowan <cowan@mercury.ccil.org>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <20160622203139.GA24500@mercury.ccil.org>
References: <2a7f88b9-f719-dfd8-08a9-1777833e53d8@gmail.com> <e94f3bd0-1635-b2e1-c5da-9ae350ae652d@gmail.com> <57684982.2010705@tzi.org> <8e5dc4b2-a897-30e7-6e37-921c463275cd@gmail.com> <CADEL5zv-0ZRdcXKp1R=EBHqcJquOR7CYR=EW75xmtFpXG5OLOg@mail.gmail.com> <20160621154243.GG13605@mercury.ccil.org> <6d834be1-14c3-d8b4-09dd-2a992cfe55a6@gmail.com> <20160621204150.GJ13605@mercury.ccil.org> <afb35b0e-c346-7f34-4c2c-072f12c39b42@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <afb35b0e-c346-7f34-4c2c-072f12c39b42@gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: John Cowan <cowan@ccil.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/_AjgQ7l3DEWfjGn-Onf7nRZD_s8>
Cc: Carsten Bormann <cabo@tzi.org>, Christian Zangl <coralllama@gmail.com>, JSON WG <json@ietf.org>
Subject: Re: [Json] Minus Zero
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.17
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: <https://mailarchive.ietf.org/arch/browse/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: Wed, 22 Jun 2016 20:31:45 -0000

Anders Rundgren scripsit:

> I would have done the same.  -0.0 is as I understand as close to zero
> you can get.  The need for separating the -0.0 and 0.0 in real-world
> applications is probably 0.0 :-)

Well, if you make use of affine infinity (that is, you distinguish
Infinity from -Infinity), then you need two kinds of zeros, positive
and negative.  They are numerically equal, but are arithmetically
distinguishable.

> I just referred to the fact that -0 is not a useful way of serializing
> an integer,

True.

-- 
John Cowan          http://www.ccil.org/~cowan        cowan@ccil.org
Economists were put on this planet to make astrologers look good.
        --Leo McGarry