cc [ flag ... ] file ... -lm [ library ... ] #include <math.h>
The nextafter() function computes the next representable double-precision floating-point value following x in the direction of y. Thus, if y is less than x, nextafter() returns the largest representable floating-point number less than x.
The nextafter() function returns the next representable double-precision floating-point value following x in the direction of y.
If x or y is NaN, then nextafter() returns NaN.
If x is finite and the correct function value would overflow, nextafter() returns +-HUGE_VAL (according to the sign of x) and sets errno to ERANGE.
The nextafter() function will fail if:
See attributes(5) for descriptions of the following attributes:
attributes(5),