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

fma(3) Guardian Native C Library Calls Reference Manual
NAME
fma - Computes the multiply-add operation for floating-point 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>
double fma(
double x,
double y,
double z
);
PARAMETERS
x Species a double value that is a factor of the multiplication.
y Species a double value that is a factor of the multiplication.
z Species a double value that is the addend of the addition.
DESCRIPTION
The fma() 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 fma( ) 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 innite, 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 innite, 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 fma() 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.
[ERANGE] The result would cause an overow.
If any of the following conditions occurs, the fma() function may set errno to the corresponding
value:
246 Hewlett-Packard Company 527192-018