Wikipedia:Reference desk/Archives/Mathematics/2017 November 15

= November 15 =

remainder vs. modulus
If I divide -17 by 5, I either get -3 with a remainder of -2, or -4 with a modulus of 3. (I'm reasonably sure that "remainder" and "modulus" are the correct terms here, but if not, please let me know.) So the question is, are there different terms for these two different quotients -3 and -4, or for these two different division operations? —Steve Summit (talk) 02:31, 15 November 2017 (UTC)


 * P.S. There's a bunch of information on this topic in our articles Euclidean division and Modulo operation, but I'm not seeing specific answers to my questions there (in part because, perhaps, once you start getting creative there are more than just the two kinds of "division" I described).


 * No I've never seen a particular term for it. It is not often used and doesn't seem useful. Dmcq (talk) 18:58, 15 November 2017 (UTC)
 * Depends how you want to generalise the primary-school idea of a remainder: you could argue that those are always positive, or you could argue that the negatives should proceed to count the other way. But in general I am inclined to agree with Dmcq that this idea isn't really all that useful.
 * (If you try doing long division in a balanced base, like balanced ternary for example, you do need to use negative remainders for positive dividends and divisors, because to continue the algorithm you need to look for the nearest multiple of the divisor, not the greatest one you can use. But that's another story and is also not much more than a curiosity.) Double sharp (talk) 23:43, 15 November 2017 (UTC)
 * Miscellaneous responses:
 * "Modulus" is actually the term for the divisor, that is thing you divide by, not the remainder.
 * Taking the remainder always to be nonnegative is in my opinion much more natural. In particular, it means that the remainder gives you a complete invariant for the equivalence relation of being equal modulo the divisor.
 * However, programming languages often make a different choice. If I understand correctly, for a long time the C++ standard (maybe the C standard too?) allowed either choice.  The only thing the standard required was that if   and , then  . Notwithstanding this formal freedom, almost every actual implementation was set up to round the quotient towards zero, rather than downwards; that is,   and  .  I think that's the wrong choice, but that's the one that was made. Finally in, not sure, maybe C++14, the standard was finally uniformized, and of course given that there was already a de facto standard, naturally they were forced to choose that one, in spite of its inferiority. See standard is better than better.
 * But as to what these choices are called, which I guess was your actual question, I'm afraid I just don't know. --Trovatore (talk) 10:52, 16 November 2017 (UTC)


 * Thanks for the replies.


 * Yes, the question was mostly about what to call them. The difference is significant, but having to say "the kind of division where the remainder has the same sign as the dividend" and "the kind of division where the remainder is always positive" is just way too much of a mouthful.


 * According to our Euclidean division article, the kind where the remainder is always positive is called "Euclidean division". I thought I'd heard the term "FORTRAN division" somewhere, as if maybe that was a way people used to distinguish, but Google isn't backing me up.


 * I can't remember for sure which way the old-C implementations I used went. I thought Ritchie's compiler for the PDP-11 always gave a positive remainder, but I could be wrong.  (I agree it's often much more useful, and I was annoyed that C99 made the choice it did.)


 * I was certainly wrong in imagining that the possibly-negative remainder was called the "remainder" and the never-negative remainder was called the "modulus": our Euclidean division article explicitly calls the never-negative one "remainder", too. —Steve Summit (talk) 15:47, 17 November 2017 (UTC)
 * Well, "modulus" definitely means divisor, not remainder. For the rest of it I don't seem to be much help.  I do see some flaws in the articles you pointed to (for example, one of them has a table with some entries that say "always positive" when it almost certainly means "always nonnegative"; zero is not positive in English, though it confusingly is positif in French).  I may get around to addressing them, or maybe not. --Trovatore (talk) 20:44, 17 November 2017 (UTC)

how do i improved my Math solving ability
i am ten school student. i am very weak in math. please give me some suggestion how to i improved my math logic? www.dpe.gov.bd primary result — Preceding unsigned comment added by 103.51.2.62 (talk) 08:34, 15 November 2017 (UTC)
 * Practice, practice and even more practice. Ruslik_ Zero 20:31, 15 November 2017 (UTC)
 * Agreed. Find a textbook at your level and do all the exercises. And really work them out - do the write-up, not just the thinking, unless you are already very good. --Stephan Schulz (talk) 11:20, 16 November 2017 (UTC)
 * And practice the right things. The best way to test if you have a strong understanding of the material is to try to teach it to someone else. This helps identify what you need to work on.--Jasper Deng (talk) 08:51, 17 November 2017 (UTC)