lua-users home
lua-l archive

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


> > n=1 for i = 1,80 do n = n * i end print(n) n1=n
> 7.1569457046264e+118
> > n=1 for i = 80,1,-1 do n = n * i end print(n) n2=n
> 7.1569457046264e+118
> > return n2-n1
> 1.7917957937422e+103
> 
> Only a few googols of difference....

If you print n2/n1 you'll get 1, at least to the 14 decimals shown by default.

In Lua 5.3 you need to do "n=1.0" before each loop.