共用方式為


fma Function

Computes the product of the first and second specified arguments, then adds the third specified argument to the result; the entire computation is performed as a single operation.

inline float fma(
   float _X,
   float _Y,
   float _Z
) restrict(amp);
inline double fma(
   double _X,
   double _Y,
   double _Z
) restrict(amp);

Parameters

  • _X
    The first floating-point argument.

  • _Y
    The second floating-point argument.

  • _Z
    The third floating-point argument.

Return Value

The result of the expression (_X * _Y) + _Z. The entire computation is performed as a single operation; that is, the sub-expressions are calculated to infinite precision, and only the final result is rounded.

Requirements

Header: amp_math.h

Namespace: Concurrency::precise_math

See Also

Reference

Concurrency::precise_math Namespace