lua-users home
lua-l archive

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


i'm using Lua 5.0.2 with lua_Number defined as __int64
Now, the simple expression
=1/0
crashes Lua interpreter with Division by zero exception.

If you switch to using Lua 5.1.1, the patch at
http://www.ccs.neu.edu/home/ramsdell/tools/lua-5.1-no-fp.patch
sets up Lua with lua_Number defined as long, and avoids all floating
point operations.  The patched version has been working quite well for
me.

I can't switch to 5.1 but the patch was very useful for me because I've
completely forgotten to patch the code for %G etc.
Thank you very much,
Todor