lua-users home
lua-l archive

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



On 19-May-05, at 10:22 AM, Javier Guerra wrote:

On Thursday 19 May 2005 5:52 am, Gavin Wraith wrote:
The remainder theorem can be articulated in different
ways and the definition of "remainder" depends on which
you use. For example:

am i the only one that thinks it's weird to discuss so long about
remainder/modulus when there's no integer division?

math.floor(a/b) :)

I think it is important to be precise about the semantics of
mathematical operators.

Personally, I don't really care whether % is remainder or modulus,
but I do think the implementation should be less subject to
rounding errors.

It probably should also be consistent with math.mod, even if that
means changing the definition of math.mod (and possibly adding
math.rem)

R.