Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for fixed-width (64-bit) unsigned integers. With an eye to potential future work, it defines a general
UInt
enum, of whichUInt::U64
is the only initial variant.Arithmetic behaves as though
mod 2^64
. Division is 'integer division'.Literal
U64
s are denoted with a suffix, eitheru64
orU64
directly following a valid number. It is a reader/parser error to specify aU64
from a number greater than the maximumU64
.The
num
operator coercesU64
toNum
, with no loss of precision.The
u64
operator coercesNum
toU64
, preserving only the least-significant 8 bytes.Arithmetic operations that mix
U64
andNum
yieldNum
s and are performed by first coercing theU64
toNum
.The
u64
suffix cannot be combined with negative or fractional notation.