log2(3) Library Functions Manual log2(3) log2, log2f, log2l - 2 (libm, -lm) #include double log2(double x); float log2f(float x); long double log2l(long double x); glibc (. feature_test_macros(7)): log2(), log2f(), log2l(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L These functions return the base-2 logarithm of x. On success, these functions return the base-2 logarithm of x. , x 0, 1, , NaN, log(3). math_error(7), , . , , log(3). attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |log2(), log2f(), log2l() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ C11, POSIX.1-2008. glibc 2.1. C99, POSIX.1-2001. , double, SVr4, 4.3BSD. cbrt(3), clog2(3), log(3), log10(3), sqrt(3) () Artyom Kunyov , Azamat Hackimov , Dmitry Bolkhovskikh , Katrin Kutepova , Konstantin Shvaykovskiy , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () . Linux man-pages 6.18 8 2026 . log2(3)