Talk:modulo

Definition from Wiktionary, the free dictionary
Jump to: navigation, search

Don't different programming languages handle the modulo function differently for negative numbers? How detailed should this entry be? --Connel MacKenzie 06:37, 10 December 2006 (UTC)

Yes. I think w:Modulo_operation can handle the details well enough. We might say something like:
(programming languages) An operation on numbers, typically defined as modulo(x,m) = x - m \left ( trunc \left ( \frac{x}{m} \right ) \right).
Cynewulf 07:17, 10 December 2006 (UTC)

Is there a derivation?