nextafter(3M)
NAME
nextafter - next representable double-precision floating-
point number
SYNOPSIS
cc [ flag ... ] file ... -lm [ library ... ]
#include <math.h>
double nextafter(double x, double y);
DESCRIPTION
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.
RETURN VALUES
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 over-
flow, nextafter() returns _HUGE_VAL (according to the sign
of x) and sets errno to ERANGE.
ERRORS
The nextafter() function will fail if:
ERANGE
The correct value would overflow.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| MT-Level | MT-Safe |
|_____________________________|_____________________________|
SEE ALSO
attributes(5),
Man(1) output converted with
man2html