Mod seems to yield wrong result

Issue #1032 new
Former user created an issue

mod((315^49);3233) = 2640

Comments (1)

  1. Mats Rostedt

    Correct value is 2701.
    This is a useful formula for testing:
    mod(a^n;b) = mod(mod(a^(n-m);b)*mod(a*m;b);b)
    All numbers positive and n>=m

  2. Log in to comment