cpow(3)

πŸ’– cpow(3) β€” bestie, we're doing complex powers now

okay so this is cpow from the manual, and it lives in section 3 of the Library Functions Manual. it's giving math-girlie energy and honestly? she ate. let's get into it πŸŽ€


✨ NAME ✨

cpow, cpowf, cpowl β€” the complex power function 🌸


πŸ“š LIBRARY πŸ“š

Math library, and you link it like <rainbow>this:

-lm

aka libm, aka the girlies who do the actual math πŸ’…


🌟 SYNOPSIS 🌟

#include <complex.h>

double complex cpow(double complex x, double complex z);
float complex cpowf(float complex x, float complex z);
long double complex cpowl(long double complex x,
                          long double complex z);

yes bestie, <complex.h> is the passport, you can't get in without it πŸ¦‹


πŸ”₯ DESCRIPTION πŸ”₯

so what do these do? they calculate x raised to the power z β€” that's x to the z, both of them complex, no cap. 🫢

⚠️ tiny but IMPORTANT detail: there's a branch cut for x along the negative real axis. that's not a vibe, that's math, and you gotta respect it. πŸ’€

πŸ’œ ATTRIBUTES πŸ’œ

for the whole explanation of what these terms even mean, go peep attributes(7). but here's the tea for these three functions specifically:

  • Interface: cpow(), cpowf(), cpowl()
  • Attribute: Thread safety
  • Value: MT-Safe

translation: they're MT-Safe, so multiple threads can hang out here at the same time, it's a whole party and nobody's fighting 😌✨


πŸ‘‘ STANDARDS πŸ‘‘

C11, POSIX.1-2008. periodt. πŸ’…


🌈 HISTORY 🌈

came into the world in glibc 2.1, and the standards lore is C99, POSIX.1-2001. so she's been iconic for a minute, we love a veteran πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

go read those next, bestie, it's a whole rabbit hole and i'm obsessed πŸ“


that's the whole page, you're literally a cpow expert now and i'm so proud πŸ˜­πŸ’–

signing off with the receipts: this is from Linux man-pages 6.20, dated 2026-02-08, and yes we stay on our cpow(3) brand. mwah πŸ’œβœ¨

πŸ“¦ 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