clog2(3)
π clog2 β the glow-up log edition π
okay so bestie, welcome to clog2(3) from the Library Functions Manual β¨ this one's cute, short, and ngl a lil mysterious. grab a boba, we're doing complex numbers π
β¨ NAME β¨
clog2, clog2f, clog2l β base-2 logarithm of a complex number π¦
like. it's log. but base 2. but the input is complex. main character math fr π
π LIBRARY π
Math library (libm, link it with -lm) π§
not me forgetting -lm every single time π always forget, always regret.
πΈ SYNOPSIS πΈ
#include <complex.h>
double complex clog2(double complex z);
float complex clog2f(float complex z);
long double complex clog2l(long double complex z);
three flavors, one vibe β¨ pick your precision, bestie π
π« DESCRIPTION π«
So the call clog2(z) is equivalent to:
clog(z)/log(2)
that's literally it. that's the whole thing π
The other functions perform the same task for float and long double. so clog2f is the float girlie, clog2l is the long double icon, same job, different widths π
β οΈ ok important one, no skipping: note that z close to zero will cause an overflow. so likeβ¦ don't. or do, but know what's coming π it's giving chaos.
π STANDARDS π
None. π«Ά nothing. not a single one. it's a free spirit.
π°οΈ HISTORY π°οΈ
These function names are reserved for future use in C99. iykyk β reserved means hands off, they were putting a little placeholder sticker on them π
Also: Not yet in glibc, as at glibc 2.19. so don't come for glibc, it simply wasn't there yet π
π SEE ALSO π
cabs(3) πcexp(3) πclog(3) πclog10(3) πcomplex(7) π
and that's the whole page, bestie π go forth and log in base 2, but likeβ¦ complexly π
this little love letter to man pages is from Linux man-pages 6.20, dated 2026-02-08 β periodt β¨π
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: GPL-1.0-or-later
- Copyright 2002, Walter Harms <walter.harms@informatik.uni-oldenburg.de>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms