Java Number Power power(double d, int exp)

Here you can find the source of power(double d, int exp)

Description

power

License

Open Source License

Declaration

public static double power(double d, int exp) 

Method Source Code

//package com.java2s;

public class Main {
    public static double power(double d, int exp) {
        double r = 1;
        for (int x = 0; x < exp; x++) {
            r *= d;//from   ww  w. j  av a2  s  .co  m
        }
        return r;
    }
}

Related

  1. pow2ByteIndex(final int x)
  2. pow3_strict(final float a)
  3. pow4(double val)
  4. pow9(final double x)
  5. powDecay(double x, double y)
  6. power(final long x, final long n, final long p)
  7. power(int base, int power)
  8. power(int i)
  9. power(int val, int numOfPower)