x + \left(y - x\right) \cdot \frac{z}{t}\begin{array}{l}
\mathbf{if}\;\frac{z}{t} = -\infty:\\
\;\;\;\;x - \frac{1}{t} \cdot \left(\left(x - y\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x - y}{\frac{t}{z}}\\
\end{array}double f(double x, double y, double z, double t) {
double r437465 = x;
double r437466 = y;
double r437467 = r437466 - r437465;
double r437468 = z;
double r437469 = t;
double r437470 = r437468 / r437469;
double r437471 = r437467 * r437470;
double r437472 = r437465 + r437471;
return r437472;
}
double f(double x, double y, double z, double t) {
double r437473 = z;
double r437474 = t;
double r437475 = r437473 / r437474;
double r437476 = -inf.0;
bool r437477 = r437475 <= r437476;
double r437478 = x;
double r437479 = 1.0;
double r437480 = r437479 / r437474;
double r437481 = y;
double r437482 = r437478 - r437481;
double r437483 = r437482 * r437473;
double r437484 = r437480 * r437483;
double r437485 = r437478 - r437484;
double r437486 = r437474 / r437473;
double r437487 = r437482 / r437486;
double r437488 = r437478 - r437487;
double r437489 = r437477 ? r437485 : r437488;
return r437489;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.3 |
|---|---|
| Target | 2.5 |
| Herbie | 1.5 |
if (/ z t) < -inf.0Initial program 64.0
Simplified64.0
rmApplied *-un-lft-identity64.0
Applied associate-*l*64.0
Simplified60.0
rmApplied div-inv60.0
Applied *-un-lft-identity60.0
Applied times-frac0.5
Simplified0.4
if -inf.0 < (/ z t) Initial program 1.5
Simplified1.5
rmApplied *-un-lft-identity1.5
Applied associate-*l*1.5
Simplified1.5
Final simplification1.5
herbie shell --seed 2019195
(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))))