### Question:
LogMath { public static double log2(double input) { return Math.log(input) * INVERSE_LOG_TWO; } 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; }### Answer:
@Test public void testLog2() { Assert.assertEquals(2, LogMath.log2(4), 0.0001); Assert.assertEquals(3, LogMath.log2(8), 0.0001); Assert.assertEquals(10, LogMath.log2(1024), 0.0001); Assert.assertEquals(-1, LogMath.log2(0.5), 0.0001); }