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

tanh.3p (3615B)


  1. '\" et
  2. .TH TANH "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. tanh,
  12. tanhf,
  13. tanhl
  14. \(em hyperbolic tangent functions
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <math.h>
  19. .P
  20. double tanh(double \fIx\fP);
  21. float tanhf(float \fIx\fP);
  22. long double tanhl(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 hyperbolic tangent of their argument
  30. .IR 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 hyperbolic
  42. tangent of
  43. .IR x .
  44. .P
  45. If
  46. .IR x
  47. is NaN, a NaN shall be returned.
  48. .P
  49. If
  50. .IR x
  51. is \(+-0,
  52. .IR x
  53. shall be returned.
  54. .P
  55. If
  56. .IR x
  57. is \(+-Inf, \(+-1 shall be returned.
  58. .P
  59. If
  60. .IR x
  61. is subnormal, a range error may occur
  62. .br
  63. and
  64. .IR x
  65. should be returned.
  66. .P
  67. If
  68. .IR x
  69. is not returned,
  70. \fItanh\fR(),
  71. \fItanhf\fR(),
  72. and
  73. \fItanhl\fR()
  74. shall return an implementation-defined value no greater in magnitude
  75. than DBL_MIN, FLT_MIN, and LDBL_MIN, respectively.
  76. .SH ERRORS
  77. These functions may fail if:
  78. .IP "Range\ Error" 12
  79. The value of
  80. .IR x
  81. is subnormal.
  82. .RS 12
  83. .P
  84. If the integer expression (\fImath_errhandling\fR & MATH_ERRNO) is
  85. non-zero, then
  86. .IR errno
  87. shall be set to
  88. .BR [ERANGE] .
  89. If the integer expression (\fImath_errhandling\fR & MATH_ERREXCEPT) is
  90. non-zero, then the underflow floating-point exception shall be raised.
  91. .RE
  92. .LP
  93. .IR "The following sections are informative."
  94. .SH EXAMPLES
  95. None.
  96. .SH "APPLICATION USAGE"
  97. On error, the expressions (\fImath_errhandling\fR & MATH_ERRNO) and
  98. (\fImath_errhandling\fR & MATH_ERREXCEPT) are independent of each
  99. other, but at least one of them must be non-zero.
  100. .SH RATIONALE
  101. None.
  102. .SH "FUTURE DIRECTIONS"
  103. None.
  104. .SH "SEE ALSO"
  105. .IR "\fIatanh\fR\^(\|)",
  106. .IR "\fIfeclearexcept\fR\^(\|)",
  107. .IR "\fIfetestexcept\fR\^(\|)",
  108. .IR "\fIisnan\fR\^(\|)",
  109. .IR "\fItan\fR\^(\|)"
  110. .P
  111. The Base Definitions volume of POSIX.1\(hy2017,
  112. .IR "Section 4.20" ", " "Treatment of Error Conditions for Mathematical Functions",
  113. .IR "\fB<math.h>\fP"
  114. .\"
  115. .SH COPYRIGHT
  116. Portions of this text are reprinted and reproduced in electronic form
  117. from IEEE Std 1003.1-2017, Standard for Information Technology
  118. -- Portable Operating System Interface (POSIX), The Open Group Base
  119. Specifications Issue 7, 2018 Edition,
  120. Copyright (C) 2018 by the Institute of
  121. Electrical and Electronics Engineers, Inc and The Open Group.
  122. In the event of any discrepancy between this version and the original IEEE and
  123. The Open Group Standard, the original IEEE and The Open Group Standard
  124. is the referee document. The original Standard can be obtained online at
  125. http://www.opengroup.org/unix/online.html .
  126. .PP
  127. Any typographical or formatting errors that appear
  128. in this page are most likely
  129. to have been introduced during the conversion of the source files to
  130. man page format. To report such errors, see
  131. https://www.kernel.org/doc/man-pages/reporting_bugs.html .