#include
<cmath>
double fma (double x, double x, double z)
Liefert x*y + z
mit nur einer Rundung ("fused multiply and add").
x , y , z | reelle Zahlen |
Rückgabewert: x*y + z
ohne Zwischenrundung.
-
#include <cmath> #include <iostream> int main() { std::cout << "0.1*10 + 1 = " << std::fma(0.1, 10, 1) << '\n'; }