lua-users home
lua-l archive

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


If you want to do it with code, try this, which shoud work for floats as well:

local inf=1/0
local x=1
local y,f

repeat
	y=x
	x=x*2
until x==inf
x=y

f=x
repeat
	y=x
	f=f/2
	x=x+f
until x==inf

print(y)