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

fmodl(3) Guardian Native C Library Calls Reference Manual
NAME
fmodl - Computes the modulo remainder of a division operation for long double values
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 fmodl(
long double x,
long double y
);
PARAMETERS
x Species the long double value that is the numerator of the division.
y Species the long double value that is the denominator of the division.
DESCRIPTION
The fmodl() function is a long double version of the fmod() function; it takes long double argu-
ments and returns a long double result.
The fmodl() function computes the modulo floating-point remainder of x/y. The fmodl( ) func-
tion returns the value x -(i*y) for some i such that if y is nonzero, the result has the same sign as
x and magnitude less than the magnitude of y.
NOTES
This function supports both IEEE Std 754-1985 floating-point and Tandem floating-point values
in the native environment. 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
Upon successful completion, the fmodl( ) function returns the modulo floating-point remainder of
the division of x by y.
For IEEE floating-point values, if x or y is NaN, NaN is returned. If the value of x is positive or
negative infinity, or if the value of y is 0.0 (zero), the fmodl() function returns NaN and sets
errno to [EDOM]. If the value of y is nonzero and the value of x is positive or negative zero, the
fmodl() function returns the value of x. If the value of x is not positive or negative infinity but
the value of y is positive or negative infinity, the fmodl() function returns the value of x.
For Tandem floating-point values, if the value of y is 0.0 (zero), the fmodl() function returns 0.0
(zero).
If the correct value would cause underflow, 0.0 (zero) is returned.
ERRORS
If any of the following conditions occurs, the fmodl( ) function sets errno to the corresponding
value:
[EDOM] The y parameter is 0.0 (zero) or the x parameter is positive or negative infinity.
262 Hewlett-Packard Company 527192-018