Questions tagged [modulo]
For questions about the modulo operator (usually denoted as "%"), which calculates the remainder of the division between two numbers.
3 questions
10
votes
4
answers
3k
views
Is it plausible to let modulo-by-zero have a well-defined output value, provided that my language is C-like?
By mathematical definition, for every nonnegative integer n and every positive integer d, it holds that the modulo ...
8
votes
1
answer
855
views
Why is truncated or non-Euclidean division/modulo the norm?
Related to, but not the same question: Distinguishing modulo (Euclidean division) from remainder
There are multiple ways a modulo operation can be performed. Most implementations, in C, for example, ...
14
votes
5
answers
2k
views
Distinguishing modulo (Euclidean division) from remainder
The % operator in most programming language provide a remainder from integer division. When both operands are positive all works as expected. But when the number is ...