conj(3)
π conj(3) β the complex conjugate girlies π
okay bestie, pull up a chair because this is one of those tiny little libm functions that you're gonna use approximately one million times and never think about again. it's conj, conjf, and conjllβ wait no, it's conjl. three flavors, same slay. β¨
πΈ NAME πΈ
conj, conjf, conjl β literally just calculate the complex conjugate. that's it. that's the whole job. π
π LIBRARY π
Math library, aka libm. and you gotta link it with -lm, okay? if you forget -lm and your linker starts screaming at you, that's not the function's fault, that's a you problem. π«Ά
β¨ SYNOPSIS β¨
#include <complex.h>
double complex conj(double complex z);
float complex conjf(float complex z);
long double complex conjl(long double complex z);
yes bestie, <complex.h> is the moment. include it. the compiler is begging. π
π DESCRIPTION π
so what do these actually do? they hand you back the complex conjugate of z. what does that mean in human language? you take the imaginary part and you flip its sign. that's it. that's the whole transformation. negative becomes positive, positive becomes negative, the real part doesn't move a muscle. iconic behavior, honestly. π
and there's this little identity that goes along with it, and it's lowkey the most beautiful line in the whole page:
cabs(z) = csqrt(z * conj(z))
like. the way that works out. no cap, it's giving math poetry. π¦
π ATTRIBUTES π
"attributes" here is a whole thing, and if you wanna know what the terms even mean, go read attributes(7) β it explains it way better than i can in a group chat. but for these functions specifically:
conj(),conjf(),conjl()β Thread safety: MT-Safe π
translation: you can call these from multiple threads at the same time and they will not fight each other. they're chill. they're not gossipy. they do not start drama. π
β STANDARDS β
certified by:
- C11
- POSIX.1-2008
the officials said yes. periodt. π
πΈ HISTORY πΈ
- glibc 2.1 β when she first showed up on the scene
- C99 β the C standard that claimed her
- POSIX.1-2001 β and POSIX said "yeah, we'll take her too"
a whole glow-up timeline, honestly. π
π«Ά SEE ALSO π«Ά
cabs(3)β the absolute value bestiecsqrt(3)β the square root bestiecomplex(7)β the whole complex numbers overview, read this if you want the full lore
β οΈ real talk for one second: nothing here is dangerous, deprecated, or undefined. it's a pure, well-behaved, MT-Safe function that does exactly one thing. the biggest risk is forgetting -lm and having to type the compile command again. π
and that's the whole page, bestie!! β¨ this little cutie comes to you from Linux man-pages 6.20, dated 2026-02-08, and yes the date is in the future, we don't ask questions around here. go conjugate something. slay. πππ¦π
π¦ 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