lua-users home
lua-l archive

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


On Wed, 14 Nov 2018 at 19:55, Egor Skriptunoff
<egor.skriptunoff@gmail.com> wrote:
>       local function f()
>          local tm = os.clock()
>          local o = 0
>          for j = 1, 1e4 do
>             local x = 0
>             for k = 1, 1e5 do
>                x = x ~ (j + k)
>             end

What's interesting is that Lua's parser think 1e5 is floating point
... whereas 10000 is integer.
That's why I had to change the limit to 10000 in the type annotated version.

Regards