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 r22103729 = x;
double r22103730 = y;
double r22103731 = z;
double r22103732 = r22103730 + r22103731;
double r22103733 = r22103729 * r22103732;
double r22103734 = 5.0;
double r22103735 = r22103731 * r22103734;
double r22103736 = r22103733 + r22103735;
return r22103736;
}
double f(double x, double y, double z) {
double r22103737 = 5.0;
double r22103738 = z;
double r22103739 = y;
double r22103740 = r22103738 + r22103739;
double r22103741 = x;
double r22103742 = r22103740 * r22103741;
double r22103743 = fma(r22103737, r22103738, r22103742);
return r22103743;
}




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 2019172 +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)))