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
- 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