Re: [Json] I-JSON Topic #5: Numbers

"Joe Hildebrand (jhildebr)" <jhildebr@cisco.com> Tue, 20 May 2014 17:46 UTC

Return-Path: <jhildebr@cisco.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 98BF31A04D2 for <json@ietfa.amsl.com>; Tue, 20 May 2014 10:46:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -15.152
X-Spam-Level:
X-Spam-Status: No, score=-15.152 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham
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 bOOURu1IEMha for <json@ietfa.amsl.com>; Tue, 20 May 2014 10:46:47 -0700 (PDT)
Received: from alln-iport-6.cisco.com (alln-iport-6.cisco.com [173.37.142.93]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4B2091A027D for <json@ietf.org>; Tue, 20 May 2014 10:46:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1048; q=dns/txt; s=iport; t=1400608007; x=1401817607; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=BrK6X7OpE+wrItpe7+B01oUvnwgX3ncy+/PokENgwLY=; b=YAljGfO241Q2fmZ7Pr5QirZODxqY9xgEx1n9cxycm3icOnn3q9uNqFGf I03kLSxTgu46voPFJAopNaKCIDDHzBlNCBdHm6giQGqaT+5HWtuk9UK88 VwC/Iii5eXUfYuEBCITiDwdqbyxwq6G1aj9i/G/uEWKMZv1tCOfGGcIqC I=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AkUIAPmTe1OtJA2G/2dsb2JhbABZgwaBKYJppnkBAQEBAQEFAZosARmBBRZ0giYBAQQjEUUQAgEIDgwCJgICAjAVEAIEDgWIQa8xpE8XgSqEK4giVweCdYFLAQOZaJMggziBb0E
X-IronPort-AV: E=Sophos;i="4.98,875,1392163200"; d="scan'208";a="45557053"
Received: from alln-core-12.cisco.com ([173.36.13.134]) by alln-iport-6.cisco.com with ESMTP; 20 May 2014 17:46:46 +0000
Received: from xhc-aln-x08.cisco.com (xhc-aln-x08.cisco.com [173.36.12.82]) by alln-core-12.cisco.com (8.14.5/8.14.5) with ESMTP id s4KHkkE0001796 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 20 May 2014 17:46:46 GMT
Received: from xmb-rcd-x10.cisco.com ([169.254.15.76]) by xhc-aln-x08.cisco.com ([173.36.12.82]) with mapi id 14.03.0123.003; Tue, 20 May 2014 12:46:46 -0500
From: "Joe Hildebrand (jhildebr)" <jhildebr@cisco.com>
To: Carsten Bormann <cabo@tzi.org>
Thread-Topic: [Json] I-JSON Topic #5: Numbers
Thread-Index: AQHPYxzPc1qOL3zAFk6QxZ1T0YrJO5snzN0A//+jtwCAAGnvgIAEImEAgBzCVgD//8VpAIAAc5kAgADXt4A=
Date: Tue, 20 May 2014 17:46:45 +0000
Message-ID: <CFA0F09E.4A609%jhildebr@cisco.com>
References: <535EB3BF.8080606@cisco.com> <CAHBU6ivjF9ULW0yGSVdJi2D6QgUThuhym_ZhpgLM=cvLu=mAiQ@mail.gmail.com> <CF841AAE.47D86%jhildebr@cisco.com> <CAHBU6itK5HtSTPWSsHsHUPja90emqU86LsgjrBorkqcUDivS2A@mail.gmail.com> <CF87EB9C.48BB0%jhildebr@cisco.com> <537A5BE0.3020406@cisco.com> <CF9FCEC9.4A4E7%jhildebr@cisco.com> <488AE66E-725D-40B3-9FDA-ADA1018BCF65@tzi.org>
In-Reply-To: <488AE66E-725D-40B3-9FDA-ADA1018BCF65@tzi.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.4.1.140326
x-originating-ip: [10.21.151.90]
Content-Type: text/plain; charset="utf-8"
Content-ID: <FA6069DAE0BBB945A272E1513098D8E1@emea.cisco.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: http://mailarchive.ietf.org/arch/msg/json/1CPZhEGv90dRAYbIFWUb1oydLxA
Cc: IETF JSON WG <json@ietf.org>, "Matt Miller \(mamille2\)" <mamille2@cisco.com>
Subject: Re: [Json] I-JSON Topic #5: Numbers
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
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: Tue, 20 May 2014 17:46:49 -0000

On 5/19/14, 4:54 PM, "Carsten Bormann" <cabo@tzi.org> wrote:

>On 20 May 2014, at 00:00, Joe Hildebrand (jhildebr) <jhildebr@cisco.com>
>wrote:
>
>> 4e-324
>
>That is a bad number for interop not because it is out of range, but
>because it is not something you can get from converting a binary64 into
>decimal, so it is somewhat arbitrary what happens on the way back.
>
>I would be surprised if there are actual interop problems with 5e-324.
>Consequently, I don’t quite buy a range limit at 1e-308 yet.
>(It’s a precision limit, in any case.)

That was just an easy-to-see example.  Longer numbers less than 1e-308
will also have less precision than you expect for a double, or get rounded
to zero unexpectedly.

-- 
Joe Hildebrand