@Test public void linearToLogTest() { LogMath.LinearToLogConverter converter = new LogMath.LinearToLogConverter(Math.E); Assert.assertEquals(Math.log(2), converter.convert(2), 0.00000001d); converter = new LogMath.LinearToLogConverter(10d); Assert.assertEquals(Math.log10(2), converter.convert(2), 0.00000001d); }
public static double log(double base, double val) { return Math.log(val) / Math.log(base); }
LogMath { public static double log(double base, double val) { return Math.log(val) / Math.log(base); } }
LogMath { public static double log(double base, double val) { return Math.log(val) / Math.log(base); } private  LogMath(); }
LogMath { public static double log(double base, double val) { return Math.log(val) / Math.log(base); } private  LogMath(); static double logSum(double logA, double logB); static double logSum10(double log10A, double log10B); static double logSum(double... logValues); static double log(double base, double val); static double log2(double input); static double log10ToLog(double log10Value); static double toLogSphinx(double logValue); static void main(String[] args); }
LogMath { public static double log(double base, double val) { return Math.log(val) / Math.log(base); } private  LogMath(); static double logSum(double logA, double logB); static double logSum10(double log10A, double log10B); static double logSum(double... logValues); static double log(double base, double val); static double log2(double input); static double log10ToLog(double log10Value); static double toLogSphinx(double logValue); static void main(String[] args); static final double LOG_ZERO; static final double LOG_ONE; static final double LOG_TEN; static final double LOG_TWO; static final double INVERSE_LOG_TWO; static final float LOG_ZERO_FLOAT; static final float LOG_ONE_FLOAT; static final float LOG_TEN_FLOAT; static final float LOG_TWO_FLOAT; static final LogSumLookup LOG_SUM; static final LogSumLookupFloat LOG_SUM_FLOAT; static final LinearToLogConverter LINEAR_TO_LOG; static final LinearToLogConverterFloat LINEAR_TO_LOG_FLOAT; }