1CPROJ(P) POSIX Programmer's Manual CPROJ(P)
2
3
4
6 cproj, cprojf, cprojl - complex projection functions
7
9 #include <complex.h>
10
11 double complex cproj(double complex z);
12 float complex cprojf(float complex z);
13 long double complex cprojl(long double complex z);
14
15
17 These functions shall compute a projection of z onto the Riemann
18 sphere: z projects to z, except that all complex infinities (even those
19 with one infinite part and one NaN part) project to positive infinity
20 on the real axis. If z has an infinite part, then cproj( z) shall be
21 equivalent to:
22
23
24 INFINITY + I * copysign(0.0, cimag(z))
25
27 These functions shall return the value of the projection onto the Rie‐
28 mann sphere.
29
31 No errors are defined.
32
33 The following sections are informative.
34
36 None.
37
39 None.
40
42 Two topologies are commonly used in complex mathematics: the complex
43 plane with its continuum of infinities, and the Riemann sphere with its
44 single infinity. The complex plane is better suited for transcendental
45 functions, the Riemann sphere for algebraic functions. The complex
46 types with their multiplicity of infinities provide a useful (though
47 imperfect) model for the complex plane. The cproj() function helps
48 model the Riemann sphere by mapping all infinities to one, and should
49 be used just before any operation, especially comparisons, that might
50 give spurious results for any of the other infinities. Note that a com‐
51 plex value with one infinite part and one NaN part is regarded as an
52 infinity, not a NaN, because if one part is infinite, the complex value
53 is infinite independent of the value of the other part. For the same
54 reason, cabs() returns an infinity if its argument has an infinite part
55 and a NaN part.
56
58 None.
59
61 carg() , cimag() , conj() , creal() , the Base Definitions volume of
62 IEEE Std 1003.1-2001, <complex.h>
63
65 Portions of this text are reprinted and reproduced in electronic form
66 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
67 -- Portable Operating System Interface (POSIX), The Open Group Base
68 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
69 Electrical and Electronics Engineers, Inc and The Open Group. In the
70 event of any discrepancy between this version and the original IEEE and
71 The Open Group Standard, the original IEEE and The Open Group Standard
72 is the referee document. The original Standard can be obtained online
73 at http://www.opengroup.org/unix/online.html .
74
75
76
77IEEE/The Open Group 2003 CPROJ(P)