i64

i64, data type

i64 is a signed 64-bit integer, formerly named long. The name long remains an alias. Each value occupies 8 bytes, twice the numeric storage of a number value.

This type is useful for exact integer calculations beyond $2^{24}$, where number can no longer represent every consecutive integer. Its range is $-2^{63}$ through $2^{63}-1$.

Supported operations

Examples

base = to.i64(16777216)
next = base + to.i64(1)

show summary "Integer precision" with
  text(next) as "i64"
  text(to.number(next)) as "number"

The i64 value is 16777217. Converting it to number rounds it to 16777216. The addition is performed after conversion: converting a result already rounded in number would not recover the missing precision.

Limitations

Writing i64 values to a file is not supported, including through path schemas or implicit column selection. Convert to number only when the possible precision loss is acceptable, or use text to export the integer as text.

See also

User Contributed Notes
0 notes + add a note