[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
**Subject**: **Re: Bug modulo operator on negative numbers**
**From**: Roberto Ierusalimschy <roberto@...>
**Date**: Mon, 16 Aug 2021 12:52:31 -0300

> There are several variants of modulo operations,[1] and the documentation
> isn't very clear on which variant is used by Lua. [...]
The manual says (3.4.1):
Modulo is defined as the remainder of a division that rounds the
quotient towards minus infinity (floor division).
I think that defines univocally what variant Lua uses.
-- Roberto