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 r23552329 = x;
double r23552330 = y;
double r23552331 = r23552330 - r23552329;
double r23552332 = z;
double r23552333 = t;
double r23552334 = r23552332 / r23552333;
double r23552335 = r23552331 * r23552334;
double r23552336 = r23552329 + r23552335;
return r23552336;
}
double f(double x, double y, double z, double t) {
double r23552337 = z;
double r23552338 = t;
double r23552339 = r23552337 / r23552338;
double r23552340 = y;
double r23552341 = x;
double r23552342 = r23552340 - r23552341;
double r23552343 = fma(r23552339, r23552342, r23552341);
return r23552343;
}




Bits error versus x




Bits error versus y




Bits error versus z




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