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

nearbyint.3p (2832B)


  1. '\" et
  2. .TH NEARBYINT "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. nearbyint,
  12. nearbyintf,
  13. nearbyintl
  14. \(em floating-point rounding functions
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <math.h>
  19. .P
  20. double nearbyint(double \fIx\fP);
  21. float nearbyintf(float \fIx\fP);
  22. long double nearbyintl(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 round their argument to an integer value in
  30. floating-point format, using the current rounding direction and without
  31. raising the inexact floating-point exception.
  32. .SH "RETURN VALUE"
  33. Upon successful completion, these functions shall return the rounded
  34. integer value.
  35. The result shall have the same sign as
  36. .IR x .
  37. .P
  38. If
  39. .IR x
  40. is NaN, a NaN shall be returned.
  41. .P
  42. If
  43. .IR x
  44. is \(+-0, \(+-0 shall be returned.
  45. .P
  46. If
  47. .IR x
  48. is \(+-Inf,
  49. .IR x
  50. shall be returned.
  51. .SH ERRORS
  52. No errors are defined.
  53. .LP
  54. .IR "The following sections are informative."
  55. .SH EXAMPLES
  56. None.
  57. .SH "APPLICATION USAGE"
  58. The integral value returned by these functions need not be expressible
  59. as an
  60. .BR intmax_t .
  61. The return value should be tested before assigning it to an integer
  62. type to avoid the undefined results of an integer overflow.
  63. .SH RATIONALE
  64. None.
  65. .SH "FUTURE DIRECTIONS"
  66. None.
  67. .SH "SEE ALSO"
  68. .IR "\fIfeclearexcept\fR\^(\|)",
  69. .IR "\fIfetestexcept\fR\^(\|)"
  70. .P
  71. The Base Definitions volume of POSIX.1\(hy2017,
  72. .IR "Section 4.20" ", " "Treatment of Error Conditions for Mathematical Functions",
  73. .IR "\fB<math.h>\fP"
  74. .\"
  75. .SH COPYRIGHT
  76. Portions of this text are reprinted and reproduced in electronic form
  77. from IEEE Std 1003.1-2017, Standard for Information Technology
  78. -- Portable Operating System Interface (POSIX), The Open Group Base
  79. Specifications Issue 7, 2018 Edition,
  80. Copyright (C) 2018 by the Institute of
  81. Electrical and Electronics Engineers, Inc and The Open Group.
  82. In the event of any discrepancy between this version and the original IEEE and
  83. The Open Group Standard, the original IEEE and The Open Group Standard
  84. is the referee document. The original Standard can be obtained online at
  85. http://www.opengroup.org/unix/online.html .
  86. .PP
  87. Any typographical or formatting errors that appear
  88. in this page are most likely
  89. to have been introduced during the conversion of the source files to
  90. man page format. To report such errors, see
  91. https://www.kernel.org/doc/man-pages/reporting_bugs.html .