lua-users home
lua-l archive

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


Hi,

Ignacio Castano wrote:
> 
> Sebby wrote:
> > One of the issues is the fact that Lua numerial format is double
> > precision floats. This isn't a problem on PC and DC. But PS2 is
> > optimized for single precision and often uses software emulation for
> > double precision. So i'll have to see if there is a way to get Lua to
> > use single precision to avoid arithmetic slowdowns on PS2.
> 
> that's one of the things i would like to see in the future, an easy way
> of switching from double to floats.

For 3.2 I posted a patch once (int-lua or so).  It allows you to
switch between long/float/double and long-Lua will not use any
floating point stuff.  But beware of floats.  In C, float is only
a storage format.  Everything else is done in doubles.  So a
float-Lua just saves some bytes but still uses double arithmetic.

Ciao, ET.