Pow function

@param ndArray the ndarray to raise hte power of
@param power   the power to raise by
@return the ndarray raised to this power
767875
public static INDArray pow(INDArray ndArray, Number power) {
        return pow(ndArray, power, true);

    }
1093907
public static Expression power(Number value1, Number value2) {
        return power(x(value1), x(value2));
    }
1154370
public Rational pow(BigInteger exponent) throws NumberFormatException {
        /* test for overflow */
        if (exponent.compareTo(MAX_INT) == 1) {
            throw new NumberFormatException("Exponent " + exponent.toString() + " too large.");
        }
        if (exponent.compareTo(MIN_INT) == -1) {
            throw new NumberFormatException("Exponent " + exponent.toString() + " too small.");
        }
        /* promote to the simpler interface above */
        return pow(exponent.intValue());
    }
833727
func pow(a, b int) int {
	p := 1
	for b > 0 {
		if b&1 != 0 {
			p *= a
		}
		b >>= 1
		a *= a
	}
	return p
}
1190754
public static DoubleBinding pow(final ObservableDoubleValue a, final double b) {
        return createDoubleBinding(() -> Math.pow(a.get(), b), a);
    }
1208818
private static long longMultiplyPowerTen(long val, int n) {
        if (val == 0 || n <= 0)
            return val;
        long[] tab = LONG_TEN_POWERS_TABLE;
        long[] bounds = THRESHOLDS_TABLE;
        if (n < tab.length && n < bounds.length) {
            long tenpower = tab[n];
            if (val == 1)
                return tenpower;
            if (Math.abs(val) <= bounds[n])
                return val * tenpower;
        }
        return INFLATED;
    }
1194211
public static double[] pow(double[] x, double n) {
        double[] array = new double[x.length];
        for (int i = 0; i < x.length; i++) {
            array[i] = Math.pow(x[i], n);
        }
        return array;
    }
528118
public Rational pow(int exponent) {
        if (exponent == 0) {
            return new Rational(1, 1);
        }
        BigInteger num = a.pow(Math.abs(exponent));
        BigInteger deno = b.pow(Math.abs(exponent));
        if (exponent > 0) {
            return (new Rational(num, deno));
        } else {
            return (new Rational(deno, num));
        }
    }
787042
@Override
    public Geldbetrag scaleByPowerOfTen(int power) {
        BigDecimal scaled =
                betrag.scaleByPowerOfTen(power).setScale(context.getMaxScale(), context.get(RoundingMode.class));
        return Geldbetrag.valueOf(scaled, getCurrency(), context);
    }
1345876
func Pow(base, power uint) uint64 {
	n := uint64(1)
	ubase := uint64(base)
	for power > 0 {
		n *= ubase
		power--
	}

	return uint64(n)
}
1133906
public static DoubleMatrix powi(DoubleMatrix x, double d) {
		if (d == 2.0)
			return x.muli(x);
		else {
			for (int i = 0; i < x.length; i++)
				x.put(i, (double) Math.pow(x.get(i), d));
			return x;
		}
	}
246294
public Pair<Double, INDArray> nn(INDArray point) {
        return nn(root, point, rect, Double.POSITIVE_INFINITY, null, 0);
    }
262494
public static Number power(Number self, Number exponent) {
        double base, exp, answer;
        base = self.doubleValue();
        exp = exponent.doubleValue();

        answer = Math.pow(base, exp);
        if ((double) ((int) answer) == answer) {
            return (int) answer;
        } else if ((double) ((long) answer) == answer) {
            return (long) answer;
        } else {
            return answer;
        }
    }
74420
def nhill_a(self,x,threshold=0.1,power=2,ichild=2):
        
        x_pow = np.power(x,power)
        threshold_pow = np.power(threshold,power)
        return x_pow / (x_pow + threshold_pow) * (1 + threshold_pow)
997652
private BigInteger bigMultiplyPowerTen(int n) {
        if (n <= 0)
            return this.inflated();

        if (intCompact != INFLATED)
            return bigTenToThe(n).multiply(intCompact);
        else
            return intVal.multiply(bigTenToThe(n));
    }
1354864
public static void pow(ComplexPolar_F64 a , int N , ComplexPolar_F64 result )
    {
        result.r = Math.pow(a.r,N);
        result.theta = N*a.theta;
    }
366479
public function pow($b)
    {
        switch (true) {
            case $b instanceof Vector:
                $c = $this->powVector($b);
                break;

            case $b instanceof Matrix:
                $c = $this->powMatrix($b);
                break;

            case is_int($b) or is_float($b):
                $c = $this->powScalar($b);
                break;

            default:
                throw new InvalidArgumentException('Cannot raise vector'
                    . ' to a power of a ' . gettype($b) . '.');
        }

        return $c;
    }