cproj(3)

πŸ’– cproj β€” project into Riemann Sphere πŸ’–

okay bestie, so this is the cproj page from the Linux man-pages (that's the manual name, mwah) and we're gonna talk about cproj, cprojf, and cprojl β€” the trio that yeets your complex number onto a sphere. no cap. ✨


🌸 LIBRARY 🌸

Math library, that's libm, and you link it with -lm. don't forget the flag, she's sensitive πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <complex.h>

double complex cproj(double complex z);
float complex cprojf(float complex z);
long double complex cprojl(long double complex z);

look at them. three sisters. one job. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: these functions take a point in the plane and project it onto the surface of a Riemann Sphere, which is the one-point compactification of the complex plane. iykyk. 🧚

  • Every finite point z projects to z itself. yes really. she stays exactly where she is, main character energy, no glow-up needed πŸ‘‘
  • Every complex infinite value gets projected to a single infinite value, namely positive infinity on the real axis. so like, all the infinities walk into the function and only one comes out. iconic. πŸŽ€

✨ ATTRIBUTES ✨

for an explanation of the terms used in this section, go peek at attributes(7).

  • Interface: cproj(), cprojf(), cprojl()
  • Attribute: Thread safety
  • Value: MT-Safe

translation: MT-Safe, so she's safe across threads, go forth and be parallel bestie πŸ’œ


🌈 STANDARDS 🌈

C11, POSIX.1-2008. we're standards-compliant and gorgeous. periodt. ⭐


πŸ’€ HISTORY πŸ’€

  • glibc 2.1.
  • C99, POSIX.1-2001.
⚠️ okay now the tea: in glibc 2.11 and earlier, the implementation does something different β€” a stereographic projection onto a Riemann Sphere. so if you're time-travelling back to old glibc, expect drama. not the same girl. 😭

πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page bestie, go project something onto a sphere, you got this πŸ’–

this lil beauty lives in Linux man-pages 6.20, dated 2026-02-08, filed under cproj(3) β€” bye bye, drink water, love u 🫢🌸

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