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 r18496889 = x;
double r18496890 = y;
double r18496891 = z;
double r18496892 = r18496890 + r18496891;
double r18496893 = r18496889 * r18496892;
double r18496894 = 5.0;
double r18496895 = r18496891 * r18496894;
double r18496896 = r18496893 + r18496895;
return r18496896;
}
double f(double x, double y, double z) {
double r18496897 = 5.0;
double r18496898 = z;
double r18496899 = y;
double r18496900 = r18496898 + r18496899;
double r18496901 = x;
double r18496902 = r18496900 * r18496901;
double r18496903 = fma(r18496897, r18496898, r18496902);
return r18496903;
}




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