lua-users home
lua-l archive

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


Speaking as someone who doesn't understand the science behind the
integer<->float conversion for various operations, my interpretation
has been thus:

When precision "can" be lost to represent a number as an integer, it
is.  Operating on integers always seems to be faster than operating on
floats/doubles so I understood this to be the motive behind
introducing integers in 5.3 "where they can appear".

2.5 + 2.5 + 2 -> 2.5 + 2.5 + 2.0 -> 5.0 + 2.0 -> 7.0 -> 7