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 r24061059 = x;
double r24061060 = y;
double r24061061 = r24061060 - r24061059;
double r24061062 = z;
double r24061063 = t;
double r24061064 = r24061062 / r24061063;
double r24061065 = r24061061 * r24061064;
double r24061066 = r24061059 + r24061065;
return r24061066;
}
double f(double x, double y, double z, double t) {
double r24061067 = z;
double r24061068 = t;
double r24061069 = r24061067 / r24061068;
double r24061070 = y;
double r24061071 = x;
double r24061072 = r24061070 - r24061071;
double r24061073 = fma(r24061069, r24061072, r24061071);
return r24061073;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 1.9 |
|---|---|
| Target | 2.1 |
| Herbie | 1.9 |
Initial program 1.9
Simplified1.9
Final simplification1.9
herbie shell --seed 2019192 +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))))