1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\" Based on glibc infopages
4 .TH NEXTAFTER 3 2002-08-10 "GNU" "libc math functions"
6 nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl \- floating point number manipulation
10 .BI "double nextafter(double " x ", double " y );
12 .BI "float nextafterf(float " x ", float " y );
14 .BI "long double nextafterl(long double " x ", long double " y );
16 .BI "double nexttoward(double " x ", long double " y );
18 .BI "float nexttowardf(float " x ", long double " y );
20 .BI "long double nexttowardl(long double " x ", long double " y );
26 functions return the next representable neighbor of
27 \fIx\fP in the direction towards \fIy\fP. The size of the step
28 between \fIx\fP and the result depends on the type of the result.
29 If \fIx\fP = \fIy\fP the function simply returns \fIy\fP.
34 is returned. Otherwise a value corresponding to the value of the
35 least significant bit in the mantissa is added or subtracted,
36 depending on the direction.
40 functions do the same as the
42 functions, except that they have a long double second argument.
44 These functions will signal overflow or underflow if the result
45 goes outside of the range of normalized numbers.
47 C99. This function is defined in IEC 559 (and the appendix with
48 recommended functions in IEEE 754/IEEE 854).