1LOG2(3) Linux Programmer's Manual LOG2(3)
2
3
4
6 log2, log2f, log2l - base-2 logarithmic function
7
9 #include <math.h>
10
11 double log2(double x);
12 float log2f(float x);
13 long double log2l(long double x);
14
15 Compile with -std=c99; link with -lm.
16
18 The log2() function returns the base 2 logarithm of x.
19
21 The log2() function can return the following error:
22
23 EDOM The argument x is negative.
24
25 ERANGE The argument x is zero. The log of zero is not defined (minus
26 infinity).
27
29 SVr4, 4.3BSD, C89. The float and long double variants are C99 require‐
30 ments.
31
33 cbrt(3), clog2(3), sqrt(3)
34
35
36
37 2002-07-27 LOG2(3)