3 ms·
Although it might make sense to define the modulus operator in that way, it doesn't really make sense to define remainders that way: what is the remainder of n/
by jfarmer 11y ago
Although it might make sense to define the modulus operator in that way, it doesn't really make sense to define remainders that way: what is the remainder of n/n?
- TheLoneWolfling 11y agoAs I said in another comment: It ideally shouldn't be called a remainder. I just don't know what else to call it. In this system, n % n is n. (Although note that I'm not even going to try to get into negative values here. "Standard" modulus is bad enough for this - this operator has the same potential choices as "standard" modulo w.r.t. negative values / mods) If you have 1 bin with n items, the nth item is the nth item within the bin within which it is contained. (I hope that's parsable.)
- Retra 11y agoThat's still a remainder, it's just the remainder of the zeroth bin.
- TheLoneWolfling 11y agoNo. One-based indexing everywhere. So 8 / 4 is 2 with a "remainder" of 4. Think about it. If you have a series of bins with 4 items each, and you ask someone to grab the 8th item, where do they go? To the 4th item of the second bin.
- Retra 11y agoThe fourth item of the second bin is the fourth item of the remaining items after you've looked at one bin.
- TheLoneWolfling 11y agoBut it is contained in the second bin.
- Retra 11y agoI get that. I'm not completely stupid. I'm saying that it is still a remainder. It can be a remainder and in the second bin at the same time.