15 Jul
2010
15 Jul
'10
5:14 p.m.
AMDG Paul A. Bristow wrote:
Murilo Adriano wrote:
I implemented a function [0] which computes the logarithm in base two of integers and want to know what naming is most appropriated:
ilog2
or simply
log2
My instinct is for log2 so it might be specialised for floating point too.
log2 conflicts with the C++0x library which works with floating point (and returns a double when it's given an integer). Also, does the function compute floor(log2(x)) or ceil(log2(x))? In Christ, Steven Watanabe