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

log10.3p (4073B)


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