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

NAME

12       cproj, cprojf, cprojl — complex projection functions
13

SYNOPSIS

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

DESCRIPTION

22       The functionality described on this reference page is aligned with  the
23       ISO C  standard.  Any  conflict between the requirements described here
24       and the ISO C standard is unintentional. This  volume  of  POSIX.1‐2017
25       defers to the ISO C standard.
26
27       These  functions  shall  compute  a  projection  of  z onto the Riemann
28       sphere: z projects to z, except that all complex infinities (even those
29       with  one  infinite part and one NaN part) project to positive infinity
30       on the real axis. If z has an infinite part,  then  cproj(z)  shall  be
31       equivalent to:
32
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‐2017, <complex.h>
74
76       Portions  of  this text are reprinted and reproduced in electronic form
77       from IEEE Std 1003.1-2017, Standard for Information Technology --  Por‐
78       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
79       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
80       Electrical  and  Electronics Engineers, Inc and The Open Group.  In the
81       event of any discrepancy between this version and the original IEEE and
82       The  Open Group Standard, the original IEEE and The Open Group Standard
83       is the referee document. The original Standard can be  obtained  online
84       at http://www.opengroup.org/unix/online.html .
85
86       Any  typographical  or  formatting  errors that appear in this page are
87       most likely to have been introduced during the conversion of the source
88       files  to  man page format. To report such errors, see https://www.ker
89       nel.org/doc/man-pages/reporting_bugs.html .
90
91
92
93IEEE/The Open Group                  2017                            CPROJ(3P)
Impressum