SyntaxFix
Write A Post
Hire A Developer
Questions
Some cases just worked when I used Math.log10:
public static double log2(int n) { return (Math.log10(n) / Math.log10(2)); }