lua-users home
lua-l archive

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


On Thu, Jul 3, 2014 at 8:53 AM, zhujun <nj_zhujun@163.com> wrote:
> x=0
> total=10000000
>
> for i=1 , total do
>   x=x+0.01
> end
> y=0.01*total
> print(x)
> print(y)
> print(x==y)


no, it's not wrong.  please check this:

http://floating-point-gui.de/


-- 
Javier