Here you can find the source of Power(BigInteger base, int exp)
static public BigInteger Power(BigInteger base, int exp)
//package com.java2s; //License from project: Open Source License import java.math.BigInteger; public class Main { static public BigInteger Power(BigInteger base, int exp) { BigInteger powerResultat = new BigInteger("1"); if (exp == 1) { return base; }/*ww w . j av a2 s . c om*/ if (exp == 0) { return powerResultat; } for (int i = 0; i < exp; ++i) { powerResultat = powerResultat.multiply(base); } return powerResultat; } }