I take that back. The rfc says:

   An I-JSON sender cannot expect a receiver to treat an integer whose
   absolute value is greater than 9007199254740991 (i.e., that is
   outside the range [-(2**53)+1, (2**53)-1]) as an exact value.


For the natural interpretation of "treat" as in "operate on or with" I'd
say the rfc is correct. But the language is ambiguous and should be
clarified.




On Sun, May 6, 2018 at 12:34 PM, Mark Miller <[email protected]> wrote:

> Hi Anders, you are correct. The rfc as stated is incorrect. The EcmaScript
> spec is correct.
>
> 2**53 is indeed exactly representable, which is what the rfc is about. But
> 2**53 is not safe, which what the ecmascript spec is about.
>
>
>
> On Sun, May 6, 2018 at 11:58 AM, Anders Rundgren <
> [email protected]> wrote:
>
>> On 2018-05-06 19:57, Logan Smyth wrote:
>> <snip>
>>
>>> I think the best source of truth is likely the spec:
>>> https://www.ecma-international.org/ecma-262/8.0/#sec-number.
>>> max_safe_integer which states
>>>
>>> The value of Number.MAX_SAFE_INTEGER is the largest integer n such that
>>> n and n + 1 are both exactly representable as a Number value.
>>>
>>
>> Right, this is essentially what I'm claiming; Number.MAX_SAFE_INTEGER + 1
>> is a valid (exact) integer which means that
>> https://tools.ietf.org/html/rfc7493#section-2.2 is incorrect.
>>
>> Anders
>> _______________________________________________
>> es-discuss mailing list
>> [email protected]
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>
>
>
> --
>   Cheers,
>   --MarkM
>



-- 
  Cheers,
  --MarkM
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to