public static double log2(double x) {
        return Math.log(x) / LOG2;
    }
@Test
    public void testLog2() {
        System.out.println("log2");
        assertEquals(0, MathEx.log2(1), 1E-6);
        assertEquals(1, MathEx.log2(2), 1E-6);
        assertEquals(1.584963, MathEx.log2(3), 1E-6);
        assertEquals(2, MathEx.log2(4), 1E-6);
    }