3.150. __nv_fma

double @__nv_fma(double %x, double %y, double %z)

Compute \(x \times y + z\) as a single operation.

Compute the value of \(x \times y + z\) as a single ternary operation. After computing the value to infinite precision, the value is rounded once.

Note

For accuracy information, see the CUDA C++ Programming Guide, Mathematical Functions Appendix, Double-Precision Floating-Point Functions section.

Returns

Returns the rounded value of \(x \times y + z\) as a single operation.

  • __nv_fma( \(\pm \infty\) , \(\pm 0\) , z) returns NaN.

  • __nv_fma( \(\pm 0\) , \(\pm \infty\) , z) returns NaN.

  • __nv_fma(x, y, \(-\infty\) ) returns NaN if \(x \times y\) is an exact \(+\infty\).

  • __nv_fma(x, y, \(+\infty\) ) returns NaN if \(x \times y\) is an exact \(-\infty\).