# Tag Info

### Why does MATLAB have left division/solve?

Non-commutativity of multiplication a/b calculates $a \cdot b^{-1}$, whereas b\a calculates $b^{-1} \cdot a$. Since matrix ...
• 1,007

### Why does MATLAB have left division/solve?

Solving linear systems is better than inverting The main reason is the one in xigoi's answer, noncommutativity, but let me add that a separate operator is handy to have for matrix operations: ...

### Distinguishing modulo (Euclidean division) from remainder

There are two great articles investigating this question: Division and Modulus for Computer Scientists by Daan Leijen The Euclidean Definition of the Functions div and mod by Raymond Boute In short, ...
• 201
Accepted

### Distinguishing modulo (Euclidean division) from remainder

Given the usefulness of a proper modulo operator to wrap an integer into a range [0, n) e.g. for an array index or generating a random integer in this range, I find ...
• 19.7k

### Ways to have operators for both normal and floor division

Julia's approach to this is to use รท for floor division (with div as an ascii alias)
• 371

### Ways to have operators for both normal and floor division

Some options that don't involve namespaces: Python: a // b Visual Basic: a \ b Pascal: ...
• 2,510
Accepted

### Why is truncated or non-Euclidean division/modulo the norm?

The answer is largely given at the top of the answer by Jules to the question you linked: In short, div-mod operations come in pairs satisfying the equation ...
• 2,428

### Distinguishing modulo (Euclidean division) from remainder

One could always take the route of C's pairs of "and" and "or" operators -- call one % and the other %%.
• 9,067
Accepted

### Ways to have operators for both normal and floor division

You can expand the operator to be more than a single character. For example you could do /int~ and /float~ to disambiguate which ...
• 1,450

### Ways to have operators for both normal and floor division

The Verse language has an interesting approach to this problem, where division of integers returns a value of type rational, further use of which demands explicit ...
• 2,527

### Ways to have operators for both normal and floor division

Scoped configuration The interesting thing of having various divisions is that the code tends to use only one per compilation unit or function. Instead of creating a lot of cruft uncommon operators, ...
• 1,767