Java Number Power pow(double number)

Here you can find the source of pow(double number)

Description

pow

License

Open Source License

Declaration

public static int pow(double number) 

Method Source Code

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

public class Main {

    public static int pow(double number) {
        if (number < 2)
            return 2;
        int i = 1;
        int result = 0;
        while (result < number) {
            result = (int) Math.pow(2, i++);
        }/*w  w  w .  ja  v a  2  s .c o m*/
        return result;
    }
}

Related

  1. pow(double a, int b)
  2. pow(double base, double exp)
  3. pow(double base, int exp)
  4. pow(double base, int exp)
  5. pow(double base, int exponent)
  6. Pow(double val, Object in)
  7. Pow(double value)
  8. pow(double value)
  9. pow(double x, double y)