1NEXTAFTER(3)                  libc math functions                 NEXTAFTER(3)
2
3
4

NAME

6       nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl
7       - floating point number manipulation
8

SYNOPSIS

10       #include <math.h>
11
12       double nextafter(double x, double y);
13       float nextafterf(float x, float y);
14       long double nextafterl(long double x, long double y);
15
16       double nexttoward(double x, long double y);
17       float nexttowardf(float x, long double y);
18       long double nexttowardl(long double x, long double y);
19
20       Link with -lm.
21

DESCRIPTION

23       The nextafter() functions return the next representable neighbor  of  x
24       in  the  direction  towards  y.  The size of the step between x and the
25       result depends on the type of the result.  If x = y the function simply
26       returns  y.  If either value is NaN, then NaN is returned.  Otherwise a
27       value corresponding to the value of the least significant  bit  in  the
28       mantissa is added or subtracted, depending on the direction.
29
30       The  nexttoward()  functions  do the same as the nextafter() functions,
31       except that they have a long double second argument.
32
33       These functions will signal overflow or underflow if  the  result  goes
34       outside of the range of normalized numbers.
35

CONFORMING TO

37       C99.  This function is defined in IEC 559 (and the appendix with recom‐
38       mended functions in IEEE 754/IEEE 854).
39

SEE ALSO

41       nearbyint(3)
42
43
44
45GNU                               2002-08-10                      NEXTAFTER(3)
Impressum