[Cbor] Re: EDN -0
Rohan Mahy <rohan.mahy@gmail.com> Tue, 27 August 2024 02:13 UTC
Return-Path: <rohan.mahy@gmail.com>
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 65B9AC1D4A95 for <cbor@ietfa.amsl.com>; Mon, 26 Aug 2024 19:13:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.108
X-Spam-Level:
X-Spam-Status: No, score=-2.108 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] 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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2H7x5jGmtATk for <cbor@ietfa.amsl.com>; Mon, 26 Aug 2024 19:13:17 -0700 (PDT)
Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EE58AC1D4A92 for <cbor@ietf.org>; Mon, 26 Aug 2024 19:13:17 -0700 (PDT)
Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a86933829dcso557904066b.3 for <cbor@ietf.org>; Mon, 26 Aug 2024 19:13:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724724796; x=1725329596; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mqFvXt63UrFtp2n4TW+9Hd08dv90LD5IQwZ5844GY6o=; b=NLfl4XM2PodvM6VCjylJPMhSYv/GalPLTa2QxbBwos00CvFR7yPHIQlBHCLgsGM6b5 n+BFQ4P+m0PPV/pULqVhCatywD+UfVmpEzFIXxP2bMW1UzUYllOJ6EPZ99JBobf7EtRb HGHKKuNqGw9XZSGSDVM2vR7Enmd0oNEXy3B3/817Q4qGvkF0mwpp+m5+nQRcGic5QqZw Yu18kEbsxutJBIK7BuIFA5u7BeWuQ8GW4Oay56CqagMbsDsItYA3TmY84NF5+tOZgw92 4JzHrme96QCrTMH/kZdQPH4Mp5F1qEb0U1DeZ3ySibwmDK+R9i1tNQAPQjCCSx+YdeTs bQPg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724724796; x=1725329596; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mqFvXt63UrFtp2n4TW+9Hd08dv90LD5IQwZ5844GY6o=; b=gJNNlteWR5Mc86UhkfeT+Dzu3lLwiUh2zTHZNp2WZDHEbZ2KoCs0xXAZ2jNZQRvxVi MqHB8Uo4EuE0cgelvB9o0dbMK98Y7cn/U+M1a0uRacFiqW8IAChrzHY/5gN4eUwq/nKf fIZhogxxMfF4wEdVNenl6i43LW6Eu6LzJpihu9E6iVwFvLKJ4ADyElJ/XMsEAklI2Dol ggL4psRg8w3KhGk9DjgrFW+x3fr+pAKcT/bBqNhxX3Zluf8pjXcbo7cds90fPFLtbZFZ qKkIspDos/miqXx+fOObkdp02hAZNKHY4JEYvSb+c2qWse5WTlQumygt/sirmG4A5wNE 9m1g==
X-Gm-Message-State: AOJu0YxPp5MAt+c67mJRIw0qqytoWHGwG1R79/mWBuEYiimVIVRaCO4a M9zKDIOG5+OYbrDNzT1fyiFKyU5Xa5F2Un+S7k5OvicpAV7JNiZg16otGe3neUglnKHNF8hG7MR 4RyipPZBsgtPlz4cJLi0VD3BEA8O192Ne
X-Google-Smtp-Source: AGHT+IEhckWrxZhQrKbk8r4GE/zUU2tC7FQiKNslaAY0qUukMb4/szuae05LGb3fXQdG/7JFL8/CoJiJpoXaW6oC9Ic=
X-Received: by 2002:a17:907:f7a3:b0:a86:8d9d:898b with SMTP id a640c23a62f3a-a86a52ddd55mr796145566b.29.1724724795301; Mon, 26 Aug 2024 19:13:15 -0700 (PDT)
MIME-Version: 1.0
References: <9620A48C-10A3-4708-89D4-4E121043E786@cursive.net> <CAKoiRubf5YdxhsEBqZn0aHBmsGjZahg-u3KX_TM8mLLOf3Ks4Q@mail.gmail.com> <441B63D7-CEDB-40F9-BE48-60155BB58725@cursive.net>
In-Reply-To: <441B63D7-CEDB-40F9-BE48-60155BB58725@cursive.net>
From: Rohan Mahy <rohan.mahy@gmail.com>
Date: Mon, 26 Aug 2024 19:13:03 -0700
Message-ID: <CAKoiRuaZX5ra2Etho59PP2JJFGYfUC2ninG-LRHu+Cp9erBzpw@mail.gmail.com>
To: Joe Hildebrand <hildjj@cursive.net>
Content-Type: multipart/alternative; boundary="000000000000c266f80620a0c87b"
Message-ID-Hash: D4EF7IYLAZB6QZCCR3YCKMP5XPY4FLHY
X-Message-ID-Hash: D4EF7IYLAZB6QZCCR3YCKMP5XPY4FLHY
X-MailFrom: rohan.mahy@gmail.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cbor.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: CBOR <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Cbor] Re: EDN -0
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/97Wx26Ir5L0gPlrjxAxbpWs7-Jo>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Owner: <mailto:cbor-owner@ietf.org>
List-Post: <mailto:cbor@ietf.org>
List-Subscribe: <mailto:cbor-join@ietf.org>
List-Unsubscribe: <mailto:cbor-leave@ietf.org>
> Why would I have typed -0 if I wanted 0? Let's be clear. The user typed something dumb. If they wanted floating point -0.0 they should have written that. If they wanted 0, they should have typed that. We are debating if it is better to *make an exception* to the simple rule about having a decimal point or other indicator of floating point present to make something floating point or not. Every other integer is represented as a CBOR integer. > It *doesn't* have a value in the integer space, like NaN or Infinity. In the integer space -0 *equals* 0. -0 does not have a *unique* value in the integer space, but it *does* have a value. Thanks, -rohan On Mon, Aug 26, 2024 at 6:17 PM Joe Hildebrand <hildjj@cursive.net> wrote: > Why would I have typed -0 if I wanted 0? > > It *doesn't* have a value in the integer space, like NaN or Infinity. > > — > Joe Hildebrand > > > On Aug 26, 2024, at 5:35 PM, Rohan Mahy <rohan.mahy@gmail.com> wrote: > > > > Why not represent EDN -0 be the unsigned int zero since it has the value > in the integer space and has no decimal point? > > Thanks, > > -r > > > > > > On Mon, Aug 26, 2024 at 3:56 PM Joe Hildebrand <hildjj@cursive.net> > wrote: > > Perhaps EDN -0 is supposed to be denote the integer 0 because of this > language: > > > > > > ``` > > decnumber stands for an integer in the usual decimal notation, unless at > least one of the optional parts starting with "." and "e" are present, in > which case it stands for a floating point value in the usual decimal > notation. Note that the grammar now allows 3. for 3.0 and .3 for 0.3 (also > for hexadecimal floating point below); implementers are advised that some > platform numeric parsers accept only a subset of the floating point syntax > in this document and may require some preprocessing to use here. > > ``` > > > > I implemented -0 to always return a float, since it's the only number > without a decimal or exponent that can't be encoded as an integer. I think > that's more correct, but I am willing to be wrong. > > > > Either way, can we have an explicit call out for -0 in this paragraph? > > > > — > > Joe Hildebrand > > > > _______________________________________________ > > CBOR mailing list -- cbor@ietf.org > > To unsubscribe send an email to cbor-leave@ietf.org > >
- [Cbor] EDN -0 Joe Hildebrand
- [Cbor] Re: EDN -0 Rohan Mahy
- [Cbor] Re: EDN -0 Joe Hildebrand
- [Cbor] Re: EDN -0 Rohan Mahy
- [Cbor] Re: EDN -0 Joe Hildebrand
- [Cbor] Re: EDN -0 Carsten Bormann
- [Cbor] Re: EDN -0 Joe Hildebrand