I think the answer has something to do with 22 - 10 = 11, where 22 is a multiple of 11 which is greater than 12.
Why doesn't the % (in C) and a calculator give the correct answer?
Hello
I really hope someone can help me with this.
I am reading lecture notes and it says the following -
-12 mod 11 = 10
-1 mod 11 = 10
When I do -12 mod 11 and -1 mod 11 on my calculator I get -1 for both.
Is there a trick or something extra I am missing here?
Note I am dealing with finite fields.
Any help greatly appreciated.
Thanks
Hello,
If a mod n=b, this means that (a-b) is a multiple of n.
Another thing is : if a mod n=b, then a mod n is also equal to b+nk, for any k in
Here, -12 mod 11=-12, ok
Adding 11, -12 mod 11=-1
-1 mod 11=-1, ok
Adding 11, -1 mod 11=10
If a mod n=b, and b mod n=c, then a mod n is also equal to c. This can help for further things...
Because they should nto be equal signs, they are congruent, not equal. They are in the same equivalence classes, which are represented with This is like saying "your house is like my house because they each have garages" thus we have created an equivalence class of buildings with garages. That does not mean that your house is the same as my house, it just means they are congruent.
So
This is because
-12 = (0)11 -12
-12 = (-1)11 -1
-12 = (-2)11 +10
With mod 11, we have 11 equivlance classes: 0-10
(note that eleven is congruent to zero) and the integers in those classes may not be equal, but they will all return the same remainder when divided by eleven.
You can try it, type in -12/11, -1/11, 10/11 in your calculator, notice that they all have a remainder of .90 repeating