lua-users home
lua-l archive

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


> Rounding has many variations and in the absence of specific information
> "in some unspecified way" is the best one can say. The error is never
> more than 0.5,though.
> 
> So if the intention of the Manual is merely to say that a Number will be
> rounded or truncated, nobody can say which, it should say "converted
> to an integer in  some unspecified way". If the intention is to say the integer
> will be the closest but to leave open the ambiguous case, it should say
> "rounded in  some unspecified way." But "truncated" is a precise term, it
> is never "in some unspecified way".

"Converted to an integer in some unspecified way" means nothing, as
already pointed out. For instance, a result of zero all the time would
be correct.

The manual probably should say something like this:

  If the number is within the range of lua_Integer, it is rounded to
  an integer in some unspecified way. Otherwise, it is converted to an
  integer in some unspecified way.

-- Roberto