Here you can find the source of roundedLog(double value, double exponent)
public static double roundedLog(double value, double exponent)
//package com.java2s; public class Main { public final static double ROUNDED_LOG_PRECISION = 10000; /**//w w w. jav a 2 s .c o m * a rounded logarithm to avoid issues with jvm dependant math functions */ public static double roundedLog(double value, double exponent) { return Math.round(log(value, exponent) * ROUNDED_LOG_PRECISION) / ROUNDED_LOG_PRECISION; } public static double log(double value, double exponent) { return Math.log(value) / Math.log(exponent); } }