.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
.\" <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
.\" Based on glibc infopages
-.TH NEXTAFTER 3 2009-12-05 "GNU" "Linux Programmer's Manual"
+.\"
+.TH NEXTAFTER 3 2013-09-02 "GNU" "Linux Programmer's Manual"
.SH NAME
nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl \-
floating-point number manipulation
.sp
.ad l
.BR nextafter ():
-_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _ISOC99_SOURCE; or
+.RS 4
+_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
+_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED ||
+_ISOC99_SOURCE ||
+_POSIX_C_SOURCE\ >=\ 200112L;
+.br
+or
.I cc\ -std=c99
+.RE
.br
.BR nextafterf (),
.BR nextafterl ():
-_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
+.RS 4
+_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
+_POSIX_C_SOURCE\ >=\ 200112L;
+.br
+or
.I cc\ -std=c99
+.RE
.br
.BR nexttoward (),
.BR nexttowardf (),
.BR nexttowardl ():
-_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE;
+.RS 4
+_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
+_POSIX_C_SOURCE\ >=\ 200112L;
+.br
+or
.I cc\ -std=c99
+.RE
.ad b
.SH DESCRIPTION
The
-.BR nextafter ()
+.BR nextafter (),
+.BR nextafterf (),
+and
+.BR nextafterl ()
functions return the next representable floating-point value following
.I x
in the direction of
these functions will return the largest representable number less than
.IR x .
-If \fIx\fP equals \fIy\fP, the functions return \fIy\fP.
+If
+.I x
+equals
+.IR y ,
+the functions return
+.IR y .
The
-.BR nexttoward ()
-functions do the same as the
+.BR nexttoward (),
+.BR nexttowardf (),
+and
+.BR nexttowardl ()
+functions do the same as the corresponding
.BR nextafter ()
functions, except that they have a
.I "long double"
.IR errno .
.\" FIXME . Is it intentional that these functions do not set errno?
.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6799
-.SH "CONFORMING TO"
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR nextafter (),
+.BR nextafterf (),
+.BR nextafterl (),
+.BR nexttoward (),
+.BR nexttowardf (),
+and
+.BR nexttowardl ()
+functions are thread-safe.
+.SH CONFORMING TO
C99, POSIX.1-2001.
This function is defined in IEC 559 (and the appendix with
recommended functions in IEEE 754/IEEE 854).
floating-point
.RB ( FE_UNDERFLOW )
exception when an underflow occurs.
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR nearbyint (3)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.