[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LNUM 2008 patch is ready :)
- From: Asko Kauppi <askok@...>
- Date: Tue, 18 Mar 2008 11:33:19 +0200
Yes. One of the goals of LNUM patch has been to use the _actual_
float-type functions when available.
At least on PocketPC (embedded Visual C++ 4.0) this was an issue, if I
recall right. Then again, I haven't tried LNUM on that lately. Maybe I
In my opinion, if floats are regarded important, Lua should compile to
floats without using/needing _any_ double precision constants or
Bogdan Marinescu kirjoitti 18.3.2008 kello 11:26:
I think so too, actually. The standard <math.h> works with doubles
on all 32-bit systems I saw so far.
On Tue, Mar 18, 2008 at 11:19 AM, Asko Kauppi
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
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
>> 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