lua-users home
lua-l archive

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


2015-11-26 1:31 GMT+08:00 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
> All feedback welcome. Thanks.
> --lhf
>
>

When I found doucments for the floor divide operation, I noticed this:

With the exception of exponentiation and float division, the
arithmetic operators work as follows: If both operands are integers,
the operation is performed over integers and the result is an integer.
Otherwise, if *both* operands are numbers or strings that can be
converted to numbers (see §3.4.3), then they are converted to floats,
the operation is performed following the usual rules for
floating-point arithmetic (usually the IEEE 754 standard), and the
result is a float.

maybe the second both (after "Otherwise") should read as "either"?


-- 
regards,
Xavier Wang.