Jul 15
|
The Math.log() method calculates natural logarithms. If you need to use base 2 then take the natural log and divide it by ln(2)
double log2 = Math.log(x) / Math.log(2);
CategoriesArchives
|
The Math.log() method calculates natural logarithms. If you need to use base 2 then take the natural log and divide it by ln(2) double log2 = Math.log(x) / Math.log(2); |
|