You don't need NaN (or Inf) to have unexpected behaviour with floats and naive loops in lua, using 1e52 is enough. Conflating floating point and integers (independent of encoding) is always a bit of a trap.
hypot(Inf, NaN) == Inf
See also: https://news.ycombinator.com/item?id=48855045
You don't need NaN (or Inf) to have unexpected behaviour with floats and naive loops in lua, using 1e52 is enough. Conflating floating point and integers (independent of encoding) is always a bit of a trap.