1CPROJ(3P)                  POSIX Programmer's Manual                 CPROJ(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       cproj, cprojf, cprojl — complex projection functions
14

SYNOPSIS

16       #include <complex.h>
17
18       double complex cproj(double complex z);
19       float complex cprojf(float complex z);
20       long double complex cprojl(long double complex z);
21

DESCRIPTION

23       The functionality described on this reference page is aligned with  the
24       ISO C  standard.  Any  conflict between the requirements described here
25       and the ISO C standard is unintentional. This  volume  of  POSIX.1‐2008
26       defers to the ISO C standard.
27
28       These  functions  shall  compute  a  projection  of  z onto the Riemann
29       sphere: z projects to z, except that all complex infinities (even those
30       with  one  infinite part and one NaN part) project to positive infinity
31       on the real axis. If z has an infinite part,  then  cproj(z)  shall  be
32       equivalent to:
33
34           INFINITY + I * copysign(0.0, cimag(z))
35

RETURN VALUE

37       These  functions shall return the value of the projection onto the Rie‐
38       mann sphere.
39

ERRORS

41       No errors are defined.
42
43       The following sections are informative.
44

EXAMPLES

46       None.
47

APPLICATION USAGE

49       None.
50

RATIONALE

52       Two topologies are commonly used in complex  mathematics:  the  complex
53       plane with its continuum of infinities, and the Riemann sphere with its
54       single infinity. The complex plane is better suited for  transcendental
55       functions,  the  Riemann  sphere  for  algebraic functions. The complex
56       types with their multiplicity of infinities provide  a  useful  (though
57       imperfect)  model  for  the  complex  plane. The cproj() function helps
58       model the Riemann sphere by mapping all infinities to one,  and  should
59       be  used  just before any operation, especially comparisons, that might
60       give spurious results for any of the other infinities. Note that a com‐
61       plex  value  with  one infinite part and one NaN part is regarded as an
62       infinity, not a NaN, because if one part is infinite, the complex value
63       is  infinite  independent  of the value of the other part. For the same
64       reason, cabs() returns an infinity if its argument has an infinite part
65       and a NaN part.
66

FUTURE DIRECTIONS

68       None.
69

SEE ALSO

71       carg(), cimag(), conj(), creal()
72
73       The Base Definitions volume of POSIX.1‐2008, <complex.h>
74
76       Portions  of  this text are reprinted and reproduced in electronic form
77       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
78       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
79       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
80       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
81       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
82       event of any discrepancy between this version and the original IEEE and
83       The Open Group Standard, the original IEEE and The Open Group  Standard
84       is  the  referee document. The original Standard can be obtained online
85       at http://www.unix.org/online.html .
86
87       Any typographical or formatting errors that appear  in  this  page  are
88       most likely to have been introduced during the conversion of the source
89       files to man page format. To report such errors,  see  https://www.ker
90       nel.org/doc/man-pages/reporting_bugs.html .
91
92
93
94IEEE/The Open Group                  2013                            CPROJ(3P)
Impressum