[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How does Lua round non-integer numbers in standard library ?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 9 Oct 2014 15:05:13 -0300
> 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