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

acos.3p (3631B)


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