_nextafter, _nextafterl
Go Up to float.h Index
Header File
float.h
Prototype
double _nextafter(double da, double db);
long double _nextafterl(long double lda, long double ldb);
Description
Takes two doubles (da and db) and returns the closest representable neighbor of da in the direction toward db.
If da == db, _nextafter returns da, with no exception triggered. If either da or db is a quiet NaN, then the return value is one or the other of the input NaNs.
_nextafterl is the long double version; it takes a long double argument and returns a long double result.
Return Value
Returns the closest representable neighbor of the first argument in the direction toward the second argument.
Portability
POSIX | ANSI C | ANSI C++ | Win32 | Win64 | macOS | |
---|---|---|---|---|---|---|
_nextafter | + | |||||
_nextafterl | + |