It's been a while since I had to do anything like this, but I think that thiswill work:public static double calcExponent(double b, double y){return (Math.log(y) / Math.log(b));}