x + \left(y - x\right) \cdot \frac{z}{t}\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)double f(double x, double y, double z, double t) {
double r18505821 = x;
double r18505822 = y;
double r18505823 = r18505822 - r18505821;
double r18505824 = z;
double r18505825 = t;
double r18505826 = r18505824 / r18505825;
double r18505827 = r18505823 * r18505826;
double r18505828 = r18505821 + r18505827;
return r18505828;
}
double f(double x, double y, double z, double t) {
double r18505829 = z;
double r18505830 = t;
double r18505831 = r18505829 / r18505830;
double r18505832 = y;
double r18505833 = x;
double r18505834 = r18505832 - r18505833;
double r18505835 = fma(r18505831, r18505834, r18505833);
return r18505835;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 2.0 |
|---|---|
| Target | 2.2 |
| Herbie | 2.0 |
Initial program 2.0
Simplified2.0
Final simplification2.0
herbie shell --seed 2019172 +o rules:numerics
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
:herbie-target
(if (< (* (- y x) (/ z t)) -1013646692435.8867) (+ 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))))