lua-users home
lua-l archive

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


Brian Weed wrote:

Is there something about adding numbers that I should know
about?

print(0x10000000)
268435456

print(0x10000000 + 0x00000001)
268435456

print(0x10000000 + 0x00000002)
268435456

I get 268435456, 268435457, and 268435458.  My first guess
is that you're using (single-precision) floats instead of
doubles.  What platform are you on?  Did you change
LUA_NUMBER when compiling?

http://docs.sun.com/source/806-3568/ncg_goldberg.html

--
Aaron