cexp(3)
β¨ cexp(3) β it's giving complex exponential, bestie β¨
okay so real talk, this page lives in section 3 of the manual (that's the library-functions girlies, cexp(3), we been knew π
), and it's genuinely one of the cutest little math pages out there. sit down, sip ur drink, let's go π
πΈ NAME πΈ
cexp, cexpfr wait no β cexp, cexpf, cexpl β the complex exponential function π that's the whole vibe.
π LIBRARY π
Math library, aka libm, and you link it with -lm like a normal person. no cap. π§
π SYNOPSIS π
#include <complex.h>
double complex cexp(double complex z);
float complex cexpf(float complex z);
long double complex cexpl(long double complex z);
three flavours, one queen behaviour: double, float, and long double precision, each one taking its matching complex type. slay. π
π« DESCRIPTION π«
So here's the tea: these functions calculate e β that's 2.71828..., the base of natural logarithms, the iconic irrational number herself β raised to the power of z. β¨
Like, mathematically speaking:
cexp(I * z) = ccos(z) + I * csin(z)
and honestly? that identity is main character energy. it's the whole reason complex exponentials show up everywhere in signals and physics and all that. you're welcome. π¦
π₯ ATTRIBUTES π₯
if you're confused about what any of these fancy words mean, go read attributes(7), she explains everything. for real.
cexp(),cexpf(),cexpl()β Thread safety:MT-Safeβ but like, of course they are. iconic, no notes.
ngl the original had a whole table here but the info is just: all three of these bad boys are MT-Safe, periodt. π«Ά
β STANDARDS β
C11POSIX.1-2008
that's the standard-compliance vibe check and they both passed. no cap. π
π§ HISTORY π§
- glibc 2.1 β when she first showed up in glibc π
C99,POSIX.1-2001β where she was standardised first
a true legend. she's been in the game for a minute. π
π SEE ALSO π
the whole friend group, go say hi:
and that's the page bestie!! ππ this love letter comes to you courtesy of Linux man-pages 6.20, dated 2026-02-08 β so if you cite it, cite it cute. go forth and compute ur complex exponentials. obsessed with you. bye!! π¦β¨π
π¦ 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