php/php-src — pull request #337 by marc-mabe (2013-04-29 14:06:36+00:00)
Title: Feature/log2

This PR adds the function `log2`. It works the same as the C function and is an addition to the always translated C functions to PHP like `log1p` and `log10`

It also fixes an issue on 32bit environments calculating the second logarithm as an integer:
```
var_dump(log2(64), (int)log2(64)); // float(6) & int(6)
var_dump(log(64, 2), (int)log(64, 2)); // float(6) & int(5)
```

The method `log2` is part of the C99 standard - so there is no HAVE_LOG2 check done.
(Not tested if some environments doesn't support it)