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 r23433135 = x;
double r23433136 = y;
double r23433137 = z;
double r23433138 = r23433136 + r23433137;
double r23433139 = r23433135 * r23433138;
double r23433140 = 5.0;
double r23433141 = r23433137 * r23433140;
double r23433142 = r23433139 + r23433141;
return r23433142;
}
double f(double x, double y, double z) {
double r23433143 = 5.0;
double r23433144 = z;
double r23433145 = y;
double r23433146 = r23433144 + r23433145;
double r23433147 = x;
double r23433148 = r23433146 * r23433147;
double r23433149 = fma(r23433143, r23433144, r23433148);
return r23433149;
}




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