lua-users home
lua-l archive

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

In my experience, using fixed point arithmetic in anything that is intended to be general purpose (s.a. Lua core) is simply a Bad Idea. Where fixed point work, is coordinate systems etc. where you can make some assumptions about the values and operations performed on those numbers.

Just my 5 cents (there's no 2c in Finland ;)


Ben Sunshine-Hill kirjoitti 27.2.2006 kello 1.59:

On 2/26/06, Adam D. Moss <> wrote:
Daniel Collins wrote:
Also, does the integer patch give control (eg via a macro) of the fixed
point precision?

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).

I vaguely recall, though, someone on this list doing fixed point in
Lua to make it work with BREW. It would be interesting to combine the
two patches. You'd still only have one choice of fixed-point other
than integer, but in my experience that's adequate for the majority of