Re: duplicated modulo

Bogdan Cristea <[email protected]> Fri, 1 Apr 2011 11:30:46 +0200
Newsgroups gmane.linux.c-programming
Organization Institut Jean le Rond d'Alembert
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
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html