Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

OSS Library Calls (n - r) remainderf(3)
NAME
remainderf - Computes the remainder of a division operation for a float 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
oat remainderf(
float x,
float y
);
PARAMETERS
x Is a float number.
y Is a float number.
DESCRIPTION
The remainderf() function is a float version of the remainder( ) function; it takes float argu-
ments and returns a float result.
The remainderf() 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 remainderf( ) function is not affected by the rounding mode.
NOTES
The remainderf() 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 remainderf() 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 remainderf( ) function returns NaN.
When the value of x is positive or negative infinity or the value of y is 0.0 (zero), the
remainderf( ) 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-
derf( ) function returns HUGE_VALF and sets errno to [EDOM].
ERRORS
If any of the following conditions occurs, the remainderf( ) function sets errno to the
corresponding value:
[EDOM] One of the following conditions exists:
The value of the y parameter is 0.0 (zero).
527187-017 Hewlett-Packard Company 5177