Here you can find the source of pow(long base, long exp)
Parameter | Description |
---|---|
base | Value to be used as base |
exp | Value to be used as exponent |
public static long pow(long base, long exp)
//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); } }