nextafter.3m (2010 09)

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].
Integrity Server Only
HP-UX
libm functions on Integrity servers do not set
errno by default. For errno setting, compile
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 arith-
metic’’)
nextafterf(), nextafterl(), nexttoward(), nexttowardf()
, nexttowardl() :ISO/IEC
C99 (including Annex F, ‘‘IEC 60559 floating-point arithmetic’’)
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010