Performance improvement for log2() function.
See http://chdk.setepontos.com/index.php?topic=10707.msg105390#msg105390
Also changed implementation from using log10() to log() (testing shows log() approx 10% faster).