\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -4.152528322917232299148352171282481831203 \cdot 10^{-63} \lor \neg \left(a \le 1.757471554465361693971773316158416808742 \cdot 10^{-153}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{z - t}{a - t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r603417 = x;
double r603418 = y;
double r603419 = r603417 + r603418;
double r603420 = z;
double r603421 = t;
double r603422 = r603420 - r603421;
double r603423 = r603422 * r603418;
double r603424 = a;
double r603425 = r603424 - r603421;
double r603426 = r603423 / r603425;
double r603427 = r603419 - r603426;
return r603427;
}
double f(double x, double y, double z, double t, double a) {
double r603428 = a;
double r603429 = -4.1525283229172323e-63;
bool r603430 = r603428 <= r603429;
double r603431 = 1.7574715544653617e-153;
bool r603432 = r603428 <= r603431;
double r603433 = !r603432;
bool r603434 = r603430 || r603433;
double r603435 = x;
double r603436 = y;
double r603437 = 1.0;
double r603438 = z;
double r603439 = t;
double r603440 = r603438 - r603439;
double r603441 = r603428 - r603439;
double r603442 = r603440 / r603441;
double r603443 = r603437 - r603442;
double r603444 = r603436 * r603443;
double r603445 = r603435 + r603444;
double r603446 = r603438 / r603439;
double r603447 = r603436 * r603446;
double r603448 = r603435 + r603447;
double r603449 = r603434 ? r603445 : r603448;
return r603449;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 17.1 |
|---|---|
| Target | 9.0 |
| Herbie | 7.3 |
if a < -4.1525283229172323e-63 or 1.7574715544653617e-153 < a Initial program 15.6
rmApplied associate-/l*9.3
rmApplied associate--l+7.3
rmApplied associate-/r/5.6
Applied *-un-lft-identity5.6
Applied distribute-rgt-out--5.6
if -4.1525283229172323e-63 < a < 1.7574715544653617e-153Initial program 20.6
rmApplied associate-/l*19.5
rmApplied associate--l+13.3
rmApplied associate-/r/12.0
Applied *-un-lft-identity12.0
Applied distribute-rgt-out--12.0
Taylor expanded around inf 11.2
Final simplification7.3
herbie shell --seed 2019353
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-07) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))