1 .\" Copyright (C) 2016, Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .TH NEXTUP 3 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual"
7 nextup, nextupf, nextupl, nextdown, nextdownf, nextdownl \-
8 return next floating-point number toward positive/negative infinity
11 .RI ( libm ", " \-lm )
14 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
17 .BI "double nextup(double " x );
18 .BI "float nextupf(float " x );
19 .BI "long double nextupl(long double " x );
21 .BI "double nextdown(double " x );
22 .BI "float nextdownf(float " x );
23 .BI "long double nextdownl(long double " x );
31 functions return the next representable floating-point number greater than
36 is the smallest representable negative number in the corresponding type,
37 these functions return \-0.
40 is 0, the returned value is the smallest representable positive number
41 of the corresponding type.
45 is positive infinity, the returned value is positive infinity.
49 the returned value is the largest representable finite negative number
50 of the corresponding type.
55 the returned value is NaN.
61 and similarly for the other types.
66 These functions first appeared in glibc in version 2.24.
68 For an explanation of the terms used in this section, see
76 Interface Attribute Value
84 T} Thread safety MT-Safe
90 These functions are described in
91 .I IEEE Std 754-2008 - Standard for Floating-Point Arithmetic
93 .IR "ISO/IEC TS 18661".