What are the rules for basic algebra when modulo real numbers are involved That is, real numbers modulo an integer. I'm just interested in shuffling around the $+$, $-$, $*$, and $/$ operations.
In case a concrete example helps, here's my current problem. (I'm from a programming background so there's probably a notation disconnect, sorry about that.)
$$ LI(x) = (LI_0 + x / PI) \bmod 1 $$
$$ LF(x) = (LF_0 + x / PF) \bmod 1 $$
$$ LI(s) + 0.5 = LF(f) $$
$$ f = s + PT / 2 $$
I need to find a solution for $s$, given $LI_0$, $LF_0$, $PI$, $PF$ and $PT$.
Also I think I might have a solution by dropping the "$\bmod 1$"s, solving for $s$ and then modding that by:
$$\frac{1}{ \left| \frac{1}{PI} - \frac{1}{PF} \right| }$$
But I can't tell if that actually works because it introduces an enormous rounding error.
Also, while this is the problem at hand and solving it is my immediate goal, I really want to understand how to generate that solution, for next time.
 A: Addition and subtraction are well-behaved, since the "circle group" is an abelian group.
Multiplication doesn't work: $2/3$ is the same as $-1/3$ and $3/5$ is the same as $-2/5$, but $(2/3)\cdot(3/5)$ doesn't end up being the same as $(-1/3)\cdot(-2/5)$.
A: So, what you need first of all is $LIo + \frac{s}{PI} + \frac{1}{2} = LFo + \frac{s + PT/2}{PF} + n$ for some integer $n$.  That can be solved in the usual way (in terms of $n$):
$$ s = \frac{(2 LFo PF+PT-PF+2 n PF-2 LIo PF) PI}{2 (PF - PI)} $$
The only other requirement is that you need $\{ LIo + \frac{s}{PI} \} < \frac{1}{2}$.
You'll have to see which $n$ will make that work.  Given particular values of the parameters, that should be either easy or impossible.  
For example, I tried $LFo=1,LIo=2,PF=3,PI=4,PT=5$, obtaining $s = 8 - 12 n$.  Then
$\{LIo + \frac{s}{PI}\} = \{4 - 3 n\} = 0$, so this works for any $n$. 
On the other hand, with $LFo=1,LIo=2,PF=3,PI=5,PT=6$ I get $s = \frac{15 - 30 n}{4}$
and $\{LIo + \frac{s}{PI}\} = \{ \frac{11 - 6 n}{4} \}$.  Now you need $11 - 6 n \equiv 0 \text{ or } 1 \mod 4$: 0 is impossible, but any odd $n$ will give you 1. 
