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

remquo.3p (4732B)


  1. '\" et
  2. .TH REMQUO "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. remquo,
  12. remquof,
  13. remquol
  14. \(em remainder functions
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <math.h>
  19. .P
  20. double remquo(double \fIx\fP, double \fIy\fP, int *\fIquo\fP);
  21. float remquof(float \fIx\fP, float \fIy\fP, int *\fIquo\fP);
  22. long double remquol(long double \fIx\fP, long double \fIy\fP, int *\fIquo\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. The
  30. \fIremquo\fR(),
  31. \fIremquof\fR(),
  32. and
  33. \fIremquol\fR()
  34. functions shall compute the same remainder as the
  35. \fIremainder\fR(),
  36. \fIremainderf\fR(),
  37. and
  38. \fIremainderl\fR()
  39. functions, respectively. In the object pointed to by
  40. .IR quo ,
  41. they store a value whose sign is the sign of
  42. .IR x /\c
  43. .IR y
  44. and whose magnitude is congruent modulo 2\fI\s-3\un\d\s+3\fR to the
  45. magnitude of the integral quotient of
  46. .IR x /\c
  47. .IR y ,
  48. where
  49. .IR n
  50. is an implementation-defined integer greater than or equal to 3. If
  51. .IR y
  52. is zero, the value stored in the object pointed to by
  53. .IR quo
  54. is unspecified.
  55. .P
  56. An application wishing to check for error situations should set
  57. .IR errno
  58. to zero and call
  59. .IR feclearexcept (FE_ALL_EXCEPT)
  60. before calling these functions. On return, if
  61. .IR errno
  62. is non-zero or \fIfetestexcept\fR(FE_INVALID | FE_DIVBYZERO |
  63. FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an error has occurred.
  64. .SH "RETURN VALUE"
  65. These functions shall return
  66. .IR x
  67. REM
  68. .IR y .
  69. .P
  70. On systems that do not support the IEC 60559 Floating-Point option, if
  71. .IR y
  72. is zero, it is implementation-defined whether a domain error occurs or
  73. zero is returned.
  74. .P
  75. If
  76. .IR x
  77. or
  78. .IR y
  79. is NaN, a NaN shall be returned.
  80. .P
  81. If
  82. .IR x
  83. is \(+-Inf or
  84. .IR y
  85. is zero and the other argument is non-NaN, a domain error shall occur,
  86. and a NaN shall be returned.
  87. .SH ERRORS
  88. These functions shall fail if:
  89. .IP "Domain\ Error" 12
  90. The
  91. .IR x
  92. argument is \(+-Inf, or the
  93. .IR y
  94. argument is \(+-0 and the other argument is non-NaN.
  95. .RS 12
  96. .P
  97. If the integer expression (\fImath_errhandling\fR & MATH_ERRNO) is
  98. non-zero, then
  99. .IR errno
  100. shall be set to
  101. .BR [EDOM] .
  102. If the integer expression (\fImath_errhandling\fR & MATH_ERREXCEPT) is
  103. non-zero, then the invalid floating-point exception shall be raised.
  104. .RE
  105. .P
  106. These functions may fail if:
  107. .IP "Domain\ Error" 12
  108. The
  109. .IR y
  110. argument is zero.
  111. .RS 12
  112. .P
  113. If the integer expression (\fImath_errhandling\fR & MATH_ERRNO) is
  114. non-zero, then
  115. .IR errno
  116. shall be set to
  117. .BR [EDOM] .
  118. If the integer expression (\fImath_errhandling\fR & MATH_ERREXCEPT) is
  119. non-zero, then the invalid floating-point exception shall be raised.
  120. .RE
  121. .LP
  122. .IR "The following sections are informative."
  123. .SH EXAMPLES
  124. None.
  125. .SH "APPLICATION USAGE"
  126. On error, the expressions (\fImath_errhandling\fR & MATH_ERRNO) and
  127. (\fImath_errhandling\fR & MATH_ERREXCEPT) are independent of each
  128. other, but at least one of them must be non-zero.
  129. .SH RATIONALE
  130. These functions are intended for implementing argument reductions which
  131. can exploit a few low-order bits of the quotient. Note that
  132. .IR x
  133. may be so large in magnitude relative to
  134. .IR y
  135. that an exact representation of the quotient is not practical.
  136. .SH "FUTURE DIRECTIONS"
  137. None.
  138. .SH "SEE ALSO"
  139. .IR "\fIfeclearexcept\fR\^(\|)",
  140. .IR "\fIfetestexcept\fR\^(\|)",
  141. .IR "\fIremainder\fR\^(\|)"
  142. .P
  143. The Base Definitions volume of POSIX.1\(hy2017,
  144. .IR "Section 4.20" ", " "Treatment of Error Conditions for Mathematical Functions",
  145. .IR "\fB<math.h>\fP"
  146. .\"
  147. .SH COPYRIGHT
  148. Portions of this text are reprinted and reproduced in electronic form
  149. from IEEE Std 1003.1-2017, Standard for Information Technology
  150. -- Portable Operating System Interface (POSIX), The Open Group Base
  151. Specifications Issue 7, 2018 Edition,
  152. Copyright (C) 2018 by the Institute of
  153. Electrical and Electronics Engineers, Inc and The Open Group.
  154. In the event of any discrepancy between this version and the original IEEE and
  155. The Open Group Standard, the original IEEE and The Open Group Standard
  156. is the referee document. The original Standard can be obtained online at
  157. http://www.opengroup.org/unix/online.html .
  158. .PP
  159. Any typographical or formatting errors that appear
  160. in this page are most likely
  161. to have been introduced during the conversion of the source files to
  162. man page format. To report such errors, see
  163. https://www.kernel.org/doc/man-pages/reporting_bugs.html .