lua-users home
lua-l archive

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

Daniel Collins wrote:
The integer patch (assuming we're talking about the same thing) isn't a fixed-point patch, I believe; instead it makes the VM use integer maths for integer values where feasible, deferring to floating point only when necessary (i.e. non-integer operands).

Hmm, ok. Looks like I am about to write a fixed point patch for lua

- DC

I recall reading that the Lua mumeric type can be changed to as little as a 16 bit int and Lua still works.

From the wiki:
"Lua does not depend on floating point, much less double precision. It can be compiled with any convenient numeric type. Of course, the semantics of division, for example, change significantly if you compile Lua with an integer numeric type, but on an embedded processor that would probably not come as a surprise."

From the Lua 5.1 Reference Manual: "(It is easy to build Lua interpreters that use other internal representations for numbers, such as single-precision float or long integers. See file luaconf.h.)"

Dave LeBlanc
Seattle, WA USA