0
$\begingroup$

Rest assured, it makes sense in context. Assume positive values only.

How do I calculate (((i * j) modulo 2^64) / k) modulo 2^64 and get the same result as ( (i * j) / k ) modulo 2^64?

  • 0
    Please reveal the context this makes sense in. Do you mean you want conditions on $i$, $j$, and $k$ that will guarantee this? $k=\pm 1$ or $ij < 2^{64}$ ought to do it.2012-10-13
  • 0
    They are congruent mod $2^{64}$. So it suffices to normalize them, i.e. pick some canonical system of residue representatives (e.g. least positive residues), then normalize the result so that it lies in that range.2012-10-13
  • 0
    Sorry; I need to decompose the first equation into a series of equations which, when a set of i, j and k numbers are run through them, give the same final result as the second equation.2012-10-13
  • 0
    What do you mean by "decomposing" an expression into another when there are values where the two expression _give different results_?2012-10-13

1 Answers 1