lua-users home
lua-l archive

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


> 2017-02-09 15:02 GMT+02:00 Martin <eden_martin_fuhrspam@gmx.de>:
> 
> > Sadly (as I understand from similar discussions before) Lua
> > implementation is heavily linked with ANSI C and Roberto generally not
> > willing to introduce changes in logic that is different from ANSI C.
> 
> Roberto might like to speak for himself on this, but IMHO the above
> comment oversimplifies his position.

As Viacheslav pointed out, the comment does not make sense here, as the
discussion started exactly because Lua *is* different from ANSI C in
this particular logic corner. Anyway...

First, the fact that the Lua implementation is heavily linked
with ANSI C does not imply at all that the Lua specification is
linked with ANSI C.

Second, anyone willing to discuss this subject should read the paper
mentioned by Doug ("The Euclidean Definition of the Functions div and
mod"). Unlike C, which currently uses the T-definition, Lua uses the
F-definition, which is one of the definitions that the paper argues to
be "superior to all other ones in regularity and useful mathematical
properties".

-- Roberto