cprojf, cproj, cprojl - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# cprojf, cproj, cprojl

From cppreference.com
< c‎ | numeric‎ | complex

Defined in header `<complex.h>` |  |
float cprojf( float complex z ); |  | (since C99)
double cproj( double complex z ); |  | (since C99)
long double cprojl( long double complex z ); |  | (since C99)

Computes the projection of `z` on the Riemann sphere.

| This section is incomplete

### [edit] Parameters

z | - | complex argument

### [edit] Return value

The projection of `z` on the Riemann sphere.

### [edit] Example

Run this code

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

    int main(void)
    {
        double complex z = cproj(INFINITY+2.0*I);
        printf("%.1f%+.1fi\n", creal(z),cimag(z));

        return 0;
    }

Output:

    inf+0.0i

### [edit] See also

C++ documentation for proj

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/numeric/complex/cproj&oldid=71705"
Category:

- Todo without reason