lua-users home
lua-l archive

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


On Tuesday 16 October 2007, Asko Kauppi wrote:
> Isn't fixed point code just using int32/64, and making input/output
> of numbers seem they're fractional?  Like 1000 -> 1.0 or just 1.

for addition/substraction it's enough; but if 1000 stands for 1.0, then 
1.0*1.0 would give you 1000.0! (1000*1000=1000000 => 1000.0)

so, most fixed-point libraries do continuous rescaling for simple operations


-- 
Javier

Attachment: pgp233OB2pvK1.pgp
Description: PGP signature