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 r20963252 = x;
double r20963253 = y;
double r20963254 = z;
double r20963255 = r20963253 + r20963254;
double r20963256 = r20963252 * r20963255;
double r20963257 = 5.0;
double r20963258 = r20963254 * r20963257;
double r20963259 = r20963256 + r20963258;
return r20963259;
}
double f(double x, double y, double z) {
double r20963260 = 5.0;
double r20963261 = z;
double r20963262 = y;
double r20963263 = r20963261 + r20963262;
double r20963264 = x;
double r20963265 = r20963263 * r20963264;
double r20963266 = fma(r20963260, r20963261, r20963265);
return r20963266;
}




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