lua-users home
lua-l archive

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


Thank you very much for your answers!

Given the changes in Lua 5.3 and the intentional non-specification in Lua 5.2, I'll just won't care about the rounding method.

Thanks again
Marco

On Thu, Oct 9, 2014 at 8:05 PM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> In Lua 5.2.3, the manual does not say, i.e. what happens is
> undefined.

Well, it kind of does it, in a rather obscure way: In the documentation
of 'lua_tointegerx', which is what libraries use to do the conversion :-)

  lua_tointegerx
  ...
  If the number is not an integer, it is truncated in some non-specified
  way.

(But you got the point correctly; the idea is not to say much about it...)

-- Roberto