Java BigInteger Calculate modPowLong(BigInteger n, long exponent, BigInteger modulo)

Here you can find the source of modPowLong(BigInteger n, long exponent, BigInteger modulo)

Description

mod Pow Long

License

Apache License

Declaration

private static long modPowLong(BigInteger n, long exponent, BigInteger modulo) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.math.BigInteger;

public class Main {
    private static long modPowLong(BigInteger n, long exponent, BigInteger modulo) {
        return n.modPow(BigInteger.valueOf(exponent), modulo).longValue();
    }/*from w w w  .  j ava  2s .co  m*/
}

Related

  1. log2(BigInteger x)
  2. maskBits(BigInteger value, int bits)
  3. min(BigInteger a, BigInteger b)
  4. modPow(BigInteger base, BigInteger e, BigInteger m)
  5. modPowByte(byte[] arg, BigInteger e, BigInteger n)
  6. mods(BigInteger v, BigInteger m)
  7. modulus(BigInteger value, BigInteger divider, int modulo, int... weight)
  8. multi_exponent(BigInteger[] base, BigInteger[] exponent, BigInteger modulus)
  9. multiply(BigInteger x, BigInteger y)