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 r23368218 = x;
double r23368219 = y;
double r23368220 = z;
double r23368221 = r23368219 + r23368220;
double r23368222 = r23368218 * r23368221;
double r23368223 = 5.0;
double r23368224 = r23368220 * r23368223;
double r23368225 = r23368222 + r23368224;
return r23368225;
}
double f(double x, double y, double z) {
double r23368226 = 5.0;
double r23368227 = z;
double r23368228 = y;
double r23368229 = r23368227 + r23368228;
double r23368230 = x;
double r23368231 = r23368229 * r23368230;
double r23368232 = fma(r23368226, r23368227, r23368231);
return r23368232;
}




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