Returns the next machine-representable number following x in the direction of y. This function is supported on OpenVMS Integrity servers and Alpha only. Format #include <math.h> double nextafter (double x, double y); float nextafterf (float x, float y); long double nextafterl (long double x, long double y);
1 – Arguments
x A real number. y A real number.
2 – Description
The nextafter functions return the next machine-representable floating-point number following x in the direction of y. If y is less than x, nextafter returns the largest representable floating-point number less than x.
3 – Return Values
n The next representable floating-point value following x in the direction of y. HUGE_VAL Overflow; errno is set to ERANGE. NaN x or y is NaN; errno is set to EDOM.