Computes the next representable floating-point value following x in the direction of y. Thus, if y is less than x, nextafter shall return the largest representable floating-point number less than x. The nextafter function shall return y if x equals y.
#include <math.h> double nextafter (double x, double y);
x, y
x in the direction of y.
x== y, y (of the type x) shall be returned.
x is finite and the correct function value would overflow, a range error shall occur and +/-HUGE_VAL (with the same sign as x) shall be returned.
x or y is NaN, a NaN shall be returned.
x!= y and the correct function value is subnormal, zero, or underflows, a range error shall occur, and either the correct function value (if representable) or 0.0 shall be returned. | Versions | Defined in | Include | Link to |
|---|---|---|---|
| INtime 3.0 | intime/rt/include/math.h | math.h | clib.lib |