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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms