Java Number Power pow(long base, long exp)

Here you can find the source of pow(long base, long exp)

Description

Convenience method to calculate the power.

License

Open Source License

Parameter

Parameter Description
base Value to be used as base
exp Value to be used as exponent

Return

base^exp

Declaration

public static long pow(long base, long exp) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**// w ww  . j av  a  2s.co  m
     * Convenience method to calculate the power.
     *
     * @param base Value to be used as base
     * @param exp  Value to be used as exponent
     * @return base^exp
     */
    public static long pow(long base, long exp) {
        return (long) Math.pow(base, exp);
    }
}

Related

  1. pow(int number, int power)
  2. pow(int value, int exp)
  3. pow(int x, int y)
  4. pow(int[] arr, double p)
  5. pow(Integer a, Integer b)
  6. pow(long n, long pow)
  7. pow(long value, long pow)
  8. pow(Number x, Number exponent)
  9. pow(String str, int n)