logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

cproj.3p (3528B)


  1. '\" et
  2. .TH CPROJ "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. cproj,
  12. cprojf,
  13. cprojl
  14. \(em complex projection functions
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <complex.h>
  19. .P
  20. double complex cproj(double complex \fIz\fP);
  21. float complex cprojf(float complex \fIz\fP);
  22. long double complex cprojl(long double complex \fIz\fP);
  23. .fi
  24. .SH DESCRIPTION
  25. The functionality described on this reference page is aligned with the
  26. ISO\ C standard. Any conflict between the requirements described here and the
  27. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  28. .P
  29. These functions shall compute a projection of
  30. .IR z
  31. onto the Riemann sphere:
  32. .IR z
  33. projects to
  34. .IR z ,
  35. except that all complex infinities (even those with one infinite part
  36. and one NaN part) project to positive infinity on the real axis. If
  37. .IR z
  38. has an infinite part, then
  39. .IR cproj (\c
  40. .IR z )
  41. shall be equivalent to:
  42. .sp
  43. .RS 4
  44. .nf
  45. INFINITY + I * copysign(0.0, cimag(z))
  46. .fi
  47. .P
  48. .RE
  49. .SH "RETURN VALUE"
  50. These functions shall return the value of the projection onto the
  51. Riemann sphere.
  52. .SH ERRORS
  53. No errors are defined.
  54. .LP
  55. .IR "The following sections are informative."
  56. .SH EXAMPLES
  57. None.
  58. .SH "APPLICATION USAGE"
  59. None.
  60. .SH RATIONALE
  61. Two topologies are commonly used in complex mathematics: the complex
  62. plane with its continuum of infinities, and the Riemann sphere with its
  63. single infinity. The complex plane is better suited for transcendental
  64. functions, the Riemann sphere for algebraic functions. The complex
  65. types with their multiplicity of infinities provide a useful (though
  66. imperfect) model for the complex plane. The
  67. \fIcproj\fR()
  68. function helps model the Riemann sphere by mapping all infinities to
  69. one, and should be used just before any operation, especially
  70. comparisons, that might give spurious results for any of the other
  71. infinities. Note that a complex value with one infinite part and one
  72. NaN part is regarded as an infinity, not a NaN, because if one part is
  73. infinite, the complex value is infinite independent of the value of the
  74. other part. For the same reason,
  75. \fIcabs\fR()
  76. returns an infinity if its argument has an infinite part and a NaN
  77. part.
  78. .SH "FUTURE DIRECTIONS"
  79. None.
  80. .SH "SEE ALSO"
  81. .IR "\fIcarg\fR\^(\|)",
  82. .IR "\fIcimag\fR\^(\|)",
  83. .IR "\fIconj\fR\^(\|)",
  84. .IR "\fIcreal\fR\^(\|)"
  85. .P
  86. The Base Definitions volume of POSIX.1\(hy2017,
  87. .IR "\fB<complex.h>\fP"
  88. .\"
  89. .SH COPYRIGHT
  90. Portions of this text are reprinted and reproduced in electronic form
  91. from IEEE Std 1003.1-2017, Standard for Information Technology
  92. -- Portable Operating System Interface (POSIX), The Open Group Base
  93. Specifications Issue 7, 2018 Edition,
  94. Copyright (C) 2018 by the Institute of
  95. Electrical and Electronics Engineers, Inc and The Open Group.
  96. In the event of any discrepancy between this version and the original IEEE and
  97. The Open Group Standard, the original IEEE and The Open Group Standard
  98. is the referee document. The original Standard can be obtained online at
  99. http://www.opengroup.org/unix/online.html .
  100. .PP
  101. Any typographical or formatting errors that appear
  102. in this page are most likely
  103. to have been introduced during the conversion of the source files to
  104. man page format. To report such errors, see
  105. https://www.kernel.org/doc/man-pages/reporting_bugs.html .