2 .\" Copyright (C) 2016, Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .TH nextup 3 (date) "Linux man-pages (unreleased)"
8 nextup, nextupf, nextupl, nextdown, nextdownf, nextdownl \-
9 return next floating-point number toward positive/negative infinity
12 .RI ( libm ", " \-lm )
15 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
18 .BI "double nextup(double " x );
19 .BI "float nextupf(float " x );
20 .BI "long double nextupl(long double " x );
22 .BI "double nextdown(double " x );
23 .BI "float nextdownf(float " x );
24 .BI "long double nextdownl(long double " x );
32 functions return the next representable floating-point number greater than
37 is the smallest representable negative number in the corresponding type,
38 these functions return \-0.
41 is 0, the returned value is the smallest representable positive number
42 of the corresponding type.
46 is positive infinity, the returned value is positive infinity.
50 the returned value is the largest representable finite negative number
51 of the corresponding type.
56 the returned value is NaN.
62 and similarly for the other types.
67 For an explanation of the terms used in this section, see
75 Interface Attribute Value
83 T} Thread safety MT-Safe
89 These functions are described in
90 .I IEEE Std 754-2008 - Standard for Floating-Point Arithmetic
92 .IR "ISO/IEC TS 18661".