@Test
public void testApproxLog() {

    double x = 1e-6;
    for (int i = 0; i < 1000; i++) {
        assertEquals(Math.log(x) / Math.log(2), LogHistogram.approxLog2(x), 0.01);
        x *= 1.0 + Math.PI / 100.0;
    }
    assertTrue("Insufficient range", x > 1e6);
}