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
21

DESCRIPTION

23       These functions shall compute  a  projection  of  z  onto  the  Riemann
24       sphere: z projects to z, except that all complex infinities (even those
25       with one infinite part and one NaN part) project to  positive  infinity
26       on  the  real  axis. If z has an infinite part, then cproj( z) shall be
27       equivalent to:
28
29
30              INFINITY + I * copysign(0.0, cimag(z))
31

RETURN VALUE

33       These functions shall return the value of the projection onto the  Rie‐
34       mann sphere.
35

ERRORS

37       No errors are defined.
38
39       The following sections are informative.
40

EXAMPLES

42       None.
43

APPLICATION USAGE

45       None.
46

RATIONALE

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

FUTURE DIRECTIONS

64       None.
65

SEE ALSO

67       carg(), cimag(),  conj(),  creal(),  the  Base  Definitions  volume  of
68       IEEE Std 1003.1-2001, <complex.h>
69
71       Portions  of  this text are reprinted and reproduced in electronic form
72       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
73       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
74       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
75       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
76       event of any discrepancy between this version and the original IEEE and
77       The  Open Group Standard, the original IEEE and The Open Group Standard
78       is the referee document. The original Standard can be  obtained  online
79       at http://www.opengroup.org/unix/online.html .
80
81
82
83IEEE/The Open Group                  2003                            CPROJ(3P)
Impressum