Re: [Json] Minus Zero

Anders Rundgren <anders.rundgren.net@gmail.com> Tue, 21 June 2016 17:03 UTC

Return-Path: <anders.rundgren.net@gmail.com>
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 262FD12DB19 for <json@ietfa.amsl.com>; Tue, 21 Jun 2016 10:03:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 mFP7O840ZZqs for <json@ietfa.amsl.com>; Tue, 21 Jun 2016 10:03:11 -0700 (PDT)
Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5772C12DB09 for <json@ietf.org>; Tue, 21 Jun 2016 10:03:04 -0700 (PDT)
Received: by mail-lf0-x230.google.com with SMTP id h129so33194341lfh.1 for <json@ietf.org>; Tue, 21 Jun 2016 10:03:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=fNWx2K0CAlrycNgB/8eIIP4y/Df9m9ecOv7iCGnKD08=; b=uWzQEc/kAunGyVSBOmqrT3T3SM2p/9r9qVLREVu/Gk0u/5bzGSYr/maxPPaVftQJMV PHDKX8eLaakCu3I5zULELH7fObTDQoK5Hl7J3DppwYyzDTrLkHR/Nj2LeGiELjBKhCAS ZxYn4eUeaM/8iiGUxq08eTvPfE+41zzMPB/ogEcNFdKx6M/waSWm0ShNIV191crUckKh y1w1PkBd83yti3s77t9s89jwcAZuU3Hn0Qe4JKAlsPwBRj28Y5FTuUU5UDn9VM1rQI0+ ydvY3MJ5VRNQaNcPpKuFdN7gnzWSGoK9vzKxsxv+G3VeMNn5u0W0RSpmubDMvtqnMzKE qfYg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=fNWx2K0CAlrycNgB/8eIIP4y/Df9m9ecOv7iCGnKD08=; b=hSa3lKMywaGXCawm4x5e3SV8vMqygPdTH8N3itSSjiwQpWEQaGCwi2P0hrtcE+yprO QoTJoIBAw9YI/T+vrAHbDDZY98nmu+JnGofak/Coo5g2xV1PYshUbGgoNHoi/ZVM8K+h IDdIQIhw0llA56d6VuONojUbYv8NfP+KnOmJOY5Mx/B5jQ4CQJwClrfvljiXBgoB4AZT hE2f7Qvoj5Ibsy5TyT3moUJTVSozAz5l+QZ7/NMgz/+sNPQbkPuEOTW4AglFDgpkiaWc hVb6m07TqWKR4f6xZHcT+uhRLUF8f68EU5Fu9jhvTdw5PYcEe6PsCURdOtAIKMgTjzWl sMNQ==
X-Gm-Message-State: ALyK8tJ/QTAymd6dMupozAnaeDBj2SFm5ReUgIfAMoVG8wVF1iQjA+Zf0OMPLzp2KIs/ow==
X-Received: by 10.28.150.81 with SMTP id y78mr4252649wmd.37.1466528582412; Tue, 21 Jun 2016 10:03:02 -0700 (PDT)
Received: from [10.59.59.54] (78-21-55-11.access.telenet.be. [78.21.55.11]) by smtp.googlemail.com with ESMTPSA id b187sm3816462wmg.15.2016.06.21.10.03.01 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Jun 2016 10:03:01 -0700 (PDT)
To: John Cowan <cowan@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>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <6d834be1-14c3-d8b4-09dd-2a992cfe55a6@gmail.com>
Date: Tue, 21 Jun 2016 19:02:56 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1
MIME-Version: 1.0
In-Reply-To: <20160621154243.GG13605@mercury.ccil.org>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/U5sphOGemi9OCRYI3dJY2St7DtQ>
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: Tue, 21 Jun 2016 17:03:13 -0000

On 2016-06-21 17:42, John Cowan wrote:
> Anders Rundgren scripsit:
>
>> Implementstions do NOT agree on floating point serialization.  Neither text
>> (like E or e), leading zeroes or even values are to be counted on.
>
> Disagreement on the lexical details of production does not mean disagreement
> on interpretation, which is what is at stake here.  Nobody supposes that
> 10, 1e1, 1E1, 10.0, 10.00 mean different things.  The same is not true for
> 0.0 and -0.0.
>

Apparently the ES6 folks consider IEEE 0.0 and -0.0 equal during JSON serialization.
This is probably a reasonable conclusion since non-normalized numbers are treated differently.
It is also better aligned with integers.

In order to make anything else JSON would need separate integer and floating point types.

Anders