]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/nextafter.3
twalk_r.3: New link to twalk(3) page
[thirdparty/man-pages.git] / man3 / nextafter.3
CommitLineData
fea681da 1.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
da5e9c0c
MK
2.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3.\" <mtk.manpages@gmail.com>
2297bf0e 4.\"
38f20bb9 5.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
fea681da 6.\" Distributed under GPL
38f20bb9 7.\" %%%LICENSE_END
51f2944d 8.\"
fea681da 9.\" Based on glibc infopages
51f2944d 10.\"
4b8c67d9 11.TH NEXTAFTER 3 2017-09-15 "GNU" "Linux Programmer's Manual"
fea681da 12.SH NAME
c13182ef 13nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl \-
da5e9c0c 14floating-point number manipulation
fea681da
MK
15.SH SYNOPSIS
16.B #include <math.h>
68e4db0a 17.PP
fea681da
MK
18.BI "double nextafter(double " x ", double " y );
19.br
20.BI "float nextafterf(float " x ", float " y );
21.br
22.BI "long double nextafterl(long double " x ", long double " y );
68e4db0a 23.PP
fea681da
MK
24.BI "double nexttoward(double " x ", long double " y );
25.br
26.BI "float nexttowardf(float " x ", long double " y );
27.br
c13182ef 28.BI "long double nexttowardl(long double " x ", long double " y );
68e4db0a 29.PP
20c58d70 30Link with \fI\-lm\fP.
68e4db0a 31.PP
cc4615cc
MK
32.in -4n
33Feature Test Macro Requirements for glibc (see
34.BR feature_test_macros (7)):
35.in
68e4db0a 36.PP
cc4615cc 37.ad l
da5e9c0c 38.BR nextafter ():
16bbcf49 39.RS 4
636ed4d5
MK
40_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
41 || _XOPEN_SOURCE\ >=\ 500
cf7fa0a1 42.\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
636ed4d5
MK
43 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
44 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
16bbcf49 45.RE
da5e9c0c
MK
46.br
47.BR nextafterf (),
48.BR nextafterl ():
16bbcf49 49.RS 4
636ed4d5
MK
50_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
51 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
52 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
16bbcf49 53.RE
da5e9c0c
MK
54.br
55.BR nexttoward (),
56.BR nexttowardf (),
57.BR nexttowardl ():
16bbcf49 58.RS 4
8bfd73ba 59_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
cd2d5ec1 60_POSIX_C_SOURCE\ >=\ 200112L
16bbcf49 61.RE
cc4615cc 62.ad b
fea681da 63.SH DESCRIPTION
c13182ef 64The
0352da63
PH
65.BR nextafter (),
66.BR nextafterf (),
67and
68.BR nextafterl ()
da5e9c0c
MK
69functions return the next representable floating-point value following
70.I x
71in the direction of
72.IR y .
73If
74.I y
75is less than
76.IR x ,