public static String bcpow(Environment env, Memory base, Memory exp, int scale) {
        BigDecimal baseD = toBigDecimal(base);
        BigDecimal expD = toBigDecimal(exp);

        BigInteger expI = expD.toBigInteger();
        return bcpowImpl(baseD, expI, scale).toPlainString();
    }
bcmath extension
http://www.php.net/manual/ru/book.bc.php
exts/jphp-zend-ext/src/main/java/org/develnext/jphp/zend/ext/standard/BCMathFunctions.java