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

erfc.3p (3992B)


  1. '\" et
  2. .TH ERFC "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. erfc,
  12. erfcf,
  13. erfcl
  14. \(em complementary error functions
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <math.h>
  19. .P
  20. double erfc(double \fIx\fP);
  21. float erfcf(float \fIx\fP);
  22. long double erfcl(long double \fIx\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 the complementary error function 1.0 \-
  30. .IR erf ( x ).
  31. .P
  32. An application wishing to check for error situations should set
  33. .IR errno
  34. to zero and call
  35. .IR feclearexcept (FE_ALL_EXCEPT)
  36. before calling these functions. On return, if
  37. .IR errno
  38. is non-zero or \fIfetestexcept\fR(FE_INVALID | FE_DIVBYZERO |
  39. FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an error has occurred.
  40. .SH "RETURN VALUE"
  41. Upon successful completion, these functions shall return the value of
  42. the complementary error function.
  43. .P
  44. If the correct value would cause underflow,
  45. and is not
  46. representable,
  47. a range error may occur, and
  48. \fIerfc\fR(),
  49. \fIerfcf\fR(),
  50. and
  51. \fIerfcl\fR()
  52. shall return
  53. 0.0, or
  54. (if the IEC 60559 Floating-Point option is not supported) an
  55. implementation-defined value no greater in magnitude than DBL_MIN,
  56. FLT_MIN, and LDBL_MIN, respectively.
  57. .P
  58. If
  59. .IR x
  60. is NaN, a NaN shall be returned.
  61. .P
  62. If
  63. .IR x
  64. is \(+-0, +1 shall be returned.
  65. .P
  66. If
  67. .IR x
  68. is \-Inf, +2 shall be returned.
  69. .P
  70. If
  71. .IR x
  72. is +Inf, +0 shall be returned.
  73. .P
  74. If the correct value would cause underflow and is representable, a
  75. range error may occur and the correct value shall be returned.
  76. .SH ERRORS
  77. These functions may fail if:
  78. .IP "Range\ Error" 12
  79. The result underflows.
  80. .RS 12
  81. .P
  82. If the integer expression (\fImath_errhandling\fR & MATH_ERRNO) is
  83. non-zero, then
  84. .IR errno
  85. shall be set to
  86. .BR [ERANGE] .
  87. If the integer expression (\fImath_errhandling\fR & MATH_ERREXCEPT) is
  88. non-zero, then the underflow floating-point exception shall be raised.
  89. .RE
  90. .LP
  91. .IR "The following sections are informative."
  92. .SH EXAMPLES
  93. None.
  94. .SH "APPLICATION USAGE"
  95. The
  96. \fIerfc\fR()
  97. function is provided because of the extreme loss of relative accuracy if
  98. .IR erf ( x )
  99. is called for large
  100. .IR x
  101. and the result subtracted from 1.0.
  102. .P
  103. On error, the expressions (\fImath_errhandling\fR & MATH_ERRNO) and
  104. (\fImath_errhandling\fR & MATH_ERREXCEPT) are independent of each
  105. other, but at least one of them must be non-zero.
  106. .SH RATIONALE
  107. None.
  108. .SH "FUTURE DIRECTIONS"
  109. None.
  110. .SH "SEE ALSO"
  111. .IR "\fIerf\fR\^(\|)",
  112. .IR "\fIfeclearexcept\fR\^(\|)",
  113. .IR "\fIfetestexcept\fR\^(\|)",
  114. .IR "\fIisnan\fR\^(\|)"
  115. .P
  116. The Base Definitions volume of POSIX.1\(hy2017,
  117. .IR "Section 4.20" ", " "Treatment of Error Conditions for Mathematical Functions",
  118. .IR "\fB<math.h>\fP"
  119. .\"
  120. .SH COPYRIGHT
  121. Portions of this text are reprinted and reproduced in electronic form
  122. from IEEE Std 1003.1-2017, Standard for Information Technology
  123. -- Portable Operating System Interface (POSIX), The Open Group Base
  124. Specifications Issue 7, 2018 Edition,
  125. Copyright (C) 2018 by the Institute of
  126. Electrical and Electronics Engineers, Inc and The Open Group.
  127. In the event of any discrepancy between this version and the original IEEE and
  128. The Open Group Standard, the original IEEE and The Open Group Standard
  129. is the referee document. The original Standard can be obtained online at
  130. http://www.opengroup.org/unix/online.html .
  131. .PP
  132. Any typographical or formatting errors that appear
  133. in this page are most likely
  134. to have been introduced during the conversion of the source files to
  135. man page format. To report such errors, see
  136. https://www.kernel.org/doc/man-pages/reporting_bugs.html .