x \cdot \left(y + z\right) + z \cdot 5
\mathsf{fma}\left(5, z, \left(z + y\right) \cdot x\right)double f(double x, double y, double z) {
double r22115326 = x;
double r22115327 = y;
double r22115328 = z;
double r22115329 = r22115327 + r22115328;
double r22115330 = r22115326 * r22115329;
double r22115331 = 5.0;
double r22115332 = r22115328 * r22115331;
double r22115333 = r22115330 + r22115332;
return r22115333;
}
double f(double x, double y, double z) {
double r22115334 = 5.0;
double r22115335 = z;
double r22115336 = y;
double r22115337 = r22115335 + r22115336;
double r22115338 = x;
double r22115339 = r22115337 * r22115338;
double r22115340 = fma(r22115334, r22115335, r22115339);
return r22115340;
}




Bits error versus x




Bits error versus y




Bits error versus z
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.0 |
Initial program 0.1
Taylor expanded around 0 0.1
Simplified0.0
Final simplification0.0
herbie shell --seed 2019169 +o rules:numerics
(FPCore (x y z)
:name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, C"
:herbie-target
(+ (* (+ x 5.0) z) (* x y))
(+ (* x (+ y z)) (* z 5.0)))