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

OSS Library Calls (e - f) fmal(3)
NAME
fmal - Computes the multiply-add 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 fmal(
long double x,
long double y,
long double z
);
PARAMETERS
x Specifies a long double value that is a factor of the multiplication.
y Specifies a long double value that is a factor of the multiplication.
z Specifies a long double value that is the addend of the addition.
DESCRIPTION
The fmal( ) function is a long double version of the fma( ) function; it takes long double argu-
ments and returns a long double result.
The fmal( ) function computes (x*y)+z, rounded as one ternary operation. It computes the value
(as if) to infinite precision and rounds once to the result format, according to the current rounding
mode.
NOTES
This function is implemented only for the IEEE_float oating-point option. Applications using
this function cannot be compiled if the specified floating-point option is Tandem_float.
RETURN VALUES
Upon successful completion, the fmal( ) function returns (x*y)+z, rounded as one ternary opera-
tion.
If the value of x or y is NaN, NaN is returned.
If x multiplied by y is an exact infinity and z is also an infinity but with the opposite sign, NaN is
returned and errno is set to [EDOM].
If one of x and y is infinite, the other is 0.0 (zero), and z is not NaN, NaN is returned and errno is
set to [EDOM].
If one of x and y is infinite, the other is 0.0 (zero), and z is NaN, NaN is returned and errno may
be set to [EDOM].
If x multiplied by y is not 0*Inf nor Inf*0 and z is NaN, NaN is returned.
ERRORS
If any of the following conditions occurs, the fmal( ) function sets errno to the corresponding
value:
[EDOM] The value of (x*y)+z is invalid, or the value of x*y is invalid and z is not NaN.
527187-017 Hewlett-Packard Company 283