Content
For example
function judge_math_huge()
a = 10
while (a < math.huge)
do
print("a value is:", a)
print("math.huge value is:", math.huge)
print("1/0 result is:", 1/0)
a = a + 1
if a > 20 then
break
end
end
end
judge_math_huge()
The result of these code
a value is: 10
math.huge value is: inf
1/0 result is: inf
a value is: 11
math.huge value is: inf
1/0 result is: inf
a value is: 12
math.huge value is: inf
1/0 result is: inf
a value is: 13
math.huge value is: inf
1/0 result is: inf
a value is: 14
math.huge value is: inf
1/0 result is: inf
a value is: 15
math.huge value is: inf
1/0 result is: inf
a value is: 16
math.huge value is: inf
1/0 result is: inf
a value is: 17
math.huge value is: inf
1/0 result is: inf
a value is: 18
math.huge value is: inf
1/0 result is: inf
a value is: 19
math.huge value is: inf
1/0 result is: inf
a value is: 20
math.huge value is: inf
1/0 result is: inf
Find a conclusion
function math_huge_equal_division_by_zero()
print("math.huge is equal division by zero:", math.huge == 1/0 )
end
math_huge_equal_division_by_zero()
The result of these code
math.huge is equal division by zero: true