Can you do modulos with irrational numbers? The other day, I was tutoring a fellow student on modulos, and we came across the topic of modular fractions. As far as I have learned, there are essentially two ways to do modulos with fractions, simply use them as remainders, or actually use some modulo manipulation. As an example I gave him, if you were to do $$9.5 \equiv ? \mod{5}$$ we could just write the answer as $4.5$, that would be the "easy" solution, but instead you could solve the equation $$\frac{19}{2}\equiv \mod{5}$$ $$4\equiv2n \mod{5}$$ $$n\equiv2 \mod{5}$$, so $9.5$ would in fact be equivalent to 2 modulo 5. Now, he asked a very intriguing question, what would $\pi$ be, say, modulo 2? I had no answer. My guess would be to take successively better approximations, but would that converge to one number? Does saying "what is $\pi$ mod 2" even make sense? Or is there no special answer and it's just 1.1415926...
 A: You can interpret modular arithmetic in both of the ways you illustrate, but one of them is a lot more common than the other in mathematics.
The one that's universally understood is the one in which
$$
\frac{19}{2} \equiv 2 \pmod{5}.
$$
The reason is that 
$$
3 \times 2 \equiv 1 \pmod{5}
$$
so $3$ is the multiplicative inverse of $2$ and 
$$
\frac{19}{2} \equiv 19 \times 3 \equiv 2 \pmod{5}.
$$
In that context you would never write $19/2$ as the decimal $9.5$.
Moveover, in that context expressions like $\pi \pmod{5}$ make no sense at all and some that seem to are impossible. For example, $19/2$ makes no sense modulo $6$ since $2$ does not have a multiplicative inverse modulo $6$.
The other way modular arithmetic is sometimes construed (in computer languages rather than pure mathematics) is as the remainder when you subtract the largest possible multiple of the modulus. I don't want to use $\equiv$ to write that because it bothers my mathematical sensitivity so I will use $\%$ as do some programming languages. Then
$$
19.5 \ \% \ 5 = 4.5
$$
and, as you say, 
$$
\pi \ \% \ 2 = \pi - 2 = 1.14159\ldots
$$.
