Re: [Cbor] Implementing float->int numeric reduction

Carsten Bormann <cabo@tzi.org> Wed, 16 August 2023 10:50 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 502AEC15109A for <cbor@ietfa.amsl.com>; Wed, 16 Aug 2023 03:50:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.907
X-Spam-Level:
X-Spam-Status: No, score=-1.907 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1yIyY9QWpU_r for <cbor@ietfa.amsl.com>; Wed, 16 Aug 2023 03:50:27 -0700 (PDT)
Received: from smtp.zfn.uni-bremen.de (smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D1B4DC151097 for <cbor@ietf.org>; Wed, 16 Aug 2023 03:50:26 -0700 (PDT)
Received: from [192.168.217.124] (p548dc15c.dip0.t-ipconnect.de [84.141.193.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4RQlKC5s4NzDCds; Wed, 16 Aug 2023 12:50:23 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <57dbd2ac-ec70-2b4a-91a6-5f8fea5a570d@gmail.com>
Date: Wed, 16 Aug 2023 12:50:23 +0200
Cc: Wolf McNally <wolf@wolfmcnally.com>, "lgl island-resort.com" <lgl@island-resort.com>, cbor@ietf.org, Shannon Appelcline <shannon.appelcline@gmail.com>, Christopher Allen <christophera@lifewithalacrity.com>
X-Mao-Original-Outgoing-Id: 713875823.344636-67570450d7e5d40244eeeaaa08136bb8
Content-Transfer-Encoding: quoted-printable
Message-Id: <142088F3-17A2-411A-95AE-11214460B79B@tzi.org>
References: <0EBCC710-F7BA-474E-8A6D-D67015FD5EC7@island-resort.com> <dd9bc427-31a7-6d51-2fb1-d02e1b2824ff@gmail.com> <BEAFD785-D282-4C5C-AA7D-FB36970D09D1@island-resort.com> <0B6C4756-6C69-4F66-9B5F-CD5B7A1CB9FA@wolfmcnally.com> <f70f44eb-111c-b1c7-00b5-c9e99af5e88a@gmail.com> <C6D174CC-4ECC-433F-AF16-4FBED1C644EB@wolfmcnally.com> <f5425e41-6cf8-16b7-0ba8-492c67e3d8b0@gmail.com> <8E24A9E2-8563-458E-88D8-C60423118824@wolfmcnally.com> <AA75FF5F-E256-405A-89F2-C46C7DF725C7@tzi.org> <2cb4cfc8-1f60-7701-67fe-675419260ccd@gmail.com> <A9DA2C3A-9923-48F4-B78D-2B6E9CA70BDB@tzi.org> <88ff5010-c8fb-97e8-51f8-d5b26eeb1480@gmail.com> <988A92DF-B240-4378-B196-BBB322A0F82B@tzi.org> <CADEL5zseGxTYp0W=tpncQRDvyXkMFdwNbifMKKwUoJJjwSiipw@mail.gmail.com> <8A051D39-67DD-4F7E-858C-5230E449E543@tzi.org> <57dbd2ac-ec70-2b4a-91a6-5f8fea5a570d@gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/XePBOoCX0rJu3IsUoqeAtla3LOU>
Subject: Re: [Cbor] Implementing float->int numeric reduction
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
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 Aug 2023 10:50:31 -0000

On 2023-08-16, at 12:21, Anders Rundgren <anders.rundgren.net@gmail.com> wrote:
> 
> You could for example put 4.0 in the left window of https://cbor.me, check the deterministic box, and hit go.
> This will return f94400 which bombs in a proper dCBOR implementation including in mine:
> https://cyberphone.github.io/dCBOR-demo/doc/playground.html

Yes.  cbor.me currently only offers what I hope will be the Common CBOR Deterministic Encoding Profile.  It does not implement the dCBOR application profile, whose job it would have been to turn the floating-point 4 (floating point as indicated by the presence of a decimal point) into an integer 4.  Let’s see when I get to including a dCBOR flag in the cbor.me user interface...

Grüße, Carsten