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
- 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