MathF.FusedMultiplyAdd(Single, Single, Single) 方法

定义

返回 (x * y) + z,舍入为一个三元运算。Returns (x * y) + z, rounded as one ternary operation.

public:
 static float FusedMultiplyAdd(float x, float y, float z);
public static float FusedMultiplyAdd (float x, float y, float z);
static member FusedMultiplyAdd : single * single * single -> single
Public Shared Function FusedMultiplyAdd (x As Single, y As Single, z As Single) As Single

参数

x
Single

要与 y 相乘的数字。The number to be multiplied with y.

y
Single

要与 x 相乘的数字。The number to be multiplied with x.

z
Single

要与 xy 相乘所得的结果相加的数字。The number to be added to the result of x multiplied by y.

返回

(x * y) + z,舍入为一个三元运算。(x * y) + z, rounded as one ternary operation.

注解

此计算(x * y)的计算结果如下: 无限精度z , 将添加到该结果, 就像是无限精度, 最后舍入为最接近的可表示值。This computes (x * y) as if to infinite precision, adds z to that result as if to infinite precision, and finally rounds to the nearest representable value.

这不同于未融合的序列, 该序列将(x * y)计算为 "不受限制的 preicision", 将结果舍入为最接近的可表示值, 将 "z" 添加到舍入结果, 就像是无限精度, 最后舍入到最接近的表示形式负值.This differs from the non-fused sequence which would compute (x * y) as if to infinite preicision, round the result to the nearest representable value, add 'z' to the rounded result as if to infinite precision, and finally round to the nearest representable value.

适用于