http://www.ripmat.it/mate/a/al/alh.html

codice:
#include <math.h>

double log2(double x)
{
        return log(x) / log(2.);
}