Implementation of %
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Implementation of %
- From: Rici Lake <lua@...>
- Date: 2005年5月18日 10:54:01 -0500
Is there a good reason why % is implemented in terms of floor rather
than fmod? The following seems curiously inconsistent to me:
Lua 5.1 (work6) Copyright (C) 1994-2005 Tecgraf, PUC-Rio
> =-3 % 2
1
> =math.mod(-3, 2)
-1