Re: [Cbor] NaN payload notation (Re: 7049bis: Diagnostic notation gaps)

Carsten Bormann <cabo@tzi.org> Wed, 16 September 2020 21:38 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CD4E13A0CE0 for <cbor@ietfa.amsl.com>; Wed, 16 Sep 2020 14:38:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.919
X-Spam-Level:
X-Spam-Status: No, score=-1.919 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 VKsZitKnpYvN for <cbor@ietfa.amsl.com>; Wed, 16 Sep 2020 14:37:59 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6DBBE3A0CD8 for <cbor@ietf.org>; Wed, 16 Sep 2020 14:37:59 -0700 (PDT)
Received: from [192.168.217.118] (p5089ae91.dip0.t-ipconnect.de [80.137.174.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4BsD3S60qWz10BJ; Wed, 16 Sep 2020 23:37:56 +0200 (CEST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <1648968.enHRFnnXMp@tjmaciei-mobl1>
Date: Wed, 16 Sep 2020 23:37:55 +0200
Cc: cbor@ietf.org
X-Mao-Original-Outgoing-Id: 621985075.057846-00baf0bc515a62b9f959d2d0c7a6c7f0
Content-Transfer-Encoding: quoted-printable
Message-Id: <9E2E986E-244D-48BB-87F5-E2D0A4B0D5B4@tzi.org>
References: <2766F4E6-0E67-472B-8BFA-75C529F4EE80@tzi.org> <1686854.WtuvBSIOmm@tjmaciei-mobl1> <B5903EB7-8030-4A79-B73B-AF96B4F8E342@tzi.org> <1648968.enHRFnnXMp@tjmaciei-mobl1>
To: Thiago Macieira <thiago.macieira@intel.com>
X-Mailer: Apple Mail (2.3608.120.23.2.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/tpPkxzr4OTDLnaboLklhsUngaXE>
Subject: Re: [Cbor] NaN payload notation (Re: 7049bis: Diagnostic notation gaps)
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 16 Sep 2020 21:38:02 -0000

On 2020-09-16, at 18:58, Thiago Macieira <thiago.macieira@intel.com> wrote:
> 
> To confirm I understand you, are these sequences identical to each other (in 
> the same line)?
> 
>  NaN_1	NaN'7e00'		NaN
>  NaN_2	NaN'7fc00000'
>  NaN_3	NaN'7ff8000000000000'

That was my intention, except that NaN is unspecific about encoding length just as 1.0 is, so it should be on all three lines (but the first one is the preferred encoding).

(I still have to check the syntax whether NaN’…’ bites us anywhere, but I think it shouldn’t.)

> (the bit patterns are the QNaN, unless I made a mistake; I'm not trying to 
> trick you)

RFC 7049 is trying to help you :-)

$ grep NaN rfc7049.txt | grep 0x
   | NaN                          | 0xf97e00                           |
   | NaN                          | 0xfa7fc00000                       |
   | NaN                          | 0xfb7ff8000000000000               |
$

Grüße, Carsten