Here you can find the source of pow(double number)
public static int pow(double number)
//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; } }