You are viewing a single comment's thread. Return to all comments →
Simply write your own 2^x function and use that instead of Math.pow which has an upper limit:
public static long power(int x){ long r = 1; for (int k=0;k<x;k++){ r = r * 2; } return r; }
Seems like cookies are disabled on this browser, please enable them to open this website
Java Datatypes
You are viewing a single comment's thread. Return to all comments →
Simply write your own 2^x function and use that instead of Math.pow which has an upper limit: