\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -3.00111404102647603 \cdot 10^{-218} \lor \neg \left(a \le 5.6206320432764801 \cdot 10^{-134}\right):\\
\;\;\;\;x + \left(y - \frac{z - t}{\frac{a - t}{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot y}{t} + x\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (((double) (x + y)) - (((double) (((double) (z - t)) * y)) / ((double) (a - t)))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((a <= -3.001114041026476e-218) || !(a <= 5.62063204327648e-134))) {
VAR = ((double) (x + ((double) (y - (((double) (z - t)) / (((double) (a - t)) / y))))));
} else {
VAR = ((double) ((((double) (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.6 |
|---|---|
| Target | 8.6 |
| Herbie | 8.5 |
if a < -3.00111404102647603e-218 or 5.6206320432764801e-134 < a Initial program 16.0
rmApplied associate-/l*10.4
rmApplied associate--l+8.5
if -3.00111404102647603e-218 < a < 5.6206320432764801e-134Initial program 18.9
Taylor expanded around inf 8.6
Final simplification8.5
herbie shell --seed 2020181
(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.0 (- 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.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))