lua-users home
lua-l archive

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


> From: "Todor Totev" <umbra.tenebris@list.ru>
> Subject: lua crashes with 64-bit integers
> Hello all,
> i'm using Lua 5.0.2 with lua_Number defined as __int64
> (Microsoft VC under Windows NT).
> 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.

John