]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/nextafter.3
membarrier.2: Remove redundant mention of return value of MEMBARRIER_CMD_SHARED
[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.\"
c73595c2 11.TH NEXTAFTER 3 2015-04-19 "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>
17.sp
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 );
23.sp
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 );
fea681da 29.sp
20c58d70 30Link with \fI\-lm\fP.
cc4615cc
MK
31.sp
32.in -4n
33Feature Test Macro Requirements for glibc (see
34.BR feature_test_macros (7)):
35.in
36.sp
37.ad l
da5e9c0c 38.BR nextafter ():
16bbcf49 39.RS 4
8bfd73ba
MK
40_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
41_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED ||
42_ISOC99_SOURCE ||
43_POSIX_C_SOURCE\ >=\ 200112L;
16bbcf49
MK
44.br
45or
cc4615cc 46.I cc\ -std=c99
16bbcf49 47.RE
da5e9c0c
MK
48.br
49.BR nextafterf (),
50.BR nextafterl ():
16bbcf49 51.RS 4
8bfd73ba
MK
52_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
53_POSIX_C_SOURCE\ >=\ 200112L;
16bbcf49
MK
54.br
55or
da5e9c0c 56.I cc\ -std=c99
16bbcf49 57.RE
da5e9c0c
MK
58.br
59.BR nexttoward (),
60.BR nexttowardf (),
61.BR nexttowardl ():
16bbcf49 62.RS 4
8bfd73ba
MK
63_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
64_POSIX_C_SOURCE\ >=\ 200112L;
16bbcf49
MK
65.br
66or
da5e9c0c 67.I cc\ -std=c99
16bbcf49 68.RE
cc4615cc 69.ad b
fea681da 70.SH DESCRIPTION
c13182ef 71The
0352da63
PH
72.BR nextafter (),
73.BR nextafterf (),
74and
75.BR nextafterl ()
da5e9c0c
MK
76functions return the next representable floating-point value following
77.I x
78in the direction of
79.IR y .
80If
81.I y
82is less than
83.IR x ,