HP-UX Reference (11i v2 07/12) - 3 Library Functions N-Z (vol 7)

n
nextafter(3M) nextafter(3M)
RETURN VALUE
If x equals y, nextafter() returns y, and
nexttoward() returns y converted to the type of x.
If x or y is NaN,
nextafter() and
nexttoward() return NaN.
If x is finite and the correct function value would overflow,
nextafter() and nexttoward() return
±HUGE_VAL (equal to +INFINITY), according to the sign of x, and raise the overflow exception.
If the return value is denormal and x!=y, these functions raise the underflow and inexact floating-point
exceptions.
ERRORS
If x is finite and the correct function value would overflow,
nextafter() sets errno to [ERANGE].
Itanium-based System Only
HP-UX
libm functions on Itanium-based systems do not set
errno by default. For
errno setting, com-
pile with the
+Olibmerrno option.
SEE ALSO
scalbn(3M), math(5).
STANDARDS CONFORMANCE
nextafter() : SVID3, XPG4.2, ISO/IEC C99 (including Annex F, ‘‘IEC 60559 floating-point arithmetic’)
nextafterf() , nextafterl() , nexttoward() , nexttowardf()
, nexttowardl() :
ISO/IEC C99 (including Annex F, ‘‘IEC 60559 floating-point arithmetic’’)
76 Hewlett-Packard Company 2 HP-UX 11i Version 2: December 2007 Update