Subject: [Cbor] Equivalence of integers and floating point numbers

From: Jim Schaad <[email-masked]>
Date: Sun, 4 Mar 2018 18:23:15 -0800

I applaud the fact that the data model states that floating point numbers
and integer numbers are not equivalent.    I believe that this is the
correct statement for a number of reasons.

I do not understand why when comparing keys the same statement of
equivalence is not being used.  It says that 

	An integer value encoded as a floating point data item is
equivalent to the same value encoded as an integer

I believe that this statement needs to be reversed so that they are not
equivalent.

Jim

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 5 Mar 2018 08:13:25 +0400

The major environment that cannot distinguish integers from floats, JavaScript, also cannot use either as keys for the most basic kind of map (called Object in JavaScript). So I currently believe there is little downside to increasing the separation between int and float. (Applications may still want to give encoders the liberty to convert floats that happen to have an integer value into int -- just not when int is simultaneously used as a map key with different semantics.)

Sent from mobile

> On 5. Mar 2018, at 06:23, Jim Schaad <[email-masked]> wrote:
>