lua-users home
lua-l archive

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

Do you need to suffix math functions with 'f' (s.a. 'floorf()', 'powf()') or does your compiler use right ones without the suffix?

I think in the current unpatched Lua, functions actually work with double, and then scale down to storing as floats. Each system might be different, though.


Niklas Frykholm kirjoitti 18.3.2008 kello 10:32:

LNUM_FLOAT Problematic. Math functions not ANSI C. Limited or no support on Windows. The only benefit I see is less memory consumption on embedded devices (speedwise, not much difference with LNUM_DOUBLE +LNUM_INT32). Is anyone actually using 'float' currently, and what is the main reason you do?

We're using float. Precision is good enough for our purposes and it saves memory, which also is important for us.

// Niklas