Infinitive number in lua
7 replies



Code:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
function getInf()
local num = 0
while (true) do
num = num + 1
end
return num
end
local num = 0
while (true) do
num = num + 1
end
return num
end
Just kidding, use
math.huge
.Reference: http://lua-users.org/wiki/MathLibraryTutorial
Look at me standing, here on my own again
@
Mami Tomoe: Oh man...I will give you a deep thank when you left Tomoe Mami


local infinity = 2^1024
or local infinity = 1/0
Your welcome.


@
The Dark Shadow: It's higher than the maximum number Lua can display, I presume.

Look at me standing, here on my own again



