x + \left(y - x\right) \cdot \frac{z}{t}x + \frac{\left(y - x\right) \cdot z}{t}double f(double x, double y, double z, double t) {
double r327313 = x;
double r327314 = y;
double r327315 = r327314 - r327313;
double r327316 = z;
double r327317 = t;
double r327318 = r327316 / r327317;
double r327319 = r327315 * r327318;
double r327320 = r327313 + r327319;
return r327320;
}
double f(double x, double y, double z, double t) {
double r327321 = x;
double r327322 = y;
double r327323 = r327322 - r327321;
double r327324 = z;
double r327325 = r327323 * r327324;
double r327326 = t;
double r327327 = r327325 / r327326;
double r327328 = r327321 + r327327;
return r327328;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.0 |
|---|---|
| Target | 2.1 |
| Herbie | 6.5 |
if x < -5.554823316875535e-17 or 4.07875646090157e-273 < x Initial program 1.1
if -5.554823316875535e-17 < x < 4.07875646090157e-273Initial program 4.0
rmApplied associate-*r/5.2
Final simplification6.5
herbie shell --seed 2019304
(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))))