.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
-.TH FLOOR 3 2010-09-20 "" "Linux Programmer's Manual"
+.TH FLOOR 3 2017-09-15 "" "Linux Programmer's Manual"
.SH NAME
floor, floorf, floorl \- largest integral value not greater than argument
.SH SYNOPSIS
.nf
.B #include <math.h>
-.sp
+.PP
.BI "double floor(double " x );
-.br
.BI "float floorf(float " x );
-.br
.BI "long double floorl(long double " x );
.fi
-.sp
+.PP
Link with \fI\-lm\fP.
-.sp
+.PP
.in -4n
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.in
-.sp
+.PP
.ad l
.BR floorf (),
.BR floorl ():
.RS 4
-_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
-_POSIX_C_SOURCE\ >=\ 200112L;
-.br
-or
-.I cc\ -std=c99
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+ || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+ || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
.RE
.ad
.SH DESCRIPTION
These functions return the largest integral value that is not greater than
.IR x .
-
+.PP
For example,
.IR floor(0.5)
is 0.0, and
.SH RETURN VALUE
These functions return the floor of
.IR x .
-
-If \fIx\fP is integral, +0, \-0, NaN, or an infinity,
-\fIx\fP itself is returned.
+.PP
+If
+.I x
+is integral, +0, \-0, NaN, or an infinity,
+.I x
+itself is returned.
.SH ERRORS
No errors occur.
POSIX.1-2001 documents a range error for overflows, but see NOTES.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbw27 lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR floor (),
+.BR floorf (),
+.BR floorl ()
+T} Thread safety MT-Safe
+.TE
.SH CONFORMING TO
-C99, POSIX.1-2001.
+C99, POSIX.1-2001, POSIX.1-2008.
+.PP
The variant returning
.I double
also conforms to