x + \left(y - x\right) \cdot \frac{z}{t}x + \frac{1}{\frac{\frac{t}{z}}{y - x}}double f(double x, double y, double z, double t) {
double r499530 = x;
double r499531 = y;
double r499532 = r499531 - r499530;
double r499533 = z;
double r499534 = t;
double r499535 = r499533 / r499534;
double r499536 = r499532 * r499535;
double r499537 = r499530 + r499536;
return r499537;
}
double f(double x, double y, double z, double t) {
double r499538 = x;
double r499539 = 1.0;
double r499540 = t;
double r499541 = z;
double r499542 = r499540 / r499541;
double r499543 = y;
double r499544 = r499543 - r499538;
double r499545 = r499542 / r499544;
double r499546 = r499539 / r499545;
double r499547 = r499538 + r499546;
return r499547;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.2 |
|---|---|
| Target | 2.3 |
| Herbie | 2.1 |
Initial program 2.2
rmApplied associate-*r/6.5
rmApplied associate-/l*2.1
rmApplied clear-num2.1
Final simplification2.1
herbie shell --seed 2020045
(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))))