1
$\begingroup$

It's from a programming language. "%' here is a modulo operation.

(a * 2^32 + b) % c = (((a % c) * (2^32 % c)) + b) % c 
  • 0
    Mmm, probably right :) But I'm not a mathematician, so I would be glad to take a look at some basic articles on this theme.2012-11-13

1 Answers 1

1

In general, if you have two integers

a = j + kc b = l + mc 

Then

ab % c = (j+kc)(l+mc) % c  = (jl + jmc + lkc + kmc^2) % c = jl = (a % c)(b % c) 
  • 0
    Just like (1+2+4+6)/2=(1/2)+1+2+3 (look at the parentheses), (jl + jmc + lkc + kmc^2) / c=(jl/c)+jm+lk+kmc. Think about what that means about (jl + jmc + lkc + kmc^2) % c.2012-11-13