lua-users home
lua-l archive

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


steve donovan <steve.j.donovan@gmail.com> writes:
> You can use the LNUM patch, so you can have both double and 64-bit
> integer types.  Or, write an extension which wraps your 64-bit values
> in userdata.  The question is: do you need proper 64-bit integer
> arithmetic, or do you just want to pass these numbers around, as ids?

Another question to ask is:  'Do I _really_ need all 64 bits, or is
enough to simply have "a lot of bits"?'   [Where "a lot" is the number of
bits in the mantissa of a double (52 or 53 I think).]

There are many case where in practice "a lot" is enough for all
foreseeable usage, even if the quantity represented is nominally 64-bits
in length; for instance, file offsets.

-Miles

-- 
"I distrust a research person who is always obviously busy on a task."
   --Robert Frosch, VP, GM Research