double log2 (double x); float log2f (float x); long double log2l (long double x);
double log2 (double x); float log2 (float x); long double log2 (long double x); double log2 (T x); // additional overloads for integral types
<cmath>
) for the integral types: These overloads effectively cast x to a double
before calculations (defined for T being any integral type).log2x
.
|
|
log2 (1024.000000) = 10.000000 |