Source/Packages

Data.JSONAccess

packages/foundation/standard/src/Data/JSONAccess.alpha

1,210 lines73 declarations39.2 KiBSHA-256 1e44e4cc014b

def · lines 960–961

jsonInt64MaximumDigits

Full file
Does a run of decimal digits denote a magnitude at most 2^63 - 1? Decided on the DIGITS, never on the natural: fewer than nineteen digits always fit, more never do, and nineteen fit when they are not lexicographically above 9223372036854775807. A runtime natural costs ~164 bytes per unit of magnitude and the checker's division is unary, so neither 2^63 nor a 63-step halving of a 2^63-scale value is computable on either side; the string comparison costs nineteen byte comparisons at most.
960def jsonInt64MaximumDigits : Bytes =
961  b"9223372036854775807"

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.