[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Fixed-point LUA_NUMBER
- From: Javier Guerra Giraldez <javier@...>
- Date: Tue, 16 Oct 2007 08:29:14 -0500
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:
pgpI3NBN3nLnf.pgp
Description: PGP signature