lua-users home
lua-l archive

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


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

It is true that the "base implementation" of C (Richie's
UNIX compiler) promoted floats to double. This is allowed,
but is not required by ISO C. 

A conforming ISO C implementation can chose to evaluate
floats by (a) keeping them as floats, (b) promoting them to
double or long doubles, (c) asking a trained monkey for the
result, or (d) many other methods. So, the evaluation of
floats is very implementation dependent (although for
obvious reasons (a) and (b) are most common).

Regards,

Alan
-- 
Dr Alan Watson
Instituto de Astronomía UNAM