Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
nextafterl(3) Guardian Native C Library Calls Reference Manual
NAME
nextafterl - Computes the next representable float 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 nextafterl(
long double x,
long double y
);
PARAMETERS
x Is a long double number.
y Is a long double number.
DESCRIPTION
The nextafterl() function is a long double version of the nextafter() function; it takes long dou-
ble arguments and returns a long double result.
The nextafterl() function calculates the next representable floating-point value following the
value of the x parameter in the direction of the y parameter.
When the value of x is less than the value of y, the nextafterl( ) function returns the smallest
representable floating-point number greater than x. When the value of x is greater than the value
of y, the nextafterl() function returns the largest representable floating-point number less than x.
When x equals y, the result is y.
NOTES
The nextafterl() function can be called only by native processes.
This function supports both IEEE Std 754-1985 floating-point and Tandem floating-point values.
IEEE values can include NaN and infinity, and the sign of 0.0 (zero) can be either positive or
negative. Refer to the fp_class(3) reference page for a description of IEEE value classes.
Guardian functions are available to convert between floating-point formats. Refer to the Guar-
dian Programmer’s Guide for a discussion of floating-point conversions.
RETURN VALUES
The nextafterl() function returns the next representable floating-point value following the value
of the x parameter in the direction of the y parameter.
For IEEE floating-point data, the following are true:
• If the value of either x or y is NaN, a quiet NaN is returned.
• When the value of x is infinite, the value of x is returned.
• No exception is signaled when x equals y.
When the value of x is finite but nextafterl(x, y) would cause overflow, the nextafterl () function
returns positive or negative HUGE_VALL and sets errno to [ERANGE].
5−12 Hewlett-Packard Company 527192-018