Re: [Json] WGLC comment about numeric values

"Martin J. Dürst" <duerst@it.aoyama.ac.jp> Sat, 12 October 2013 08:10 UTC

Return-Path: <duerst@it.aoyama.ac.jp>
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 ED51121F9D46 for <json@ietfa.amsl.com>; Sat, 12 Oct 2013 01:10:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.274
X-Spam-Level:
X-Spam-Status: No, score=-103.274 tagged_above=-999 required=5 tests=[AWL=0.516, BAYES_00=-2.599, HELO_EQ_JP=1.244, HOST_EQ_JP=1.265, MIME_8BIT_HEADER=0.3, 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 LeCaIrgjfoFC for <json@ietfa.amsl.com>; Sat, 12 Oct 2013 01:10:31 -0700 (PDT)
Received: from scintmta02.scbb.aoyama.ac.jp (scintmta02.scbb.aoyama.ac.jp [133.2.253.34]) by ietfa.amsl.com (Postfix) with ESMTP id 015A221E80EA for <json@ietf.org>; Sat, 12 Oct 2013 01:10:19 -0700 (PDT)
Received: from scmse02.scbb.aoyama.ac.jp ([133.2.253.231]) by scintmta02.scbb.aoyama.ac.jp (secret/secret) with SMTP id r9C8A8Pc002007; Sat, 12 Oct 2013 17:10:09 +0900
Received: from (unknown [133.2.206.134]) by scmse02.scbb.aoyama.ac.jp with smtp id 52f9_f3a9_b5dafbfa_3315_11e3_a730_001e6722eec2; Sat, 12 Oct 2013 17:10:08 +0900
Received: from [IPv6:::1] (unknown [133.2.210.1]) by itmail2.it.aoyama.ac.jp (Postfix) with ESMTP id 27BB3BF4E2; Sat, 12 Oct 2013 17:10:08 +0900 (JST)
Message-ID: <525903CF.3050000@it.aoyama.ac.jp>
Date: Sat, 12 Oct 2013 17:09:51 +0900
From: "\"Martin J. Dürst\"" <duerst@it.aoyama.ac.jp>
Organization: Aoyama Gakuin University
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100722 Eudora/3.0.4
MIME-Version: 1.0
To: Tim Bray <tbray@textuality.com>
References: <CAK3OfOhUtrd91SiLrnG=5xoNnvPGfgi4EPLwzU=jV=9oHHS4_g@mail.gmail.com> <CAHBU6isQgyO-qai2w61T-XJoLua+u9QAneXm=doweYSRvrVz-w@mail.gmail.com> <CAHBU6itryT-CLEVarK4TEmUJ-grkPAQ8cgx3LZcm0Axe6wyT9w@mail.gmail.com>
In-Reply-To: <CAHBU6itryT-CLEVarK4TEmUJ-grkPAQ8cgx3LZcm0Axe6wyT9w@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: quoted-printable
Cc: Nico Williams <nico@cryptonector.com>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] WGLC comment about numeric values
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: Sat, 12 Oct 2013 08:10:37 -0000

On 2013/10/12 6:08, Tim Bray wrote:
> How’s this?
> ==============
>
> This specification allows implementations to set limits on the range and
> precision of numbers accepted.

Fine up to here.

> Since software which implements IEEE
> 754-2008 binary64 (double precision) numbers [IEEE754]<#IEEE754>  is
> generally available and widely used, good interoperability can be achieved
> by implementations which expect no more precision or range than these
> provide, in the sense that implementations will approximate JSON numbers
> within the expected precision.

This sentence is just way too long. The referent of "these" in "than 
these provide" is unclear. I suggest the following rewording:

Software which implements IEEE 754-2008 binary64 (double precision) 
numbers [IEEE754]<#IEEE754> is generally available and widely used.
Therefore, good interoperability can be achieved by implementations 
which expect no more precision or range than provided by these numbers.
This means that implementations will approximate JSON numbers within the 
expected precision.

Regards,   Martin.

> A JSON number which is outside those bounds,
> such as 1E400 or 3.141592653589793238462643383279, may indicate potential
> interoperability problems since it suggests that the software which created
> it it expected greater magnitude or precision than is widely available.

s/it it/it/

> Note that when such software is used, numbers which are integers and are in
> the range [-(2**53)+1, (2**53)-1] are interoperable in the sense that
> implementations will agree exactly on their numeric values.
> ==============
>
>
> On Fri, Oct 11, 2013 at 1:51 PM, Tim Bray<tbray@textuality.com>  wrote:
>
>> Actually, I think the language should be adjusted to say, rather than
>> generally “supports IEEE754”, more specifically “supports IEEE765 64-bit
>> binary (double precision) numbers.  Then the rest falls into place.
>>
>>
>> On Fri, Oct 11, 2013 at 12:35 PM, Nico Williams<nico@cryptonector.com>wrote:
>>
>>>     Note that when such software is used, numbers which are integers and
>>>     are in the range [-(2**53)+1, (2**53)-1] are interoperable in the
>>>     sense that implementations will agree exactly on their numeric
>>>     values.
>>>
>>> s/implementations will/implementations most likely will/
>>>
>>> (Because there are implementations that only support 32-bit integers.)
>>> _______________________________________________
>>> json mailing list
>>> json@ietf.org
>>> https://www.ietf.org/mailman/listinfo/json
>>>
>>
>>
>
>
>
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json