Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for powMod (0.11 sec)

  1. guava/src/com/google/common/math/LongMath.java

        abstract long mulMod(long a, long b, long m);
    
        /** Returns a^2 mod m. */
        abstract long squareMod(long a, long m);
    
        /** Returns a^p mod m. */
        private long powMod(long a, long p, long m) {
          long res = 1;
          for (; p != 0; p >>= 1) {
            if ((p & 1) != 0) {
              res = mulMod(res, a, m);
            }
            a = squareMod(a, m);
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/math/LongMath.java

        abstract long mulMod(long a, long b, long m);
    
        /** Returns a^2 mod m. */
        abstract long squareMod(long a, long m);
    
        /** Returns a^p mod m. */
        private long powMod(long a, long p, long m) {
          long res = 1;
          for (; p != 0; p >>= 1) {
            if ((p & 1) != 0) {
              res = mulMod(res, a, m);
            }
            a = squareMod(a, m);
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
Back to top