6.2.53 cprojl Function

Calculates the a projection of a long double precision complex value onto the Riemann sphere.

Attention: This function is implemented only by MPLAB XC32 C compilers.

Include

<complex.h>

Prototype

long double complex cprojl(long double complex z);

Argument

z
value for which to calculate the projection

Return Value

Returns the a projection of a long double precision complex value, z, onto the Riemann sphere. The projection is such that z is returned, except if z is any complex infinity, in which case a positive infinity is returned.

Example

See the notes at the beginning of this chapter or section for information on using printf() or scanf() (and other functions reading and writing the stdin or stdout streams) in the example code.

#include <stdio.h>
#include <complex.h>
#include <math.h>

int main(void)
{
  long double complex x;

  x = -INFINITY + 1.0*I;
  y = cprojl(x);
  printf("The Riemann plane projection of %Lf + %Lfi is %Lf + %Lfi\n", creall(x), cimagl(x), creall(y), cimagl(y));
}

Example Output

The Riemann plane projection of -inf + 1.000000i is inf + 0.000000i