Re: duplicated modulo

Bogdan Cristea <[email protected]> Fri, 1 Apr 2011 11:30:46 +0200
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
On Friday, April 01, 2011 12:19:16 pm you wrote:
> Sure. But I fail to see where between
> 
> a %= b;
> a %= b;
> 
> and
> 
> a = (a % b) % b;
> 
> and
> 
> a %= b;
> 
> would be a difference?

That is basic math. Once you have obtained the remainder of the division by b, 
taking the second time the remainder makes no sense.

-- 
Bogdan Cristea