Skip to main content

Questions tagged [division]

For questions regarding division, either floor division, ceiling division, or division without rounding.

Filter by
Sorted by
Tagged with
19 votes
3 answers

Why does MATLAB have left division/solve?

In MATLAB (and Octave), the \ (or mldivide) and \. operators are provided with the exact ...
Adám's user avatar
  • 3,156
13 votes
5 answers

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 ...
CPlus's user avatar
  • 8,321
7 votes
1 answer

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, ...
CPlus's user avatar
  • 8,321
6 votes
6 answers

Ways to have operators for both normal and floor division

I want to have an operator for true division (like / in python) giving a float as the result and floor division (like // in ...
MarcellPerger's user avatar