cproj, cprojf, cprojl

Retrieves the projection of a complex number on the Reimann sphere.


_Dcomplex cproj(
   _Dcomplex z
_Fcomplex cproj(
   _Fcomplex z
);  // C++ only
_Lcomplex cproj(
   _Lcomplex z
);  // C++ only
_Fcomplex cprojf(
   _Fcomplex z
_Lcomplex cprojl(
   _Lcomplex z
#define cproj(X) // Requires C11 or higher


A complex number.

Return value

The projection of z on the Reimann sphere.


Because C++ allows overloading, you can call overloads of cproj that take and return _Fcomplex and _Lcomplex values. In a C program, unless you're using the <tgmath.h> macro to call this function, cproj always takes and returns a _Dcomplex value.

If you use the <tgmath.h> cproj() macro, the type of the argument determines which version of the function is selected. See Type-generic math for details.


Routine C header C++ header
cproj, cprojf, cprojl <complex.h> <ccomplex>
cproj macro <tgmath.h>

For more compatibility information, see Compatibility.

See also

Alphabetical function reference
norm, normf, norml
creal, crealf, creall
conj, conjf, conjl
cimag, cimagf, cimagl
carg, cargf, cargl
cabs, cabsf, cabsl