Simple math:
log2 (x) = logy (x) / logy (2)
where y can be anything, which for standard log functions is either 10 or e.
C99 has log2 (as well as log2f and log2l for float and long double).
by James Palmer
Simple math:
log2 (x) = logy (x) / logy (2)
where y can be anything, which for standard log functions is either 10 or e.
C99 has log2 (as well as log2f and log2l for float and long double).