x + \left(y - x\right) \cdot \frac{z}{t}\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)double f(double x, double y, double z, double t) {
double r478331 = x;
double r478332 = y;
double r478333 = r478332 - r478331;
double r478334 = z;
double r478335 = t;
double r478336 = r478334 / r478335;
double r478337 = r478333 * r478336;
double r478338 = r478331 + r478337;
return r478338;
}
double f(double x, double y, double z, double t) {
double r478339 = y;
double r478340 = x;
double r478341 = r478339 - r478340;
double r478342 = z;
double r478343 = t;
double r478344 = r478342 / r478343;
double r478345 = fma(r478341, r478344, r478340);
return r478345;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 2.1 |
|---|---|
| Target | 2.2 |
| Herbie | 2.1 |
Initial program 2.1
Simplified2.1
rmApplied fma-udef2.1
rmApplied fma-def2.1
Final simplification2.1
herbie shell --seed 2020024 +o rules:numerics
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
:precision binary64
:herbie-target
(if (< (* (- y x) (/ z t)) -1013646692435.887) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) -0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))
(+ x (* (- y x) (/ z t))))