Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

nextafterf(3) Guardian Native C Library Calls Reference Manual
NAME
nextafterf - 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>
float nextafterf(
float x,
float y
);
PARAMETERS
x Is a float number.
y Is a float number.
DESCRIPTION
The nextafterf() function is a float version of the nextafter() function; it takes float arguments
and returns a float result.
The nextafterf() 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 nextafterf() function returns the smallest
representable floating-point number greater than x. When the value of x is greater than the value
of y, the nextafterf() function returns the largest representable floating-point number less than x.
When x equals y, the result is y.
NOTES
The nextafterf() 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 Programmers Guide for a discussion of floating-point conversions.
RETURN VALUES
The nextafterf() 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 nextafterf(x, y) would cause overflow, the nextafterf () func-
tion returns positive or negative HUGE_VALF and sets errno to [ERANGE].
510 Hewlett-Packard Company 527192-018