Jump to content

Find first and last set bit of a long integer: Difference between revisions

Line 1,307:
System.out.print(String.format("%-7s%s%s", "1302 ^ ", i, " = "));
System.out.print(String.format("%1$" + 64 + "s", powerOf1302.toString(2)).replace(" ", "0"));
String line = String.format("%s%-2s%s%-2s", " -> LSB: ", LSB(powerOf1302), ", MSB: ", MSB(powerOf1302)));
System.out.println(line);
String.format("%s%-2s%s%-2s", " -> LSB: ", LSB(powerOf1302), ", MSB: ", MSB(powerOf1302)));
powerOf1302 = powerOf1302.multiply(bigInteger1302);
}
915

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.