For some $M \in \mathbb{N}$, let $a,b,r,s \in [0, M)$.
Compute the following:
$$ x = (a+r) \mod M$$ $$ y = (b+s) \mod M$$ $$ z = (x \cdot y) \mod M = (a \cdot b + a \cdot s + b \cdot r + r \cdot s) \mod M$$
Assume that the following values are given:
- $M$
- $z$
- $A = (a \cdot s) \mod M$
- $B = (b \cdot r) \mod M$
- $C = (r \cdot s) \mod M$
Is it possible to compute $D = (a \cdot b) \mod M$?
Note that since we are dealing with real numbers (in contrast to integers), we can't simply let:
$$ D = (z - A - B - C) \mod M$$
The reason is discussed by @MichaelHardy in his elegant answer to another question. A counterexample to the above naive computation is as follows:
$$M = 11, \qquad a = 0.1,\quad b = 1.4,\quad r = s = 10$$