Post a New Question

Math

posted by .

How do I solve for negative modular arithmetic?

Here is an example: -45 mod 13 = 7, but how?

  • Math -

    a mod b = (a + nb) mod b

    so, -45 mod 13 = mod (-45 + 52) mod 13 = 7 mod 13 = 7

    Just add a big enough multiple of the modulus so you have a positive number.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

More Related Questions

Post a New Question