[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua multiplication problem
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 25 Nov 2005 06:24:18 -0200
> if ( 20425 * .053 ) == 1082.525 then print ("equal") else print ("not
> equal") end
Welcome to the floating-point world: 0.053 dos not have an exact
representation. This has nothing to do with Lua. See
http://lua-users.org/wiki/FloatingPoint
http://docs.python.org/tut/node16.html
--lhf