lua-users home
lua-l archive

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


hello,

i wrote the following snippet (my first attempt at lua code);
-- power generator begin
function power(n)
  local x = 2
  for i = 2, n do
    x = x * 2
  end
  return x
end

print(power(1024))
-- power generator end

i ran it with 'lua52 square.lua' which gave me an output of "inf".

is there any way to find out the largest number lua can handle?

thanks,

~mayuresh