It was thus said that the Great Egor Skriptunoff once stated:
Hi!
It appears that in Lua 5.3 usual call to tonumber() is not enough
to correctly parse numbers entered by user from file or keyboard.
For example,
local googol = tonumber("1"..("0"):rep(100))
gives zero (instead of 1e+100 as in previous Lua versions).
I've read the other messages in this thread, and my question is: why was
the behavior of tonumber() even changed for Lua 5.3? Have it always return
a double because math.tointeger() exists to parse integers. You want a
number, use tonumber(). You want to ensure you parse an integer, use
math.tointeger(). That would at least prevent problems like this from
happening in the first place.