Here you can find the source of minDeg2Bigger(long number)
public static long minDeg2Bigger(long number)
//package com.java2s; //License from project: Open Source License public class Main { /**/*ww w.ja v a 2 s . c om*/ * Calculate the minimum number n, that: <br/> * 1) n >= number; <br/> * 2) n = 2<sup>k</sup> for some number k <br/> */ public static long minDeg2Bigger(long number) { long result = 1; while (result < number) result <<= 1; return result; } }