cexp2(3)
π cexp2 β bestie edition π
okay so real talk: this page is cexp2 from the cexp2(3) corner of the manual, and it brings its two besties cexp2f and cexp2l along for the ride. it's all about the base-2 exponent of a complex number. yes, complex numbers. yes, base 2. yes, we're thriving. β¨
π LIBRARY
Math library, a.k.a. libm, and you link it like this: -lm π
β¨ SYNOPSIS β¨
first, the drama: you gotta pull in the complex header.
#include <complex.h>
then these three gorgeous signatures walk in:
double complex cexp2(double complex z);
float complex cexp2f(float complex z);
long double complex cexp2l(long double complex z);
three versions, three precisions, one vibe. π¦
πΈ DESCRIPTION πΈ
okay so here's the whole thing, and I mean the whole thing: the function returns 2 raised to the power of z. that's it. that's the function. 2^z, but make it complex. π
π STANDARDS π
ngl, this is the part where it gets a little tragic. π
- these function names are reserved for future use in C99.
- as at glibc 2.31, these functions are not provided in glibc.
so likeβ¦ the name exists, the reservations exist, the functions themselves? not beating the allegations of not existing. π it's giving "coming soon" energy since forever. if you go looking for them in glibc, bestie, they are simply not there. don't @ me, @ the standard. π
π SEE ALSO π
the group chat, if you will:
go read those, they're iconic for real. π«Άπ
that's the whole page, no cap. shoutout to Linux man-pages 6.20, dated 2026-02-08 β the source and the date of this little masterpiece. slay, 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
- 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