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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms