\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -6.7754897102361347 \cdot 10^{-49} \lor \neg \left(a \le -7.327308520767143 \cdot 10^{-215}\right):\\
\;\;\;\;x + \left(y - \left(z - t\right) \cdot \frac{y}{a - t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot y}{t} + x\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((x + y) - (((z - t) * y) / (a - t)));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((a <= -6.775489710236135e-49) || !(a <= -7.327308520767143e-215))) {
VAR = (x + (y - ((z - t) * (y / (a - t)))));
} else {
VAR = (((z * y) / t) + x);
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 16.0 |
|---|---|
| Target | 8.4 |
| Herbie | 9.2 |
if a < -6.775489710236135e-49 or -7.327308520767143e-215 < a Initial program 15.6
rmApplied *-un-lft-identity15.6
Applied times-frac10.8
Simplified10.8
rmApplied associate--l+8.4
if -6.775489710236135e-49 < a < -7.327308520767143e-215Initial program 18.5
Taylor expanded around inf 15.3
Final simplification9.2
herbie shell --seed 2020103
(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))))