0

Can you please help me simplify the relation $9.9 \pmod{13}$?

It may seem like a stupid question (!) but your answers will help me very much. Thank you.

kate
  • 553
Albert
  • 3

2 Answers2

0

Without knowing why you want to know, it's hard to give a correct answer. One answer that might be reasonable is what Python does: find a value between 0 and 12 that differs by a multiple of 13. Here are some examples.

PS C:\eb\python> python
Python 3.4.3 
>>> 9.9%13
9.9
>>> 21.9%13
8.899999999999999
>>>

The last result shows that it's using floating point arithmetic (no surprise).

Ethan Bolker
  • 95,224
  • 7
  • 108
  • 199
0

Any fraction with denominator coprime to $\,13\,$ has a well-defined value modulo $\,13,\,$ namely $\,a/b = ab^{-1},\,$ where $\,\gcd(b,13)=1\,\Rightarrow\,b^{-1}$ exists by Bezout. Grade school fraction arithmetic is valid as long as we only use fractions with denominator coprime to the modulus, e.g.

$${\rm mod}\ 13\!:\,\ 9.9 \equiv \dfrac{99}{10}\equiv \dfrac{-5}{10}\equiv \dfrac{-1}{2} \equiv \dfrac{12}2\equiv 6\qquad $$

Bill Dubuque
  • 272,048
  • Thank you for your answer, it helps me. But I am a little confused about another example with your method. For example if I want to find the 4/3 (four on three) modular 17, how can I find the well-defined value modulo 17? – Albert Apr 23 '15 at 13:41
  • @Albert There are various algorithms to compute modular inverses, e.g. see here and its links. – Bill Dubuque Apr 23 '15 at 14:03