lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Aug 29, 2021 at 11:34 AM Flyer31 Test <flyer31@googlemail.com> wrote:
???There are no 63bit integers??? (or do you know a 63 bit processor?)

There are a number of languages (OCaml comes to mind) that use a 32-bit or 64-bit tagged representation for values. Integers can be represented by using the most-significant bit to indicate that it's an integer type, and the rest of the bits contain the numeric value. This is analogous to how LuaJIT (and briefly, at one point in history, Lua itself) used NaN tagging to represent other types of values inside of an otherwise-standard 64-bit double-precision floating-point number.

/s/ Adam