lua-users home
lua-l archive

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


Asko Kauppi wrote:
Depends on your need of maths, since things s.a. sin, cos et.al. will lose their usefulness pretty immediately. I would actually leave such undefined for a fixed-point Lua implementation.

Yes, that's to be expected.

The C API would be problematic; unless you keep 'lua_Number' as a familiar double and only do the conversion within the core.

This would be problem #1. Could you be more specific about the mechanisms that would break?

You wouldn't be aware of how addon modules deal with lua_Number,
> and you wouldn't really even want to know. :)

I wouldn't use any external module... nor many of the standard libs.

This means you wouldn't just get away with redefining LUA_NUMBER.

Well, it was too good to be true :-)

If you get it to work, I'd be interested to add fixed point maths into the Numbers patch. And to hear performance comparisons against a hybrid float+int32 approach.

Unfortunately, the fixed-point code is not mine and not public either, but should I try this road I'll give some stats. At the moment it's just a hypothesis among many.

  Enrico