1 .\" Copyright (C) 2016, Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .TH NEXTUP 3 2017-09-15 "GNU" "Linux Programmer's Manual"
27 nextup, nextupf, nextupl, nextdown, nextdownf, nextdownl \-
28 return next floating-point number toward positive/negative infinity
31 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
34 .BI "double nextup(double " x );
35 .BI "float nextupf(float " x );
36 .BI "long double nextupl(long double " x );
38 .BI "double nextdown(double " x );
39 .BI "float nextdownf(float " x );
40 .BI "long double nextdownl(long double " x );
50 functions return the next representable floating-point number greater than
55 is the smallest representable negative number in the corresponding type,
56 these functions return \-0.
59 is 0, the returned value is the smallest representable positive number
60 of the corresponding type.
64 is positive infinity, the returned value is positive infinity.
68 the returned value is the largest representable finite negative number
69 of the corresponding type.
74 the returned value is NaN.
80 and similarly for the other types.
85 These functions first appeared in glibc in version 2.24.
87 For an explanation of the terms used in this section, see
93 Interface Attribute Value
102 T} Thread safety MT-Safe
105 These functions are described in
106 .IR "IEEE Std 754-2008 - Standard for Floating-Point Arithmetic"
108 .IR "ISO/IEC TS 18661".