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

Guardian Native C Library Calls (n - r) remainderl(3)
NAME
remainderl - Computes the remainder of a division operation for a long double value
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
long double remainderl(
long double x,
long double y
);
PARAMETERS
x Is a long double number.
y Is a long double number.
DESCRIPTION
The remainderl() function is a long double version of the remainderl() function; it takes long
double arguments and returns a long double result.
The remainderl() function returns the floating-point remainder r where r = x - n*y and y is
nonzero. The value n is the integral value nearest to the real value of x/y. When the absolute
value of n - x / y is equal to 0.5, the value n is chosen to be even.
The behavior of the remainderl() function is not affected by the rounding mode.
NOTES
The remainderl() 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 remainderl() function returns the floating-point remainder r where r = x - n*y and y is
nonzero.
For IEEE floating-point values:
When the value of x or y is NaN, the remainderl() function returns NaN.
When the value of x is positive or negative infinity or the value of y is 0.0 (zero), the
remainderl() function returns NaN and sets errno to [EDOM].
For Tandem floating-point values, when the value of the y parameter is 0.0 (zero), the remain-
derl() function returns HUGE_VALL and sets errno to [EDOM].
ERRORS
If any of the following conditions occurs, the remainderl() function sets errno to the
corresponding value:
[EDOM] One of the following conditions exists:
The value of the y parameter is 0.0 (zero).
527192-018 Hewlett-Packard Company 5113