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

floor.3p (2906B)


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