clog10(3)

πŸ’œ clog10(3) β€” bestie's guide to the base-10 log of a complex number πŸ’œ

okay so this is a page from the Library Functions Manual for clog10, clog10f and clog10l, and honestly? it's giving "niche but iconic". let's get into it 🫢


✨ NAME ✨

clog10, clog10f, clog10l β€” literally just the base-10 logarithm of a complex number, no cap πŸ’…


πŸ“š LIBRARY πŸ“š

Math library, bestie! Link it with -lm and it's known as libm. she's a classics girlie 🌸


🌈 SYNOPSIS 🌈

#define _GNU_SOURCE         /* See feature_test_macros(7) */
#include <complex.h>

double complex clog10(double complex z);
float complex clog10f(float complex z);
long double complex clog10l(long double complex z);

not me casually dropping #define _GNU_SOURCE first β€” the comment there points you at feature_test_macros(7) for the deets, iykyk πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

so a call to clog10(z) is equivalent to:

clog(z)/log(10)

or, just as valid, this little baddie right here:

log10(cabs(c)) + I * carg(c) / log(10)

both slay, both correct ✨

the other two functions (clog10f() and clog10l()) do the exact same task, they just work on float and long double instead of double πŸ¦‹

⚠️ OKAY LISTEN β€” if z is close to zero, that's gonna cause an overflow. that's not a vibe. guard your inputs bestie πŸ˜­πŸ’€

πŸŽ€ ATTRIBUTES πŸŽ€

for what all these fancy words even mean, go peek at attributes(7) β€” she explains it better than me fr fr πŸ™ˆ

  • Interface: clog10(), clog10f(), clog10l()
    • Attribute: Thread safety
    • Value: MT-Safe βœ…

so yeah β€” she's MT-Safe, meaning you can call her from multiple threads at once and she will not start drama 🫢✨


πŸ‘‘ STANDARDS πŸ‘‘

GNU. that's it, that's the whole section, periodt πŸ’…


🌸 HISTORY 🌸

  • Came into the world in glibc 2.1 β€” a whole legend πŸŽ€
  • Heads up though: these identifiers are reserved for future use in C99 and C11. so like... the future said "not me claiming these names" 😭

πŸ”₯ SEE ALSO πŸ”₯

go read these next, bestie, they're all part of the same little friend group:


and that's the whole page, you ate it πŸ’–βœ¨

this icon was brought to you by Linux man-pages 6.20, dated 2026-02-08, and yes it's still repping clog10(3) at the very end like a signature on a love letter πŸ’œπŸ¦‹

πŸ“¦ 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