Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
nexttowardl(3) Guardian Native C Library Calls Reference Manual
NAME
nexttowardl - Computes the next representable long double number
LIBRARY
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <math.h>
long double nexttowardl(
long double x,
long double y
);
PARAMETERS
x Is a long double number.
y Is a long double number.
DESCRIPTION
The nexttowardl() function is a long double version of the nexttoward() function; it takes long
double arguments and returns a long double result.
The nexttowardl() function is equivalent to the nextafterl() function (which calculates the next
representable floating-point value following the value of the x parameter in the direction of the y
parameter).
NOTES
This function is implemented only for the IEEE_float floating-point option. Applications using
this function cannot be compiled if the specified floating-point option is Tandem_float.
RETURN VALUES
Upon successful completion, the nexttowardl( ) function returns the next representable floating-
point value following the value of the x parameter in the direction of the y parameter.
If x equals y, the function returns y converted to the type of x.
If x or y equals NaN, the function returns NaN.
If x is finite but the correct function value would cause overflow, the function returns positive or
negative HUGE_VALL (with the same sign as x) and sets errno to [ERANGE].
If x! equals y and the correct function value is subnormal, zero, or underflows, the function
returns either the correct function value (if representable) or 0.0, and sets errno to [ERANGE].
ERRORS
If any of the following conditions occurs, the nexttowardl() function sets errno to the
corresponding value:
[ERANGE] One of the following conditions occurred:
• The return value would cause an overflow.
• The return value is subnormal or would cause an underflow.
5−18 Hewlett-Packard Company 527192-018