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

fmaf(3) Guardian Native C Library Calls Reference Manual
NAME
fmaf - Computes the multiply-add operation for float 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>
float fmaf(
float x,
float y,
float z
);
PARAMETERS
x Species a float value that is a factor of the multiplication.
y Species a float value that is a factor of the multiplication.
z Species a float value that is the addend of the addition.
DESCRIPTION
The fmaf() function is a float version of the fma() function; it takes float arguments and returns
a float result.
The fmaf() 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 fmaf( ) 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 fmaf() 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.
248 Hewlett-Packard Company 527192-018